Closed yang747046912 closed 7 years ago
The latest code seems to not working. It will still crash。
issue has been fixed, just because we hasn't released the new Amigo version yet
@yang747046912 please use 0.6.5
version, and add my personal maven url temporarily
buildscript {
repositories {
jcenter()
maven {
url "https://dl.bintray.com/jackcho/maven"
}
}
dependencies {
classpath 'me.ele:amigo:0.6.5'
}
}
allprojects {
repositories {
jcenter()
maven {
url "https://dl.bintray.com/jackcho/maven"
}
}
}
I use the source code in master branch to test this problem and it crashed!!
paste crash log please
FATAL EXCEPTION: main Process: me.ele.app.amigo, PID: 4432 java.lang.RuntimeException: Unable to instantiate activity ComponentInfo{me.ele.app.amigo/ele.aaa.ele}: java.lang.ClassNotFoundException: Didn't find class "ele.aaa.ele" on path: DexPathList[[dex file "dalvik.system.DexFile@429e68c8"],nativeLibraryDirectories=[/data/data/me.ele.app.amigo/files/amigo/4183123031/libs, /vendor/lib, /system/lib]] at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2367) at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2521) at android.app.ActivityThread.access$800(ActivityThread.java:172) at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1393) at android.os.Handler.dispatchMessage(Handler.java:110) at android.os.Looper.loop(Looper.java:193) at android.app.ActivityThread.main(ActivityThread.java:5468) at java.lang.reflect.Method.invokeNative(Native Method) at java.lang.reflect.Method.invoke(Method.java:515) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:860) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:676) at dalvik.system.NativeStart.main(Native Method) Caused by: java.lang.ClassNotFoundException: Didn't find class "ele.aaa.ele" on path: DexPathList[[dex file "dalvik.system.DexFile@429e68c8"],nativeLibraryDirectories=[/data/data/me.ele.app.amigo/files/amigo/4183123031/libs, /vendor/lib, /system/lib]] at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:56) at java.lang.ClassLoader.loadClass(ClassLoader.java:497) at java.lang.ClassLoader.loadClass(ClassLoader.java:457) at me.ele.amigo.AmigoClassLoader.loadClass(AmigoClassLoader.java:64) at android.app.Instrumentation.newActivity(Instrumentation.java:1061) at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2358) at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2521) at android.app.ActivityThread.access$800(ActivityThread.java:172) at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1393) at android.os.Handler.dispatchMessage(Handler.java:110) at android.os.Looper.loop(Looper.java:193) at android.app.ActivityThread.main(ActivityThread.java:5468) at java.lang.reflect.Method.invokeNative(Native Method) at java.lang.reflect.Method.invoke(Method.java:515) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:860) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:676) at dalvik.system.NativeStart.main(Native Method)
just like the Fourth step
@yang747046912 please help to check whether your issue is solved or not
@JackCho yes, with the last code ,it will not crash. thanks.
Here's how to review bug with demo
first. in AndroidManifest
Second. startactivity
Third. gradle runHost and gradlew preparePatch ,then let the patch effect
Fourth. click Test patched activity then the app will crash.
FATAL EXCEPTION: main Process: me.ele.app.amigo, PID: 29413 java.lang.RuntimeException: Unable to instantiate activity ComponentInfo{me.ele.app.amigo/ele.aaa.ele}: java.lang.ClassNotFoundException: Didn't find class "ele.aaa.ele" on path: DexPathList[[dex file "/data/data/me.ele.app.amigo/files/amigo/3384999164/dexes/classes.dex"],nativeLibraryDirectories=[/data/data/me.ele.app.amigo/files/amigo/3384999164/libs, /vendor/lib64, /system/lib64]] at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2371) at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2524) at android.app.ActivityThread.access$800(ActivityThread.java:167) at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1417) at android.os.Handler.dispatchMessage(Handler.java:111) at android.os.Looper.loop(Looper.java:194) at android.app.ActivityThread.main(ActivityThread.java:5536) at java.lang.reflect.Method.invoke(Native Method) at java.lang.reflect.Method.invoke(Method.java:372) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:955) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:750) Caused by: java.lang.ClassNotFoundException: Didn't find class "ele.aaa.ele" on path: DexPathList[[dex file "/data/data/me.ele.app.amigo/files/amigo/3384999164/dexes/classes.dex"],nativeLibraryDirectories=[/data/data/me.ele.app.amigo/files/amigo/3384999164/libs, /vendor/lib64, /system/lib64]] at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:56) at java.lang.ClassLoader.loadClass(ClassLoader.java:511) at java.lang.ClassLoader.loadClass(ClassLoader.java:469) at me.ele.amigo.AmigoClassLoader.loadClass(AmigoClassLoader.java:64) at android.app.Instrumentation.newActivity(Instrumentation.java:1070) at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2361) at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2524) at android.app.ActivityThread.access$800(ActivityThread.java:167) at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1417) at android.os.Handler.dispatchMessage(Handler.java:111) at android.os.Looper.loop(Looper.java:194) at android.app.ActivityThread.main(ActivityThread.java:5536) at java.lang.reflect.Method.invoke(Native Method) at java.lang.reflect.Method.invoke(Method.java:372) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:955) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:750) Suppressed: java.lang.ClassNotFoundException: ele.aaa.ele at java.lang.Class.classForName(Native Method) at java.lang.BootClassLoader.findClass(ClassLoader.java:781) at java.lang.BootClassLoader.loadClass(ClassLoader.java:841) at java.lang.ClassLoader.loadClass(ClassLoader.java:504) ... 14 more Caused by: java.lang.NoClassDefFoundError: Class not found using the boot class loader; no stack available
after work hard with Agmio ,I find the crash reason and fix it . This is the code (in AmigoCallback 84 line ). Is it all right? @JackCho