Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

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

enter image description here

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

like image 362
Bhupinder Avatar asked Oct 19 '22 22:10

Bhupinder


1 Answers

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.

like image 106
Theo Avatar answered Nov 11 '22 13:11

Theo