1.運行時遇到 Error:Uncaught translation error: java.util.concurrent.ExecutionException: java.lang.OutOfMemoryError: GC overhead limit exceeded錯誤和 To run dex in process, the Gradle daemon needs a larger heap. 警告 ?在build.gragle中加入下面方法,測試ok
dexOptions {
javaMaxHeapSize"4g"
}
lintOptions {
checkReleaseBuildsfalse
abortOnErrorfalse
}
2. 用firebas 遇到 Default FirebaseApp is not initialized in this process com.shidaiyinuo.YNHospitalUser:QALSERVICE. Make sure to call FirebaseApp.initializeApp(Context) first 問題 需要在調用前 調用FirebaseApp.initializeApp(this)方法