Android Wear device selection box says “offline localhost:4444 minSdk (API 20) > deviceSdk (API 1)”

别说谁变了你拦得住时间么 提交于 2019-12-10 14:59:24

问题


I am trying to build android wear application, If I set minsdk to 20/21. It gives error below,

But if I set it to 19, I get following error:

/home/bhupinder/AndroidStudioProjects/MyWatch/app/src/main/AndroidManifest.xml:0:0 Error:
    uses-sdk:minSdkVersion 19 cannot be smaller than version 20 declared in library /home/bhupinder/AndroidStudioProjects/MyWatch/app/build/intermediates/exploded-aar/com.google.android.support/wearable/1.0.0/AndroidManifest.xml
    Suggestion: use tools:overrideLibrary="android.support.wearable" to force usage
Error:Execution failed for task ':app:processDebugManifest'.
> Manifest merger failed : uses-sdk:minSdkVersion 19 cannot be smaller than version 20 declared in library /home/bhupinder/AndroidStudioProjects/MyWatch/app/build/intermediates/exploded-aar/com.google.android.support/wearable/1.0.0/AndroidManifest.xml
    Suggestion: use tools:overrideLibrary="android.support.wearable" to force usage

What should I do to run it? I am trying sample code from here => http://www.binpress.com/tutorial/how-to-create-a-custom-android-wear-watch-face/120


回答1:


I had the same error about API levels (deviceSdk = API 1). I fixed it by resetting the watch to factory settings (Settings > Reset device). When I paired it again with the phone the proper API level was reported.




回答2:


Do you have the watch connected via Bluetooth Debugging?

This might solve your problem: http://melix.github.io/blog/2014/10/android-moto360.html



来源:https://stackoverflow.com/questions/26955383/android-wear-device-selection-box-says-offline-localhost4444-minsdk-api-20

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!