1.dexDebug ExecException finished with non-zero exit value 2
須要在gradle中配置下面的代碼,緣由是引用了多個libraries文件
defaultConfig {
multiDexEnabled true
}
2.Execution failed for task ':app:transformClassesWithJarMergingForDebug'.
> com.android.build.api.transform.TransformException: java.util.zip.ZipException: duplicate entry: android/support/v4/app/BackStackState$1.class
緣由:在所添加的jar包或aar包中也引用了support-V4,與工程中引用的相沖突
Ctrl+N --> 在搜索框中輸入BackStackState --> 查找到全部引用該類的類,這些類即爲引發衝突的類去掉本工程中gradle中用於引用有衝突的包的代碼或者將衝突的代碼從jar包或aar包中移除,確保一個module中只引用了一份相同的第三方包3.project sturcture和Project Structure 不管是按快捷鍵或者是從files中打開都不顯示event log中報:IllegalArgumentException:Multiple entries with same key: Google Inc.:Google APIs:23=Google APIs (Google Inc.) (API 23) and Google Inc.:Google APIs:23=Google APIs (Google Inc.) (API 23)解決辦法:先看一下系統配置的SDK的位置和Android Studio所用的路徑是否一致,若是不一致從新配置系統的SDK路徑或者是從新修改Android Studio的SDK路徑經過SDK Manager刪除掉google API23若是解決不了,卸載android studio -->從新安裝 ,還有問題點擊File --> Invalidate Cashes/Restart --> Invalidate and Restart,解決不了繼續經過SDK Manager刪除掉google API23