Wear设备选择框说

Wear设备选择框说

本文介绍了Android Wear设备选择框说“offline localhost:4444 minSdk(API 20)> deviceSdk(API 1)“的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在建立Android Wear应用程序,如果我将minsdk设置为20/21。下面给出错误,

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

但如果我将它设置为19,我会收到以下错误:

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

推荐答案

我有关于API级别的相同错误(deviceSdk = API 1)。我通过将手表复位为出厂设置(设置>重置设备)来修复此问题。当我再次与手机配对时,报告了正确的API级别。

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.

这篇关于Android Wear设备选择框说“offline localhost:4444 minSdk(API 20)> deviceSdk(API 1)“的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

07-30 22:18