当前位置:网站首页>Solution to the problem of compilation error due to repeated third-party package names

Solution to the problem of compilation error due to repeated third-party package names

2022-06-26 10:15:00 Shake half a bottle of vinegar

I wonder if there is something wrong with the method I use , Simultaneous introduction QQ Third party libraries for sharing and wechat sharing , Because the package name is duplicate , Cause compilation times com.android.ide.common.process.ProcessException: org.gradle.process.internal.ExecException: Process 'command 'C:\Program Files\Java\jdk1.8.0_45\bin\java.exe'' finished with non-zero exit value 2 Error of . To solve this problem ,

stay gradle Add... To the file multiDexEnabled true attribute . Here's an introduction multiDexEnabled The concept of .

multiDexEnabled, namely many dex Support , Used to solve the problem of duplicate package names of third-party libraries , Or the program is too big , exceed 65536 Resulting problems . In the use of multiDexEnabled Attribute , Need to application Inherit MultiDexApplication class , perhaps Overwrite the Application Medium attachBaseContext() Method , Increase in MultiDex.install(this);

  This solution has not found any problems for the time being , When a problem occurs, it will be added here . If someone uses it like this, it will cause other problems , Please comment and remind , thank you .

原网站

版权声明
本文为[Shake half a bottle of vinegar]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/02/202202170546557762.html