Error like this
Information:Gradle tasks [:app:assembleDebug]
:app:preBuild UP-TO-DATE
:app:preDebugBuild UP-TO-DATE
:app:checkDebugManifest
:app:preReleaseBuild UP-TO-DATE
:app:prepareComAndroidSupportAppcompatV72311Library UP-TO-DATE
:app:prepareComAndroidSupportDesign2311Library UP-TO-DATE
:app:prepareComAndroidSupportMediarouterV72300Library UP-TO-DATE
:app:prepareComAndroidSupportRecyclerviewV72311Library UP-TO-DATE
:app:prepareComAndroidSupportSupportV42311Library UP-TO-DATE
:app:prepareComFacebookAndroidFacebookAndroidSdk420Library UP-TO-DATE
:app:prepareComGoogleAndroidGmsPlayServices840Library UP-TO-DATE
:app:prepareComGoogleAndroidGmsPlayServicesAds840Library UP-TO-DATE
:app:prepareComGoogleAndroidGmsPlayServicesAnalytics840Library UP-TO-DATE
:app:prepareComGoogleAndroidGmsPlayServicesAppindexing840Library UP-TO-DATE
:app:prepareComGoogleAndroidGmsPlayServicesAppinvite840Library UP-TO-DATE
:app:prepareComGoogleAndroidGmsPlayServicesAppstate840Library UP-TO-DATE
:app:prepareComGoogleAndroidGmsPlayServicesAuth840Library UP-TO-DATE
:app:prepareComGoogleAndroidGmsPlayServicesBase840Library UP-TO-DATE
:app:prepareComGoogleAndroidGmsPlayServicesBasement840Library UP-TO-DATE
:app:prepareComGoogleAndroidGmsPlayServicesCast840Library UP-TO-DATE
:app:prepareComGoogleAndroidGmsPlayServicesDrive840Library UP-TO-DATE
:app:prepareComGoogleAndroidGmsPlayServicesFitness840Library UP-TO-DATE
:app:prepareComGoogleAndroidGmsPlayServicesGames840Library UP-TO-DATE
:app:prepareComGoogleAndroidGmsPlayServicesGcm840Library UP-TO-DATE
:app:prepareComGoogleAndroidGmsPlayServicesIdentity840Library UP-TO-DATE
:app:prepareComGoogleAndroidGmsPlayServicesLocation840Library UP-TO-DATE
:app:prepareComGoogleAndroidGmsPlayServicesMaps840Library UP-TO-DATE
:app:prepareComGoogleAndroidGmsPlayServicesMeasurement840Library UP-TO-DATE
:app:prepareComGoogleAndroidGmsPlayServicesNearby840Library UP-TO-DATE
:app:prepareComGoogleAndroidGmsPlayServicesPanorama840Library UP-TO-DATE
:app:prepareComGoogleAndroidGmsPlayServicesPlus840Library UP-TO-DATE
:app:prepareComGoogleAndroidGmsPlayServicesSafetynet840Library UP-TO-DATE
:app:prepareComGoogleAndroidGmsPlayServicesVision840Library UP-TO-DATE
:app:prepareComGoogleAndroidGmsPlayServicesWallet840Library UP-TO-DATE
:app:prepareComGoogleAndroidGmsPlayServicesWearable840Library 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
Note: C:\Users\rockstar\Desktop\AstroMaze\app\src\main\java\com\org\astromaze\MainActivityUsers.java uses or overrides a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Incremental compilation of 6 classes completed in 2.053 secs.
:app:compileDebugNdk UP-TO-DATE
:app:compileDebugSources
:app:prePackageMarkerForDebug
: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:The number of method references in a .dex file cannot exceed 64K.
Learn how to resolve this issue at https://developer.android.com/tools/building/multidex.html
: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_91\bin\java.exe'' finished with non-zero exit value 2
Information:BUILD FAILED
Information:Total time: 17.268 secs
Information:2 errors
Information:0 warnings
Information:See complete output in console
Basically Your errors are :-
1) Error:Execution failed for task ':app:transformClassesWithDexForDebug'.
2) Error:The number of method references in a .dex file cannot exceed 64K.
Solutions to these errors are as follows :-
1) add multiDexEnabled true line in your build.gradle(Module:app) inside defaultConfig
2) Replace the whole content of gradle.properties file with below :-
# Project-wide Gradle settings.
# IDE (e.g. Android Studio) users:
# Gradle settings configured through the IDE *will override*
# any settings specified in this file.
# For more details on how to configure your build environment visit
# http://www.gradle.org/docs/current/userguide/build_environment.html
# Specifies the JVM arguments used for the daemon process.
# The setting is particularly useful for tweaking memory settings.
# Default value: -Xmx10248m -XX:MaxPermSize=256m
# org.gradle.jvmargs=-Xmx2048m -XX:MaxPermSize=512m -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8
# When configured, Gradle will run in incubating parallel mode.
# This option should only be used with decoupled projects. More details, visit
# http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
# org.gradle.parallel=true
3) Go to Help > Edit Custom VM Options , if the file with extension .vmoptions opens then replace content of the file with the below content , if the file is not there then create one and then replace the content with this :-
# custom Android Studio VM options
#
# *DO NOT* modify this file directly. If there is a value that you would like to override,
# please add it to your user specific configuration file.
#
# See http://tools.android.com/tech-docs/configuration
#
-Xms256m
-Xmx750m
-XX:MaxPermSize=350m
-XX:ReservedCodeCacheSize=240m
-XX:+UseConcMarkSweepGC
-XX:SoftRefLRUPolicyMSPerMB=50
-da
-Djna.nosys=true
-Djna.boot.library.path=
-Djna.debug_load=true
-Djna.debug_load.jna=true
-Dsun.io.useCanonCaches=false
-Djava.net.preferIPv4Stack=true
-XX:+HeapDumpOnOutOfMemoryError
-Didea.paths.selector=AndroidStudio2.1
-Didea.platform.prefix=AndroidStudio
All your errors will be resolved .
Good Luck .
Related
I have tried to run the googlemap activity for the first time.., Can anybody say why i am getting thees errors? I have also posted my entire event logs? Please help me. Thanks in advance.
Here is my entire event log messages for your kind perusal...Please help. Many thanks in advance.
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
you have to change your gradle.properties file. uncomment this line
org.gradle.jvmargs=-Xmx2048m -XX:MaxPermSize=512m -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8
and increase this value: org.gradle.jvmargs=-Xmx2048m
I have problems with adding Lucene 6.2.0 to my Android Studio 2.1.2 project. However, adding this library to IntelliJ IDEA is not a problem. I tried copying Lucene files to my libs folder and then adding jar files listed here as libraries (Right click => Add as library). Build.gradle was looking fine:
compile files('libs/lucene-6.2.0/queryparser/lucene-queryparser-6.2.0.jar')
compile files('libs/lucene-6.2.0/demo/lucene-demo-6.2.0.jar')
compile files('libs/lucene-6.2.0/core/lucene-core-6.2.0.jar')
compile files('libs/lucene-6.2.0/analysis/common/lucene-analyzers-common-6.2.0.jar')
Information:Gradle tasks [:app:clean, :app:generateDebugSources, :app:mockableAndroidJar, :app:prepareDebugUnitTestDependencies, :app:generateDebugAndroidTestSources, :app:assembleDebug]
:app:clean
:app:preBuild UP-TO-DATE
:app:preDebugBuild UP-TO-DATE
:app:checkDebugManifest
:app:preReleaseBuild UP-TO-DATE
:app:prepareComAndroidSupportAnimatedVectorDrawable2400Library
:app:prepareComAndroidSupportAppcompatV72400Library
:app:prepareComAndroidSupportCardviewV72340Library
:app:prepareComAndroidSupportCustomtabs2340Library
:app:prepareComAndroidSupportDesign2400Library
:app:prepareComAndroidSupportRecyclerviewV72400Library
:app:prepareComAndroidSupportSupportV42400Library
:app:prepareComAndroidSupportSupportVectorDrawable2400Library
:app:prepareComFacebookAndroidFacebookAndroidSdk4150Library
:app:prepareDebugDependencies
:app:compileDebugAidl
:app:compileDebugRenderscript
:app:generateDebugBuildConfig
:app:mergeDebugShaders
:app:compileDebugShaders
:app:generateDebugAssets
:app:mergeDebugAssets
:app:generateDebugResValues UP-TO-DATE
:app:generateDebugResources
:app:mergeDebugResources
:app:processDebugManifest
:app:processDebugResources
:app:generateDebugSources
:app:mockableAndroidJar UP-TO-DATE
:app:preDebugUnitTestBuild UP-TO-DATE
:app:prepareDebugUnitTestDependencies
:app:preDebugAndroidTestBuild UP-TO-DATE
:app:prepareDebugAndroidTestDependencies
:app:compileDebugAndroidTestAidl
:app:processDebugAndroidTestManifest
:app:compileDebugAndroidTestRenderscript
:app:generateDebugAndroidTestBuildConfig
:app:mergeDebugAndroidTestShaders
:app:compileDebugAndroidTestShaders
:app:generateDebugAndroidTestAssets
:app:mergeDebugAndroidTestAssets
:app:generateDebugAndroidTestResValues UP-TO-DATE
:app:generateDebugAndroidTestResources
:app:mergeDebugAndroidTestResources
:app:processDebugAndroidTestResources
:app:generateDebugAndroidTestSources
:app:incrementalDebugJavaCompilationSafeguard
:app:compileDebugJavaWithJavac
:app:compileDebugJavaWithJavac - is not incremental (e.g. outputs have changed, no previous execution, etc.).
Note: C:\Users\Tomek\AndroidStudioProjects\UniversalSoundboard\app\src\main\java\com\tomaszstankowski\universalsoundboard\adapters\SoundListAdapter.java uses or overrides a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Note: C:\Users\Tomek\AndroidStudioProjects\UniversalSoundboard\app\src\main\java\com\tomaszstankowski\universalsoundboard\custom\singletons\SoundBank.java uses unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
:app:compileDebugNdk UP-TO-DATE
:app:compileDebugSources
:app:buildInfoDebugLoader
:app:transformClassesWithExtractJarsForDebug
:app:transformClassesWithInstantRunVerifierForDebug
:app:transformClassesWithJavaResourcesVerifierForDebug
:app:mergeDebugJniLibFolders
:app:transformNative_libsWithMergeJniLibsForDebug
:app:processDebugJavaRes UP-TO-DATE
:app:transformResourcesWithMergeJavaResForDebug
:app:transformResourcesAndNative_libsWithJavaResourcesVerifierForDebug
:app:transformClassesWithInstantRunForDebug
:app:transformClasses_enhancedWithInstant+reloadDexForDebug
:app:incrementalDebugTasks
:app:prePackageMarkerForDebug
:app:fastDeployDebugExtractor
:app:generateDebugInstantRunAppInfo
:app:coldswapKickerDebug
:app:transformClassesWithInstantRunSlicerForDebug
: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:PARSE ERROR:
Error:unsupported class file version 52.0
Error:...while parsing org/apache/lucene/analysis/ar/ArabicAnalyzer.class
Error:1 error; aborting
:app:transformClassesWithDexForDebug FAILED
Error:Execution failed for task ':app:transformClassesWithDexForDebug'.
> com.android.build.api.transform.TransformException: java.lang.RuntimeException: 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_73\bin\java.exe'' finished with non-zero exit value 1
Information:BUILD FAILED
Information:Total time: 40.184 secs
Information:5 errors
Information:0 warnings
Information:See complete output in console
Tried adding these libraries as Dependencies from Maven Central but the result was the same as above.
Error:unsupported class file version 52.0
Error:...while parsing org/apache/lucene/analysis/ar/ArabicAnalyzer.class
I also tried this way:
compile fileTree(dir: 'libs', include: '*.jar')
My app ran without any errors but Lucene classes were not recognized.
What I'm doing wrong?
Problem seems to be solved now.
Error:unsupported class file version 52.0
Means that library was written in Java 8 (version 52.0) and android API still doesn't support Java 8 strongly enough to use such libraries even if you have selected JDK 1.8+ in your Android Studio project settings. Correct me if I'm wrong.
I have just set up a new computer with Android Studio and imported my project from bitbucket.
Problem is that I am now getting this error when trying to build the project:
Information:Gradle tasks [:app:clean, :app:generateDebugSources,
:app:generateDebugAndroidTestSources, :app:mockableAndroidJar,
:app:prepareDebugUnitTestDependencies, :app:assembleDebug] :app:clean
:app:preBuild UP-TO-DATE :app:preDebugBuild UP-TO-DATE
:app:checkDebugManifest :app:preReleaseBuild UP-TO-DATE
:app:prepareChAcraAcra470Library
:app:prepareComAndroidSupportAnimatedVectorDrawable2420Library
:app:prepareComAndroidSupportAppcompatV72420Library
:app:prepareComAndroidSupportDesign2420Library
:app:prepareComAndroidSupportRecyclerviewV72420Library
:app:prepareComAndroidSupportSupportCompat2420Library
:app:prepareComAndroidSupportSupportCoreUi2420Library
:app:prepareComAndroidSupportSupportCoreUtils2420Library
:app:prepareComAndroidSupportSupportFragment2420Library
:app:prepareComAndroidSupportSupportMediaCompat2420Library
:app:prepareComAndroidSupportSupportV132420Library
:app:prepareComAndroidSupportSupportV42420Library
:app:prepareComAndroidSupportSupportVectorDrawable2420Library
:app:prepareComGoogleAndroidGmsPlayServicesBase940Library
:app:prepareComGoogleAndroidGmsPlayServicesBasement940Library
:app:prepareComGoogleAndroidGmsPlayServicesTasks940Library
:app:prepareComGoogleAndroidGmsPlayServicesVision940Library
:app:prepareComJourneyappsZxingAndroidEmbedded320Library
:app:prepareDebugDependencies :app:compileDebugAidl
:app:compileDebugRenderscript :app:generateDebugBuildConfig
:app:mergeDebugShaders :app:compileDebugShaders
:app:generateDebugAssets :app:mergeDebugAssets
:app:generateDebugResValues UP-TO-DATE :app:generateDebugResources
:app:mergeDebugResources :app:processDebugManifest
:app:processDebugResources :app:generateDebugSources
:app:preDebugAndroidTestBuild UP-TO-DATE
:app:prepareDebugAndroidTestDependencies
:app:compileDebugAndroidTestAidl :app:processDebugAndroidTestManifest
:app:compileDebugAndroidTestRenderscript
:app:generateDebugAndroidTestBuildConfig
:app:mergeDebugAndroidTestShaders :app:compileDebugAndroidTestShaders
:app:generateDebugAndroidTestAssets :app:mergeDebugAndroidTestAssets
:app:generateDebugAndroidTestResValues UP-TO-DATE
:app:generateDebugAndroidTestResources
:app:mergeDebugAndroidTestResources
:app:processDebugAndroidTestResources
:app:generateDebugAndroidTestSources :app:mockableAndroidJar
UP-TO-DATE :app:preDebugUnitTestBuild UP-TO-DATE
:app:prepareDebugUnitTestDependencies
:app:incrementalDebugJavaCompilationSafeguard
:app:compileDebugJavaWithJavac :app:compileDebugJavaWithJavac - is not
incremental (e.g. outputs have changed, no previous execution, etc.).
Note: Some input files use or override a deprecated API. Note:
Recompile with -Xlint:deprecation for details. Note: Some input files
use unchecked or unsafe operations. Note: Recompile with
-Xlint:unchecked for details. :app:compileDebugNdk UP-TO-DATE :app:compileDebugSources :app:buildInfoDebugLoader
:app:transformClassesWithExtractJarsForDebug
:app:transformClassesWithInstantRunVerifierForDebug
:app:transformClassesWithJavaResourcesVerifierForDebug UP-TO-DATE
:app:mergeDebugJniLibFolders
:app:transformNative_libsWithMergeJniLibsForDebug
:app:processDebugJavaRes UP-TO-DATE
:app:transformResourcesWithMergeJavaResForDebug
:app:transformResourcesAndNative_libsWithJavaResourcesVerifierForDebug
UP-TO-DATE :app:transformClassesWithInstantRunForDebug
:app:transformClasses_enhancedWithInstant+reloadDexForDebug UP-TO-DATE
:app:incrementalDebugTasks :app:prePackageMarkerForDebug
:app:fastDeployDebugExtractor :app:generateDebugInstantRunAppInfo
:app:coldswapKickerDebug
:app:transformClassesWithInstantRunSlicerForDebug
:app:transformClassesWithDexForDebug Error:Uncaught translation error:
com.android.dx.cf.code.SimException: local 0001: invalid Error:1
error; aborting Error:Execution failed for task
':app:transformClassesWithDexForDebug'.
com.android.build.api.transform.TransformException: java.lang.RuntimeException:
com.android.ide.common.process.ProcessException:
java.util.concurrent.ExecutionException:
com.android.ide.common.process.ProcessException: Return code 1 for dex
process Information:BUILD FAILED Information:Total time: 1 mins 38.347
secs Information:3 errors Information:0 warnings Information:See
complete output in console
And here is the output from the Gradle Console window:
Executing tasks: [:app:clean, :app:generateDebugSources,
:app:generateDebugAndroidTestSources, :app:mockableAndroidJar,
:app:prepareDebugUnitTestDependencies, :app:assembleDebug]
Configuration on demand is an incubating feature. Incremental java
compilation is an incubating feature. :app:clean :app:preBuild
UP-TO-DATE :app:preDebugBuild UP-TO-DATE :app:checkDebugManifest
:app:preReleaseBuild UP-TO-DATE :app:prepareChAcraAcra470Library
:app:prepareComAndroidSupportAnimatedVectorDrawable2420Library
:app:prepareComAndroidSupportAppcompatV72420Library
:app:prepareComAndroidSupportDesign2420Library
:app:prepareComAndroidSupportRecyclerviewV72420Library
:app:prepareComAndroidSupportSupportCompat2420Library
:app:prepareComAndroidSupportSupportCoreUi2420Library
:app:prepareComAndroidSupportSupportCoreUtils2420Library
:app:prepareComAndroidSupportSupportFragment2420Library
:app:prepareComAndroidSupportSupportMediaCompat2420Library
:app:prepareComAndroidSupportSupportV132420Library
:app:prepareComAndroidSupportSupportV42420Library
:app:prepareComAndroidSupportSupportVectorDrawable2420Library
:app:prepareComGoogleAndroidGmsPlayServicesBase940Library
:app:prepareComGoogleAndroidGmsPlayServicesBasement940Library
:app:prepareComGoogleAndroidGmsPlayServicesTasks940Library
:app:prepareComGoogleAndroidGmsPlayServicesVision940Library
:app:prepareComJourneyappsZxingAndroidEmbedded320Library
:app:prepareDebugDependencies :app:compileDebugAidl
:app:compileDebugRenderscript :app:generateDebugBuildConfig
:app:mergeDebugShaders :app:compileDebugShaders
:app:generateDebugAssets :app:mergeDebugAssets
:app:generateDebugResValues UP-TO-DATE :app:generateDebugResources
:app:mergeDebugResources :app:processDebugManifest
:app:processDebugResources :app:generateDebugSources
:app:preDebugAndroidTestBuild UP-TO-DATE
:app:prepareDebugAndroidTestDependencies
:app:compileDebugAndroidTestAidl :app:processDebugAndroidTestManifest
:app:compileDebugAndroidTestRenderscript
:app:generateDebugAndroidTestBuildConfig
:app:mergeDebugAndroidTestShaders :app:compileDebugAndroidTestShaders
:app:generateDebugAndroidTestAssets :app:mergeDebugAndroidTestAssets
:app:generateDebugAndroidTestResValues UP-TO-DATE
:app:generateDebugAndroidTestResources
:app:mergeDebugAndroidTestResources
:app:processDebugAndroidTestResources
:app:generateDebugAndroidTestSources :app:mockableAndroidJar
UP-TO-DATE :app:preDebugUnitTestBuild UP-TO-DATE
:app:prepareDebugUnitTestDependencies
:app:incrementalDebugJavaCompilationSafeguard
:app:compileDebugJavaWithJavac :app:compileDebugJavaWithJavac - is not
incremental (e.g. outputs have changed, no previous execution, etc.).
Note: Some input files use or override a deprecated API. Note:
Recompile with -Xlint:deprecation for details. Note: Some input files
use unchecked or unsafe operations. Note: Recompile with
-Xlint:unchecked for details.
:app:compileDebugNdk UP-TO-DATE :app:compileDebugSources
:app:buildInfoDebugLoader :app:transformClassesWithExtractJarsForDebug
:app:transformClassesWithInstantRunVerifierForDebug
:app:transformClassesWithJavaResourcesVerifierForDebug UP-TO-DATE
:app:mergeDebugJniLibFolders
:app:transformNative_libsWithMergeJniLibsForDebug
:app:processDebugJavaRes UP-TO-DATE
:app:transformResourcesWithMergeJavaResForDebug
:app:transformResourcesAndNative_libsWithJavaResourcesVerifierForDebug
UP-TO-DATE :app:transformClassesWithInstantRunForDebug
:app:transformClasses_enhancedWithInstant+reloadDexForDebug UP-TO-DATE
:app:incrementalDebugTasks :app:prePackageMarkerForDebug
:app:fastDeployDebugExtractor :app:generateDebugInstantRunAppInfo
:app:coldswapKickerDebug
:app:transformClassesWithInstantRunSlicerForDebug
:app:transformClassesWithDexForDebug AGPBI:
{"kind":"error","text":"Uncaught translation error:
com.android.dx.cf.code.SimException: local 0001:
invalid","sources":[{}]} AGPBI: {"kind":"error","text":"1 error;
aborting","sources":[{}]}
FAILED
FAILURE: Build failed with an exception.
What went wrong: Execution failed for task ':app:transformClassesWithDexForDebug'.
com.android.build.api.transform.TransformException: java.lang.RuntimeException:
com.android.ide.common.process.ProcessException:
java.util.concurrent.ExecutionException:
com.android.ide.common.process.ProcessException: Return code 1 for dex
process
Try: Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
BUILD FAILED
To investigate, I have created the Camera2Basic sample project that comes with Android Studio and that builds fine, so maybe this is a problem with a setting within my project rather than a general configuration/setup problem?
What I've already tried (with no luck):
Added org.gradle.jvmargs=-Xmx2048m to my gradle.properties file.
Setting minifyEnabled false in my app build.gradle file (in the release and in the debug blocks).
This suggestion.
File > Invalidate Cahces / Restart...
NB - Similar question here - but with a different error number and, currently, no answers.
Update:
Having removed a third party library (nxpnfclib.jar) from my app, my project now builds and runs fine. But if I then try re-adding the jar, the problem comes back.
Update #2:
I have created one of the sample Android Studio projects (Camera2Basic) and added the nxpnfclib.jar library. The same problem occurs. So this is clearly a problem with the nxpnfclib.jar library. (I have, today, emailed NXP about this latest issue with their library, so I will update this page with their solution - unless they update it, of course.)
I am using:
Windows 7 (64-bit)
Android Studio v2.1.3 (as a fresh install)
JDK 1.8.0_102
Gradle version 2.14.1
Android plugin version 2.1.3
This what I did to fix in my scenario:
At the project level on android studio updated the build.gradle like this:
buildscript {
ext.kotlin_version = '1.2.31
}
dependencies {
classpath 'com.android.tools.build:gradle:3.1.0'
}
Then on the gradle-wrapper.properties this:
distributionUrl=https\://services.gradle.org/distributions/gradle-4.4-all.zip
Executing tasks: [:app:clean, :app:generateDebugSources,
:app:generateDebugAndroidTestSources,
:app:prepareDebugUnitTestDependencies, :app:mockableAndroidJar,
:app:assembleDebug]
Parallel execution with configuration on demand is an incubating
feature. Incremental java compilation is an incubating feature.
:app:clean :app:preBuild UP-TO-DATE :app:preDebugBuild UP-TO-DATE
:app:checkDebugManifest :app:preReleaseBuild UP-TO-DATE
:app:prepareAsiaIvityAndroidMarqueeview115Library
:app:prepareComAndraskindlerParallaxviewpagerParallaxviewpager031Library
:app:prepareComAndroidSupportAnimatedVectorDrawable2321Library
:app:prepareComAndroidSupportAppcompatV72321Library
:app:prepareComAndroidSupportMultidex101Library
:app:prepareComAndroidSupportRecyclerviewV72321Library
:app:prepareComAndroidSupportSupportV42321Library
:app:prepareComAndroidSupportSupportVectorDrawable2321Library
:app:prepareComGithubTecheryProgresshintLibrary023Library
:app:prepareComGithubTecheryProgresshintLibraryAddition023Library
:app:prepareComH6ah4iAndroidWidgetVerticalseekbarVerticalseekbar051Library
:app:prepareComOgaclejapanSmarttablayoutLibrary160Library
:app:prepareComToxicBakeryViewpagerTransformsViewPagerTransforms1232Library
:app:prepareDebugDependencies :app:compileDebugAidl
:app:compileDebugRenderscript :app:generateDebugBuildConfig
:app:mergeDebugShaders :app:compileDebugShaders
:app:generateDebugAssets :app:mergeDebugAssets
:app:generateDebugResValues UP-TO-DATE :app:generateDebugResources
:app:mergeDebugResources :app:processDebugManifest
:app:processDebugResources :app:generateDebugSources
:app:preDebugAndroidTestBuild UP-TO-DATE
:app:prepareComAndroidSupportMultidexInstrumentation101Library
:app:prepareDebugAndroidTestDependencies
:app:compileDebugAndroidTestAidl :app:processDebugAndroidTestManifest
:app:compileDebugAndroidTestRenderscript
:app:generateDebugAndroidTestBuildConfig
:app:mergeDebugAndroidTestShaders :app:compileDebugAndroidTestShaders
:app:generateDebugAndroidTestAssets :app:mergeDebugAndroidTestAssets
:app:generateDebugAndroidTestResValues UP-TO-DATE
:app:generateDebugAndroidTestResources
:app:mergeDebugAndroidTestResources
:app:processDebugAndroidTestResources
:app:generateDebugAndroidTestSources :app:preDebugUnitTestBuild
UP-TO-DATE :app:prepareDebugUnitTestDependencies
:app:mockableAndroidJar UP-TO-DATE
:app:incrementalDebugJavaCompilationSafeguard
:app:compileDebugJavaWithJavac :app:compileDebugJavaWithJavac - is not
incremental (e.g. outputs have changed, no previous execution, etc.).
Note: Some input files use or override a deprecated API. Note:
Recompile with -Xlint:deprecation for details.
:app:compileDebugNdk UP-TO-DATE :app:compileDebugSources
:app:buildInfoDebugLoader :app:transformClassesWithExtractJarsForDebug
:app:transformClassesWithInstantRunVerifierForDebug
:app:transformClassesWithJavaResourcesVerifierForDebug UP-TO-DATE
:app:mergeDebugJniLibFolders
:app:transformNative_libsWithMergeJniLibsForDebug
:app:processDebugJavaRes UP-TO-DATE
:app:transformResourcesWithMergeJavaResForDebug
:app:transformResourcesAndNative_libsWithJavaResourcesVerifierForDebug
UP-TO-DATE :app:transformClassesWithInstantRunForDebug
:app:transformClasses_enhancedWithInstant+reloadDexForDebug
:app:incrementalDebugTasks :app:prePackageMarkerForDebug
:app:fastDeployDebugExtractor :app:generateDebugInstantRunAppInfo
:app:coldswapKickerDebug
:app:transformClassesWithInstantRunSlicerForDebug
:app:transformClassesWithDexForDebug To run dex in process, the Gradle
daemon needs a larger heap. It currently has approximately 11833 MB.
For faster builds, increase the maximum heap size for the Gradle
daemon to more than 13312 MB. To do this set
org.gradle.jvmargs=-Xmx13312M in the project gradle.properties. For
more information see
https://docs.gradle.org/current/userguide/build_environment.html
:app:validateDebugSigning :app:packageDebug :app:zipalignDebug
:app:fullDebugBuildInfoGenerator :app:assembleDebug
BUILD SUCCESSFUL
Total time: 7 mins 41.523 secs
The default Gradle Daemon VM memory allocation is 1 gigabyte — which is insufficient to support dexInProcess, so to take advantage you’ll need to set it to at least 2 gigabytes.
One thing you could do to speed up your builds is to increase the Gradle Daemon VM memory allocation.
In gradle.properties add the line org.gradle.jvmargs=-Xmx2048m.
Good read about Android Studio 2.1 feature Dex In Process:
https://medium.com/google-developers/faster-android-studio-builds-with-dex-in-process-5988ed8aa37e?_utm_source=1-2-2#.g4ba8piij
And also check out the video:
https://www.youtube.com/watch?v=-SY5nkNVUn0
Make your gradle offline.
Goto File -> Settings search for gradle and checked offline work .
My problem is solved.It was taking time because i have ubuntu and i was opening and running my project from external ntfs hard drive.I reformatted it as ext4 and followed the post given in comment section by Amit Vaghela , which reduced the build time from 7 min to 2 sec.
This is the link given by 'Amit Vaghela':
Building and running app via Gradle and Android Studio is slower than via Eclipse
I am trying to integrated Facebook sign in to my application. If I added below lines to my build.gradle file for the application:
repositories {
mavenCentral()
}
in dependencies
compile 'com.facebook.android:facebook-android-sdk:4.2.0'
After that if I rebuild project it rebuilds it successfully. But when I try to run it takes long time to build and then shows dialog with text:
Failed to complete Gradle execution.
Casue:
Though the Message Gradle Build windows does not show any error. Here is the output of it
Information:Gradle tasks [:app:assembleDebug]
:app:preDebugBuild UP-TO-DATE
:app:checkDebugManifest
:app:preReleaseBuild UP-TO-DATE
:app:prepareComAndroidSupportAppcompatV72220Library UP-TO-DATE
:app:prepareComAndroidSupportDesign2220Library UP-TO-DATE
:app:prepareComAndroidSupportMediarouterV72200Library UP-TO-DATE
:app:prepareComAndroidSupportSupportV42220Library UP-TO-DATE
:app:prepareComFacebookAndroidFacebookAndroidSdk420Library UP-TO-DATE
:app:prepareComGoogleAndroidGmsPlayServices750Library UP-TO-DATE
:app:prepareComGoogleAndroidGmsPlayServicesAds750Library UP-TO-DATE
:app:prepareComGoogleAndroidGmsPlayServicesAnalytics750Library UP-TO-DATE
:app:prepareComGoogleAndroidGmsPlayServicesAppindexing750Library UP-TO-DATE
:app:prepareComGoogleAndroidGmsPlayServicesAppinvite750Library UP-TO-DATE
:app:prepareComGoogleAndroidGmsPlayServicesAppstate750Library UP-TO-DATE
:app:prepareComGoogleAndroidGmsPlayServicesBase750Library UP-TO-DATE
:app:prepareComGoogleAndroidGmsPlayServicesCast750Library UP-TO-DATE
:app:prepareComGoogleAndroidGmsPlayServicesDrive750Library UP-TO-DATE
:app:prepareComGoogleAndroidGmsPlayServicesFitness750Library UP-TO-DATE
:app:prepareComGoogleAndroidGmsPlayServicesGames750Library UP-TO-DATE
:app:prepareComGoogleAndroidGmsPlayServicesGcm750Library UP-TO-DATE
:app:prepareComGoogleAndroidGmsPlayServicesIdentity750Library UP-TO-DATE
:app:prepareComGoogleAndroidGmsPlayServicesLocation750Library UP-TO-DATE
:app:prepareComGoogleAndroidGmsPlayServicesMaps750Library UP-TO-DATE
:app:prepareComGoogleAndroidGmsPlayServicesNearby750Library UP-TO-DATE
:app:prepareComGoogleAndroidGmsPlayServicesPanorama750Library UP-TO-DATE
:app:prepareComGoogleAndroidGmsPlayServicesPlus750Library UP-TO-DATE
:app:prepareComGoogleAndroidGmsPlayServicesSafetynet750Library UP-TO-DATE
:app:prepareComGoogleAndroidGmsPlayServicesWallet750Library UP-TO-DATE
:app:prepareComGoogleAndroidGmsPlayServicesWearable750Library UP-TO-DATE
:app:prepareTextvalidatorLibrary UP-TO-DATE
:app:prepareThreepioLibrary UP-TO-DATE
:app:prepareDebugDependencies
:app:compileDebugAidl UP-TO-DATE
:app:compileDebugRenderscript UP-TO-DATE
:app:generateDebugBuildConfig UP-TO-DATE
:app:generateDebugAssets UP-TO-DATE
:app:mergeDebugAssets UP-TO-DATE
:app:generateDebugResValues UP-TO-DATE
:app:processDebugGoogleServices
File google-services.json is missing from module root folder. The Google Quickstart Plugin cannot function without it.
:app:generateDebugResources
:app:mergeDebugResources UP-TO-DATE
:app:processDebugManifest UP-TO-DATE
:app:processDebugResources UP-TO-DATE
:app:generateDebugSources UP-TO-DATE
:app:processDebugJavaRes UP-TO-DATE
:app:compileDebugJavaWithJavac UP-TO-DATE
:app:compileDebugNdk UP-TO-DATE
:app:compileDebugSources UP-TO-DATE
:app:preDexDebug
:app:dexDebug
Information:0 errors
Information:0 warnings
Information:See complete output in console
I also modified the Gradle VM options as -XX:MaxHeapSize=256m -Xmx256m but still it gives the error.
If I remove the dependency it works fine. I am not sure why this happens.
Executing this command ./gradlew assembleDebug in my project directory showed the real culprit of the problem.
When I add facebook SDK dependency to my project it exceeds the limit of 64K methods in my dex file. Due to this the gradle build was failing.
I added multiDexEnabled = true into my build types in build.gradle file. And derive my custom application class from MultiDexApplication instead of Application.
This solved my issue.