Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[demo]:运行时remotebundle的RemoteBundleActivity无法打开,报ClassNotFoundException #378

Open
zhaonanrc opened this issue Dec 26, 2019 · 1 comment

Comments

@zhaonanrc
Copy link

tBuildConfig配置中添加:outOfApkBundles = ['remotebundle']
使用gradlew clean assembleDebug命令可以正常编译出so和apk
按照 说明拷贝libcom_taobao_remotebunle.so到
/sdcard/Android/data/com.taobao.demo/cache/libcom_taobao_remotebunle.so
然后给app sd卡权限,运行远程组件模拟app崩溃:

2019-12-26 15:45:31.090 8636-8636/com.taobao.demo E/AndroidRuntime: FATAL EXCEPTION: main
Process: com.taobao.demo, PID: 8636
java.lang.RuntimeException: Unable to instantiate activity ComponentInfo{com.taobao.demo/com.taobao.remotebunle.RemoteBundleActivity}: java.lang.ClassNotFoundException: Didn't find class "com.taobao.remotebunle.RemoteBundleActivity" on path: DexPathList[[zip file "/system/framework/org.apache.http.legacy.boot.jar", zip file "/data/app/com.taobao.demo-fMRu5k3YB_w8PzsjhhuN-g==/base.apk"],nativeLibraryDirectories=[/data/app/com.taobao.demo-fMRu5k3YB_w8PzsjhhuN-g==/lib/arm, /data/app/com.taobao.demo-fMRu5k3YB_w8PzsjhhuN-g==/base.apk!/lib/armeabi, /system/lib]]
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3019)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3256)
at android.app.servertransaction.LaunchActivityItem.execute(LaunchActivityItem.java:78)
at android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:108)
at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:68)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1947)
at android.os.Handler.dispatchMessage(Handler.java:106)
at android.os.Looper.loop(Looper.java:214)
at android.app.ActivityThread.main(ActivityThread.java:7037)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:494)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:965)
Caused by: java.lang.ClassNotFoundException: Didn't find class "com.taobao.remotebunle.RemoteBundleActivity" on path: DexPathList[[zip file "/system/framework/org.apache.http.legacy.boot.jar", zip file "/data/app/com.taobao.demo-fMRu5k3YB_w8PzsjhhuN-g==/base.apk"],nativeLibraryDirectories=[/data/app/com.taobao.demo-fMRu5k3YB_w8PzsjhhuN-g==/lib/arm, /data/app/com.taobao.demo-fMRu5k3YB_w8PzsjhhuN-g==/base.apk!/lib/armeabi, /system/lib]]
at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:134)
at java.lang.ClassLoader.loadClass(ClassLoader.java:379)
at java.lang.ClassLoader.loadClass(ClassLoader.java:312)
at android.app.AppComponentFactory.instantiateActivity(AppComponentFactory.java:69)
at android.app.Instrumentation.newActivity(Instrumentation.java:1215)

@shenxusheng
Copy link

同问,而且DemoApplication里的setClassNotFoundInterceptorCallback 方法报红没法用

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants