找不到java.lang.String的实现android.os.SystemProperties.native_get(java.lang.String)

Ank*_*wal 8 android android-5.0-lollipop

每次在设备上安装应用程序时都会收到错误消息.

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
Run Code Online (Sandbox Code Playgroud)

解决方案:

  1. 清理项目并重建.
  2. 无效/重启选项.
  3. 卸载旧的apk并尝试重新安装.
  4. 更新5.0.1之后的HTC M8不满意链接错误遵循此链接答案.
  5. 升级到Lollipop后无法测试应用程序关注此链接也是如此.

装置:Micromax Os:5.0

isa*_*ent 13

我在使用Android 5.0的Micromax AQ 5001上遇到了同样的问题.Android Studio 2.3.1下的解决方案是工具 - > Android - >启用ADB集成 - >取消选中.如果需要在设备上成功安装后调试项目,则可以返回此检查.


Dan*_*l X 5

在“开发人员选项”中关闭“通过 USB 验证应用程序”。如果它不起作用,请尝试在开发人员选项中撤销 USB 调试授权

..回答太晚了,希望这可以帮助将来的人