HTC M8 Unsatisfied Link Error after 5.0.1 update

丶灬走出姿态 提交于 2019-11-29 22:18:12

I am encountering the same problem. Wasn't able to solve it. But my terminal is always open and every time it happens I just reinstall with adb to avoid the Android Studio recompile time:

.../sdk/platform-tools/adb install -r .../build/outputs/apk/app-debug.apk

And usually it works. If it fails again, just run this command again (UP ARROW is your friend).

It happens on Lollipop 5.0.2 on the M7 as well. I've found that if you kill the app before deploying, it works out most of the time, and if you have the app open (or running on the background) it will fail a lot, with that error. And it is frustrating because sometimes after that failed, the IDE issues the command for starting the Activity and you see it on your phone so you assume everything went alright, but you're just seeing the last version started.

I've not been able to fix the problem, as I said killing the app from the task manager helps. I've installed CyanogenMod 12 (lollipop as well) on my device as a dual-boot since, and the issue doesn't occur there, so I'm pretty sure it is HTC's fault. I use CM12 now for development since it was costing me too much time :/.

I was facing the same error on Asus Zenfone 5 (ASUS_T00J) with Android 5.0. For me the solution was to switch off the "Verify Apps over USB" in the "Developer Options".

I worked around this by editing the Run configuration for launching the Android app by adding two "Before launch" build step which kills the app. Because the first one often fails I added it twice.

So click the Plus sign under "Before launch", Plus sign again to create a new step (the Create Tool dialog opens). Fill out the following:

  • Name: "Kill my app"
  • Program c:\your\android-sdk\platform-tools\adb.exe
  • Paramteres shell am force-stop com.your.app

(Change to the path of your ADB installation and the package name of your app)

Add this step twice before Make

edit: Turned out this method wasn't bulletproof either, but it reduced the frequence of the error.

I have an HTC M8 too. Just do a "Clean" and run your project again ! it works for me. (sometimes you need also to reconnect your device)

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