java - Building Google Maps example project with Android Studio 2.2.2 -


i have downloaded android studio 2.2.2 , try build example projects. blank activity project builds, deploys , runs on phone.

then try build google maps project. obtained api key, copied google_maps_api.xml , didn't change else. then, if press build -> build apk, fails following messages in gradle console:

executing tasks: [:app:assembledebug]  incremental java compilation incubating feature. :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: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: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 up-to-date :app:compiledebugndk up-to-date :app:compiledebugsources up-to-date :app:mergedebugshaders up-to-date :app:compiledebugshaders up-to-date :app:generatedebugassets up-to-date :app:mergedebugassets up-to-date :app:transformclasseswithdexfordebug failed  failure: build failed exception.  * went wrong: execution failed task ':app:transformclasseswithdexfordebug'. > com.android.build.api.transform.transformexception: com.android.ide.common.process.processexception: java.util.concurrent.executionexception: com.android.dex.dexindexoverflowexception: method id not in [0, 0xffff]: 65536  * try: run --stacktrace option stack trace. run --info or --debug option more log output.  build failed  total time: 53.036 secs 

first noticed "incremental java compilation incubating feature" message. maybe incremental compilation reason of failure? if so, how can disable it? didn't find in build.gradle , other gradle-related files.

and if incremental build not reason, , how fix it? this:

execution failed task ':app:transformclasseswithdexfordebug'.     > com.android.build.api.transform.transformexception: com.android.ide.common.process.processexception: java.util.concurrent.executionexception: com.android.dex.dexindexoverflowexception: method id not in [0, 0xffff]: 65536 

looks gradle internal error. right? here build.gradle:

buildscript {     repositories {         jcenter()     }     dependencies {         classpath 'com.android.tools.build:gradle:2.2.2'          // note: not place application dependencies here; belong         // in individual module build.gradle files     } }  allprojects {     repositories {         jcenter()     } }  task clean(type: delete) {     delete rootproject.builddir } 

com.android.dex.dexindexoverflowexception: method id not in [0, 0xffff]: 65536

you must enable multidex project total number of methods in build exceeds 65536. see configure apps on 64k methods


Comments

  1. Hi, Great.. Tutorial is just awesome..It is really helpful for a newbie like me.. I am a regular follower of your blog. Really very informative post you shared here. Kindly keep blogging. If anyone wants to become a Java developer learn from Java Training in Chennai. or learn thru Java Online Training from India . Nowadays Java has tons of job opportunities on various vertical industry.

    ReplyDelete

Post a Comment

Popular posts from this blog

java - SSE Emitter : Manage timeouts and complete() -

jquery - uncaught exception: DataTables Editor - remote hosting of code not allowed -

java - How to resolve error - package com.squareup.okhttp3 doesn't exist? -