问题
Getting the error whenever I install the app on the device.
03/24 18:56:08: Launching app
$ adb push /home/itstym/AndroidStudioProjects/hlthee/app/build/outputs/apk/app-debug.apk /data/local/tmp/user.com.hlthee
$ adb shell pm install -r "/data/local/tmp/user.com.hlthee"
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 android.os.Environment.getCanonicalPathOrNull(Environment.java:832)
at android.os.Environment.<clinit>(Environment.java:78)
at android.os.Environment.getLegacyExternalStorageDirectory(Environment.java:419)
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:187)
at android.ddm.DdmHandleProfiling.handleChunk(DdmHandleProfiling.java:88)
at org.apache.harmony.dalvik.ddmc.DdmServer.dispatch(DdmServer.java:171)
Aborted
$ adb shell am start -n "user.com.hlthee/user.com.hlthee.WelcomeActivity" -a android.intent.action.MAIN -c android.intent.category.LAUNCHER
Error while executing: am start -n "user.com.hlthee/user.com.hlthee.WelcomeActivity" -a android.intent.action.MAIN -c android.intent.category.LAUNCHER
Starting: Intent { act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] cmp=user.com.hlthee/.WelcomeActivity }
Error type 3
Error: Activity class {user.com.hlthee/user.com.hlthee.WelcomeActivity} does not exist.
Error while Launching activity
Solution tried:
- Clean the project and rebuild.
- Invalidate/Restart option.
- Uninstall the old apk and tried to install again.
- HTC M8 Unsatisfied Link Error after 5.0.1 update followed this link answer.
- Unable to test app after upgrading to Lollipop Followed this links answer too.
Device: Micromax Os: 5.0
回答1:
I have the same problem on my Micromax AQ 5001 with Android 5.0. The solution under Android Studio 2.3.1 is Tools -> Android -> Enable ADB integration -> uncheck. You can return this check back if you need to debug your project after successful installation on device.
回答2:
switch off the "Verify Apps over USB" in the "Developer Options". If it does not work then try Revoke USB debugging authorizations in the Developer Options
..Answered too late , Hope this may help someone in the future
回答3:
On the Asus Zenfone 2, simply disabling Instant Run fixed this for me.
Settings -> Build, Execution, Deployment -> Instant Run (uncheck the checkbox)
I was able to leave ADB integration enabled.
回答4:
Sometimes this problem can be caused if the folder in which your project is located has spaces in its project name. After I changed the project directory to a new folder with no spaces in the path name, everything started working fine.
My Android device was Micromax Canvas Doodle 4 running Lollipop (5.0). I was using Android Studio 3.1.
来源:https://stackoverflow.com/questions/43000901/no-implementation-found-for-java-lang-string-android-os-systemproperties-native