为什么我在运行谷歌地图活动时收到此错误?

时间:2016-11-07 05:34:46

标签: android

我第一次尝试运行googlemap活动..,有人能说我为什么会收到错误吗?我还发布了我的整个事件日志?请帮我。提前谢谢。

以下是我的整个活动日志消息供您细读...请帮助。非常感谢提前。

Observed package id 'add-ons;addon-google_apis-google-23' in inconsistent location 'C:\Users\Arun\AppData\Local\Android\Sdk\add-ons\addon-google_apis-google-23-1' (Expected 'C:\Users\Arun\AppData\Local\Android\Sdk\add-ons\addon-google_apis-google-23')
    Already observed package id 'add-ons;addon-google_apis-google-23' in 'C:\Users\Arun\AppData\Local\Android\Sdk\add-ons\addon-google_apis-google-23'. Skipping duplicate at 'C:\Users\Arun\AppData\Local\Android\Sdk\add-ons\addon-google_apis-google-23-1'
    :app:preBuild UP-TO-DATE
    :app:preDebugBuild UP-TO-DATE
    :app:checkDebugManifest
    :app:preReleaseBuild UP-TO-DATE
    :app:prepareComAndroidSupportAnimatedVectorDrawable2500Library UP-TO-DATE
    :app:prepareComAndroidSupportAppcompatV72500Library UP-TO-DATE
    :app:prepareComAndroidSupportMediarouterV72400Library UP-TO-DATE
    :app:prepareComAndroidSupportMultidex101Library UP-TO-DATE
    :app:prepareComAndroidSupportPaletteV72400Library UP-TO-DATE
    :app:prepareComAndroidSupportSupportCompat2500Library UP-TO-DATE
    :app:prepareComAndroidSupportSupportCoreUi2500Library UP-TO-DATE
    :app:prepareComAndroidSupportSupportCoreUtils2500Library UP-TO-DATE
    :app:prepareComAndroidSupportSupportFragment2500Library UP-TO-DATE
    :app:prepareComAndroidSupportSupportMediaCompat2500Library UP-TO-DATE
    :app:prepareComAndroidSupportSupportV42500Library UP-TO-DATE
    :app:prepareComAndroidSupportSupportVectorDrawable2500Library UP-TO-DATE
    :app:prepareComGoogleAndroidGmsPlayServices980Library UP-TO-DATE
    :app:prepareComGoogleAndroidGmsPlayServicesAds980Library UP-TO-DATE
    :app:prepareComGoogleAndroidGmsPlayServicesAdsLite980Library UP-TO-DATE
    :app:prepareComGoogleAndroidGmsPlayServicesAnalytics980Library UP-TO-DATE
    :app:prepareComGoogleAndroidGmsPlayServicesAnalyticsImpl980Library UP-TO-DATE
    :app:prepareComGoogleAndroidGmsPlayServicesAppindexing980Library UP-TO-DATE
    :app:prepareComGoogleAndroidGmsPlayServicesAppinvite980Library UP-TO-DATE
    :app:prepareComGoogleAndroidGmsPlayServicesAuth980Library UP-TO-DATE
    :app:prepareComGoogleAndroidGmsPlayServicesAuthBase980Library UP-TO-DATE
    :app:prepareComGoogleAndroidGmsPlayServicesAwareness980Library UP-TO-DATE
    :app:prepareComGoogleAndroidGmsPlayServicesBase980Library UP-TO-DATE
    :app:prepareComGoogleAndroidGmsPlayServicesBasement980Library UP-TO-DATE
    :app:prepareComGoogleAndroidGmsPlayServicesCast980Library UP-TO-DATE
    :app:prepareComGoogleAndroidGmsPlayServicesCastFramework980Library UP-TO-DATE
    :app:prepareComGoogleAndroidGmsPlayServicesClearcut980Library UP-TO-DATE
    :app:prepareComGoogleAndroidGmsPlayServicesDrive980Library UP-TO-DATE
    :app:prepareComGoogleAndroidGmsPlayServicesFitness980Library UP-TO-DATE
    :app:prepareComGoogleAndroidGmsPlayServicesGames980Library UP-TO-DATE
    :app:prepareComGoogleAndroidGmsPlayServicesGass980Library UP-TO-DATE
    :app:prepareComGoogleAndroidGmsPlayServicesGcm980Library UP-TO-DATE
    :app:prepareComGoogleAndroidGmsPlayServicesIdentity980Library UP-TO-DATE
    :app:prepareComGoogleAndroidGmsPlayServicesIid980Library UP-TO-DATE
    :app:prepareComGoogleAndroidGmsPlayServicesInstantapps980Library UP-TO-DATE
    :app:prepareComGoogleAndroidGmsPlayServicesLocation980Library UP-TO-DATE
    :app:prepareComGoogleAndroidGmsPlayServicesMaps980Library UP-TO-DATE
    :app:prepareComGoogleAndroidGmsPlayServicesNearby980Library UP-TO-DATE
    :app:prepareComGoogleAndroidGmsPlayServicesPanorama980Library UP-TO-DATE
    :app:prepareComGoogleAndroidGmsPlayServicesPlaces980Library UP-TO-DATE
    :app:prepareComGoogleAndroidGmsPlayServicesPlus980Library UP-TO-DATE
    :app:prepareComGoogleAndroidGmsPlayServicesSafetynet980Library UP-TO-DATE
    :app:prepareComGoogleAndroidGmsPlayServicesTagmanager980Library UP-TO-DATE
    :app:prepareComGoogleAndroidGmsPlayServicesTagmanagerApi980Library UP-TO-DATE
    :app:prepareComGoogleAndroidGmsPlayServicesTasks980Library UP-TO-DATE
    :app:prepareComGoogleAndroidGmsPlayServicesVision980Library UP-TO-DATE
    :app:prepareComGoogleAndroidGmsPlayServicesWallet980Library UP-TO-DATE
    :app:prepareComGoogleAndroidGmsPlayServicesWearable980Library UP-TO-DATE
    :app:prepareComGoogleFirebaseFirebaseAnalytics980Library UP-TO-DATE
    :app:prepareComGoogleFirebaseFirebaseAnalyticsImpl980Library UP-TO-DATE
    :app:prepareComGoogleFirebaseFirebaseAuth980Library UP-TO-DATE
    :app:prepareComGoogleFirebaseFirebaseAuthCommon980Library UP-TO-DATE
    :app:prepareComGoogleFirebaseFirebaseAuthModule980Library UP-TO-DATE
    :app:prepareComGoogleFirebaseFirebaseCommon980Library UP-TO-DATE
    :app:prepareComGoogleFirebaseFirebaseConfig980Library UP-TO-DATE
    :app:prepareComGoogleFirebaseFirebaseCrash980Library UP-TO-DATE
    :app:prepareComGoogleFirebaseFirebaseDatabase980Library UP-TO-DATE
    :app:prepareComGoogleFirebaseFirebaseDatabaseConnection980Library UP-TO-DATE
    :app:prepareComGoogleFirebaseFirebaseIid980Library UP-TO-DATE
    :app:prepareComGoogleFirebaseFirebaseMessaging980Library UP-TO-DATE
    :app:prepareComGoogleFirebaseFirebaseStorage980Library UP-TO-DATE
    :app:prepareComGoogleFirebaseFirebaseStorageCommon980Library UP-TO-DATE
    :app:prepareDebugDependencies
    :app:compileDebugAidl UP-TO-DATE
    :app:compileDebugRenderscript UP-TO-DATE
    :app:generateDebugBuildConfig UP-TO-DATE
    :app:mergeDebugShaders UP-TO-DATE
    :app:compileDebugShaders UP-TO-DATE
    :app:generateDebugAssets UP-TO-DATE
    :app:mergeDebugAssets UP-TO-DATE
    :app:generateDebugResValues UP-TO-DATE
    :app:generateDebugResources UP-TO-DATE
    :app:mergeDebugResources UP-TO-DATE
    :app:processDebugManifest UP-TO-DATE
    :app:processDebugResources UP-TO-DATE
    :app:generateDebugSources UP-TO-DATE
    :app:incrementalDebugJavaCompilationSafeguard UP-TO-DATE
    :app:compileDebugJavaWithJavac
    None of the classes needs to be compiled! Analysis took 0.443 secs. 
    :app:compileDebugNdk UP-TO-DATE
    :app:compileDebugSources
    :app:prePackageMarkerForDebug
    :app:transformClassesWithJarMergingForDebug
    :app:collectDebugMultiDexComponents
    :app:transformClassesWithMultidexlistForDebug
    ProGuard, version 5.2.1
    Reading program jar [C:\Users\Arun\AndroidStudioProjects\Arunmap\app\build\intermediates\transforms\jarMerging\debug\jars\1\1f\combined.jar]
    Reading library jar [C:\Users\Arun\AppData\Local\Android\sdk\build-tools\25.0.0\lib\shrinkedAndroid.jar]
    Preparing output jar [C:\Users\Arun\AndroidStudioProjects\Arunmap\app\build\intermediates\multi-dex\debug\componentClasses.jar]
      Copying resources from program jar [C:\Users\Arun\AndroidStudioProjects\Arunmap\app\build\intermediates\transforms\jarMerging\debug\jars\1\1f\combined.jar]
    :app:transformClassesWithDexForDebug
    To run dex in process, the Gradle daemon needs a larger heap.
    It currently has approximately 910 MB.
    For faster builds, increase the maximum heap size for the Gradle daemon to more than 2048 MB.
    To do this set org.gradle.jvmargs=-Xmx2048M in the project gradle.properties.
    For more information see https://docs.gradle.org/current/userguide/build_environment.html
    Error:UNEXPECTED TOP-LEVEL ERROR:
    Error:java.lang.OutOfMemoryError: GC overhead limit exceeded
    Error:  at com.android.dx.rop.cst.CstString.utf8BytesToString(CstString.java:158)
    Error:  at com.android.dx.rop.cst.CstString.<init>(CstString.java:200)
    Error:  at com.android.dx.cf.cst.ConstantPoolParser.parseUtf8(ConstantPoolParser.java:371)
    Error:  at com.android.dx.cf.cst.ConstantPoolParser.parse0(ConstantPoolParser.java:262)
    Error:  at com.android.dx.cf.cst.ConstantPoolParser.parse0(ConstantPoolParser.java:325)
    Error:  at com.android.dx.cf.cst.ConstantPoolParser.parse0(ConstantPoolParser.java:309)
    Error:  at com.android.dx.cf.cst.ConstantPoolParser.parse(ConstantPoolParser.java:150)
    Error:  at com.android.dx.cf.cst.ConstantPoolParser.parseIfNecessary(ConstantPoolParser.java:124)
    Error:  at com.android.dx.cf.cst.ConstantPoolParser.getPool(ConstantPoolParser.java:115)
    Error:  at com.android.dx.cf.direct.DirectClassFile.parse0(DirectClassFile.java:491)
    Error:  at com.android.dx.cf.direct.DirectClassFile.parse(DirectClassFile.java:406)
    Error:  at com.android.dx.cf.direct.DirectClassFile.parseToInterfacesIfNecessary(DirectClassFile.java:388)
    Error:  at com.android.dx.cf.direct.DirectClassFile.getMagic(DirectClassFile.java:251)
    Error:  at com.android.dx.command.dexer.Main.parseClass(Main.java:772)
    Error:  at com.android.dx.command.dexer.Main.access$1500(Main.java:85)
    Error:  at com.android.dx.command.dexer.Main$ClassParserTask.call(Main.java:1700)
    Error:  at com.android.dx.command.dexer.Main.processClass(Main.java:755)
    Error:  at com.android.dx.command.dexer.Main.processFileBytes(Main.java:723)
    Error:  at com.android.dx.command.dexer.Main.access$1200(Main.java:85)
    Error:  at com.android.dx.command.dexer.Main$FileBytesConsumer.processFileBytes(Main.java:1653)
    Error:  at com.android.dx.cf.direct.ClassPathOpener.processArchive(ClassPathOpener.java:284)
    Error:  at com.android.dx.cf.direct.ClassPathOpener.processOne(ClassPathOpener.java:166)
    Error:  at com.android.dx.cf.direct.ClassPathOpener.process(ClassPathOpener.java:144)
    Error:  at com.android.dx.command.dexer.Main.processOne(Main.java:677)
    Error:  at com.android.dx.command.dexer.Main.processAllFiles(Main.java:569)
    Error:  at com.android.dx.command.dexer.Main.runMultiDex(Main.java:366)
    Error:  at com.android.dx.command.dexer.Main.run(Main.java:275)
    Error:  at com.android.dx.command.dexer.Main.main(Main.java:245)
    Error:  at com.android.dx.command.Main.main(Main.java:106)
    :app:transformClassesWithDexForDebug FAILED
    Error:Execution failed for task ':app:transformClassesWithDexForDebug'.
    > com.android.build.api.transform.TransformException: com.android.ide.common.process.ProcessException: java.util.concurrent.ExecutionException: com.android.ide.common.process.ProcessException: org.gradle.process.internal.ExecException: Process 'command 'C:\Program Files\Java\jdk1.8.0_101\bin\java.exe'' finished with non-zero exit value 3

1 个答案:

答案 0 :(得分:0)

您必须更改gradle.properties文件。取消注释这一行

org.gradle.jvmargs=-Xmx2048m -XX:MaxPermSize=512m -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8

并增加此值:org.gradle.jvmargs=-Xmx2048m