ticwear / sdk

Ticwear Smartwatch App Developer SDK. http://developer.ticwear.com
109 stars 52 forks source link

Android Studio 3.0带签名打包SDK的例子报com.google.android.gms.wearable.BIND_LISTENER被弃用的致命错误! #22

Closed longjun3000 closed 4 years ago

longjun3000 commented 6 years ago

自己的程序准备升级,也试了ticwear sdk sample: CompatModeDemo,带签名打包发现Android Studio 3.0.1报 com.google.android.gms.wearable.BIND_LISTENER 被弃用的致命错误:

Information:Gradle tasks [:app:assembleRelease] /Users/long/Downloads/ticwatch-sdk-master/sample/android-studio/CompatModeDemo/app/src/main/AndroidManifest.xml Error:(32) Error: The com.google.android.gms.wearable.BIND_LISTENER action is deprecated. [WearableBindListener] Error:Execution failed for task ':app:lintVitalRelease'.

Lint found fatal errors while assembling a release target. To proceed, either fix the issues identified by lint, or modify your build script as follows: ... android { lintOptions { checkReleaseBuilds false // Or, if you prefer, you can continue to check for errors in release builds, // but continue the build even when errors are found: abortOnError false } } ...

问题来自AndroidManifest.xml: `

`

查了下,发现以上AndroidManifest.xml里写法,Google已经声明 Android Studio 2.1以上都会报被弃用的致命错误,导致带签名打包失败。(参见:https://android-developers.googleblog.com/2016/04/deprecation-of-bindlistener.html

看了下ticwear sdk sample和官网文档,还是旧的例子,麻烦更新代码例子和说明,谢谢。

yongce commented 6 years ago

可以先在lintOtions中忽略此错误提示:disable 'WearableBindListener'

longjun3000 commented 6 years ago

好的,回头我试试,谢谢了。