AndroidStudio Terminal的使用


gradlew  assembleDebug  --stacktrace

查看使用的依賴的

Execution failed for task ':app:transformClassesWithMultidexlistForDebug'.
> com.android.build.api.transform.TransformException: Error while generating the main dex list
這個問題多半是依賴重復導致的
在android studio Terminal 輸入 gradlew  assembleDebug  --stacktrace
來查到具體問題
例如:
Caused by: com.android.tools.r8.errors.CompilationError: Program type already present: it.s
ephiroth.android.library.imagezoom.ImageViewTouch$OnImageViewTouchDoubleTapListener
 
it.sephiroth.android.library.imagezoom。這個包重復。
解決辦法:
1、自己添加了兩個:
刪掉一個就可以。
2、如果是在第三包里有引用,自己又引入(在哪個第三方的這個不好找,憑自覺了)
刪掉自己引入的或把第三方里面的去除
api  ('com.xxx.xxxx.xxx'){
    exclude group: 'it.sephiroth.android.library.imagezoom'
}


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM