HTC M8 Unsatisfied Link Error after 5.0.1 update

試著忘記壹切 提交于 2019-12-29 14:04:13

问题


When trying to push an app to my device using Android studio, I'm getting the below log readout in AS about 80% of the time. Any clues?

Waiting for device.
Target device: htc-htc_one_m8-FA43NWM07298
Uploading file
local path: /Users/Pete/Development/github/myApp/app/build/outputs/apk/myApp_debug.apk
remote path: /data/local/tmp/com.my.app
Installing com.my.app
DEVICE SHELL COMMAND: pm install -r "/data/local/tmp/com.my.app"
java.lang.UnsatisfiedLinkError: No implementation found for java.lang.String android.os.SystemProperties.native_get(java.lang.String) (tried Java_android_os_SystemProperties_native_1get and Java_android_os_SystemProperties_native_1get__Ljava_lang_String_2)
at android.os.SystemProperties.native_get(Native Method)
at android.os.SystemProperties.get(SystemProperties.java:52)
at com.htc.customization.HtcCustomizationManager.<init>(HtcCustomizationManager.java:65)
at com.htc.customization.HtcCustomizationManager.<clinit>(HtcCustomizationManager.java:60)
at android.os.Environment$UserEnvironment.getCustomizationReader(Environment.java:523)
at android.os.Environment$UserEnvironment.isDynamicSwitchSupported(Environment.java:534)
at android.os.Environment$UserEnvironment.<init>(Environment.java:222)
at android.os.Environment.initForCurrentUser(Environment.java:142)
at android.os.Environment.<clinit>(Environment.java:136)
at android.os.Environment.getLegacyExternalStorageDirectory(Environment.java:726)
at android.os.Debug.<clinit>(Debug.java:96)
at android.ddm.DdmHandleHello.handleHELO(DdmHandleHello.java:164)
at android.ddm.DdmHandleHello.handleChunk(DdmHandleHello.java:91)
at org.apache.harmony.dalvik.ddmc.DdmServer.dispatch(DdmServer.java:171)
java.lang.UnsatisfiedLinkError: android.os.Debug
at android.ddm.DdmHandleHello.handleFEAT(DdmHandleHello.java:176)
at android.ddm.DdmHandleHello.handleChunk(DdmHandleHello.java:93)
at org.apache.harmony.dalvik.ddmc.DdmServer.dispatch(DdmServer.java:171)
java.lang.UnsatisfiedLinkError: android.os.Debug
at android.ddm.DdmHandleProfiling.handleMPRQ(DdmHandleProfiling.java:215)
at android.ddm.DdmHandleProfiling.handleChunk(DdmHandleProfiling.java:106)
at org.apache.harmony.dalvik.ddmc.DdmServer.dispatch(DdmServer.java:171)
Aborted

回答1:


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).




回答2:


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 :/.




回答3:


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".




回答4:


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.




回答5:


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)



来源:https://stackoverflow.com/questions/28840692/htc-m8-unsatisfied-link-error-after-5-0-1-update

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