android 编译、运行遇到的各种问题

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


android 编译、运行遇到的各种问题_第1张图片

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)方法

你可能感兴趣的:(android 编译、运行遇到的各种问题)