lanshifu / multidextest Goto Github PK
View Code? Open in Web Editor NEWMultiDex
MultiDex
这个跟MultiDexApplication有啥区别吗
BRAND = samsung
MODEL = SM-G3588V
PRODUCT = victorltezm
ANDROID_VERSION = 4.3 ( API:18)
VERSION_NAME = 1.0.0
VERSION_CODE = 1
java.lang.NoClassDefFoundError: java.util.Objects
at okhttp3.CertificatePinner.withCertificateChainCleaner(CertificatePinner.java:231)
at okhttp3.OkHttpClient.(OkHttpClient.java:238)
at okhttp3.OkHttpClient$Builder.build(OkHttpClient.java:1015)
at com.common.library.task.glide.GlideConfiguration.registerComponents(GlideConfiguration.java:77)
at com.bumptech.glide.GeneratedAppGlideModuleImpl.registerComponents(GeneratedAppGlideModuleImpl.java:29)
at com.bumptech.glide.Glide.initializeGlide(Glide.java:302)
at com.bumptech.glide.Glide.initializeGlide(Glide.java:239)
at com.bumptech.glide.Glide.checkAndInitializeGlide(Glide.java:198)
at com.bumptech.glide.Glide.get(Glide.java:179)
at com.bumptech.glide.Glide.getRetriever(Glide.java:714)
at com.bumptech.glide.Glide.with(Glide.java:753)
at com.common.library.task.glide.GlideApp.with(GlideApp.java:94)
at com.common.library.utils.glide.GlideUtils.resumeRequests(GlideUtils.java:51)
at com.common.library.base.BaseActivity.onResume(BaseActivity.java:215)
at android.app.Instrumentation.callActivityOnResume(Instrumentation.java:1209)
at android.app.Activity.performResume(Activity.java:5450)
at android.app.ActivityThread.performResumeActivity(ActivityThread.java:2925)
at android.app.ActivityThread.handleResumeActivity(ActivityThread.java:2969)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2367)
at android.app.ActivityThread.access$700(ActivityThread.java:168)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1329)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:177)
at android.app.ActivityThread.main(ActivityThread.java:5496)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:525)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1225)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1041)
at dalvik.system.NativeStart.main(Native Method)
checkUntilLoadDexSuccess方法中的i变量都没有改变,加个i>40判断不是永远都进不去吗?
/**
* 检查MultiDex是否安装完,通过判断临时文件是否被删除
* @param context
* @return
*/
private void checkUntilLoadDexSuccess(Context context) {
File file = new File(context.getCacheDir().getAbsolutePath(), "load_dex.tmp");
int i = 0;
int waitTime = 100; //睡眠时间
try {
Log.d(TAG, "checkUntilLoadDexSuccess: >>> ");
while (file.exists()) {
Thread.sleep(waitTime);
Log.d(TAG, "checkUntilLoadDexSuccess: sleep count = " + ++i);
if (i > 40) {
Log.d(TAG, "checkUntilLoadDexSuccess: 超时,等待时间: " + (waitTime * i));
break;
}
}
Log.d(TAG, "checkUntilLoadDexSuccess: 轮循结束,等待时间 " +(waitTime * i));
}catch (Exception e){
e.printStackTrace();
}
}
进程间的数据不都是隔离的吗?在子进程加载的dex,在主进程也会生效? 这个问题困扰了我两天了,网上还没有类似的解答。
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.