wequick / Small

A small framework to split app into small parts
http://code.wequick.net/Small
Apache License 2.0
5.04k stars 1.11k forks source link

加载res时出现异常及getExtractABI出现的异常 #135

Open 4gg opened 8 years ago

4gg commented 8 years ago

部分机型出现: FATAL EXCEPTION: Thread-83582 java.lang.NullPointerException at net.wequick.small.ApkBundleLauncher$ResourcesMerger.merge (ApkBundleLauncher.java:541) at net.wequick.small.ApkBundleLauncher.postSetUp(ApkBundleLauncher.java:342) at net.wequick.small.Bundle.loadBundles(Bundle.java:533) at net.wequick.small.Bundle.loadManifest(Bundle.java:201) at net.wequick.small.Bundle.loadBundles(Bundle.java:183) at net.wequick.small.Bundle.access$000(Bundle.java:63) at net.wequick.small.Bundle$LoadBundleThread.run(Bundle.java:504)

坑爹Nubia出现: FATAL EXCEPTION: main Process: com.uc108.doudizhu, PID: 7803 java.lang.RuntimeException: Unable to start activity ComponentInfo{com.uc108.doudizhu/net.wequick. example.small.app.main.MainActivity}: java.lang. ClassCastException: net.wequick.small. ApkBundleLauncher$ResourcesMerger cannot be cast to android.content.res.NubiaResources at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2263) at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2313) at android.app.ActivityThread.access$800(ActivityThread.java:147) at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1226) at android.os.Handler.dispatchMessage(Handler.java:102) at android.os.Looper.loop(Looper.java:136) at android.app.ActivityThread.main(ActivityThread.java:5137) 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:801) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:617) at dalvik.system.NativeStart.main(Native Method) Caused by: java.lang.ClassCastException: net.wequick.small. ApkBundleLauncher$ResourcesMerger cannot be cast to android.content.res.NubiaResources at android.app.ResourcesManager.getTopLevelResources(ResourcesManager.java:238) at android.app.ContextImpl.init(ContextImpl.java:2127) at android.app.ContextImpl.init(ContextImpl.java:2085) at android.app.ActivityThread.createBaseContextForActivity(ActivityThread.java:2275) at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2207) ... 11 more

2.3.7的手机上出现: FATAL EXCEPTION: Thread-11 java.lang.NullPointerException at net.wequick.small.util.JNIUtils.getExtractABI(JNIUtils.java:73) at net.wequick.small.ApkBundleLauncher.loadBundle(ApkBundleLauncher.java:390) at net.wequick.small.BundleLauncher.resolveBundle(BundleLauncher.java:106) at net.wequick.small.Bundle.prepareForLaunch(Bundle.java:361) at net.wequick.small.Bundle.loadBundles(Bundle.java:528) at net.wequick.small.Bundle.loadManifest(Bundle.java:201) at net.wequick.small.Bundle.loadBundles(Bundle.java:183) at net.wequick.small.Bundle.access$000(Bundle.java:63) at net.wequick.small.Bundle$LoadBundleThread.run(Bundle.java:504)

galenlin commented 8 years ago

问题1、2已解决,问题3代码上看似乎不可能空指针额。。

morganchenjp commented 8 years ago

请问, 问题2是如何解决的?

galenlin commented 8 years ago

@sail76 源码ApkBundleLauncher里有

morganchenjp commented 8 years ago

@galenlin 看到了, 多谢。