Problem Solved:
Re-installed Java and got
java.lang.OutOfMemoryError: GC overhead limit exceeded
Added the following within the android block in gradle and it worked
dexOptions {
incremental true
javaMaxHeapSize "4g"
}
Thank you everyone!
----------------------------------------------------------------------------
I'm getting a java error when I try to run an app that has both facebook and paypal sdk as dependencies. It works fine when I comment the facebook sdk dependency on gradle, but I need facebook login to work for my application too. Please help.
dependencies {
compile 'com.android.support:multidex:1.0.1'
compile 'com.google.android.gms:play-services:8.1.0'
compile 'com.google.android.gms:play-services-identity:8.1.0'
compile 'com.google.android.gms:play-services-plus:8.1.0'
compile 'com.android.support:cardview-v7:23.1.1'
compile 'com.android.support:design:23.1.1'
compile 'com.squareup.picasso:picasso:2.5.2'
compile 'com.android.support:recyclerview-v7:23.1.1'
compile 'org.lucasr.twowayview:twowayview:0.1.4'
compile 'com.facebook.android:facebook-android-sdk:4.8.2'
compile files('libs/PayPalAndroidSDK-2.12.1.jar')
compile files('libs/httpcore-4.4.3.jar')
compile files('libs/httpclient-4.5.1.jar')
}
The error message:
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:prepareComAndroidSupportCardviewV72311Library UP-TO-DATE
:app:prepareComAndroidSupportDesign2311Library UP-TO-DATE
:app:prepareComAndroidSupportMediarouterV72220Library UP-TO-DATE
:app:prepareComAndroidSupportMultidex101Library UP-TO-DATE
:app:prepareComAndroidSupportRecyclerviewV72311Library UP-TO-DATE
:app:prepareComAndroidSupportSupportV42311Library UP-TO-DATE
:app:prepareComGoogleAndroidGmsPlayServices830Library UP-TO-DATE
:app:prepareComGoogleAndroidGmsPlayServicesAds830Library UP-TO-DATE
:app:prepareComGoogleAndroidGmsPlayServicesAnalytics830Library UP-TO-DATE
:app:prepareComGoogleAndroidGmsPlayServicesAppindexing830Library UP-TO-DATE
:app:prepareComGoogleAndroidGmsPlayServicesAppinvite830Library UP-TO-DATE
:app:prepareComGoogleAndroidGmsPlayServicesAppstate830Library UP-TO-DATE
:app:prepareComGoogleAndroidGmsPlayServicesAuth830Library UP-TO-DATE
:app:prepareComGoogleAndroidGmsPlayServicesBase830Library UP-TO-DATE
:app:prepareComGoogleAndroidGmsPlayServicesBasement830Library UP-TO-DATE
:app:prepareComGoogleAndroidGmsPlayServicesCast830Library UP-TO-DATE
:app:prepareComGoogleAndroidGmsPlayServicesDrive830Library UP-TO-DATE
:app:prepareComGoogleAndroidGmsPlayServicesFitness830Library UP-TO-DATE
:app:prepareComGoogleAndroidGmsPlayServicesGames830Library UP-TO-DATE
:app:prepareComGoogleAndroidGmsPlayServicesGcm830Library UP-TO-DATE
:app:prepareComGoogleAndroidGmsPlayServicesIdentity830Library UP-TO-DATE
:app:prepareComGoogleAndroidGmsPlayServicesLocation830Library UP-TO-DATE
:app:prepareComGoogleAndroidGmsPlayServicesMaps830Library UP-TO-DATE
:app:prepareComGoogleAndroidGmsPlayServicesMeasurement830Library UP-TO-DATE
:app:prepareComGoogleAndroidGmsPlayServicesNearby830Library UP-TO-DATE
:app:prepareComGoogleAndroidGmsPlayServicesPanorama830Library UP-TO-DATE
:app:prepareComGoogleAndroidGmsPlayServicesPlus830Library UP-TO-DATE
:app:prepareComGoogleAndroidGmsPlayServicesSafetynet830Library UP-TO-DATE
:app:prepareComGoogleAndroidGmsPlayServicesVision830Library UP-TO-DATE
:app:prepareComGoogleAndroidGmsPlayServicesWallet830Library UP-TO-DATE
:app:prepareComGoogleAndroidGmsPlayServicesWearable830Library UP-TO-DATE
:app:prepareOrgLucasrTwowayviewTwowayview014Library 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: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:processDebugJavaRes UP-TO-DATE
:app:compileDebugJavaWithJavac
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:collectDebugMultiDexComponents UP-TO-DATE
:app:packageAllDebugClassesForMultiDex
:app:shrinkDebugMultiDexComponents
:app:createDebugMainDexClassList
:app:dexDebug
UNEXPECTED TOP-LEVEL EXCEPTION:
java.lang.RuntimeException: Exception parsing classes
at com.android.dx.command.dexer.Main.processClass(Main.java:752)
at com.android.dx.command.dexer.Main.processFileBytes(Main.java:718)
at com.android.dx.command.dexer.Main.access$1200(Main.java:85)
at com.android.dx.command.dexer.Main$FileBytesConsumer.processFileBytes(Main.java:1645)
at com.android.dx.cf.direct.ClassPathOpener.processArchive(ClassPathOpener.java:284)
at com.android.dx.cf.direct.ClassPathOpener.processOne(ClassPathOpener.java:166)
at com.android.dx.cf.direct.ClassPathOpener.process(ClassPathOpener.java:144)
at com.android.dx.command.dexer.Main.processOne(Main.java:672)
at com.android.dx.command.dexer.Main.processAllFiles(Main.java:569)
at com.android.dx.command.dexer.Main.runMultiDex(Main.java:366)
at com.android.dx.command.dexer.Main.run(Main.java:275)
at com.android.dx.command.dexer.Main.main(Main.java:245)
at com.android.dx.command.Main.main(Main.java:106)
Caused by: com.android.dx.cf.iface.ParseException: bad class file magic (cafebabe) or version (0034.0000)
at com.android.dx.cf.direct.DirectClassFile.parse0(DirectClassFile.java:472)
at com.android.dx.cf.direct.DirectClassFile.parse(DirectClassFile.java:406)
at com.android.dx.cf.direct.DirectClassFile.parseToInterfacesIfNecessary(DirectClassFile.java:388)
at com.android.dx.cf.direct.DirectClassFile.getMagic(DirectClassFile.java:251)
at com.android.dx.command.dexer.Main.parseClass(Main.java:764)
at com.android.dx.command.dexer.Main.access$1500(Main.java:85)
at com.android.dx.command.dexer.Main$ClassParserTask.call(Main.java:1684)
at com.android.dx.command.dexer.Main.processClass(Main.java:749)
... 12 more
1 error; aborting
Error:Execution failed for task ':app:dexDebug'.
> com.android.ide.common.process.ProcessException: org.gradle.process.internal.ExecException: Process 'command 'C:\Program Files\Java\jdk1.7.0_79\bin\java.exe'' finished with non-zero exit value 1
Information:BUILD FAILED
Information:Total time: 39.781 secs
Information:1 error
Information:0 warnings
Information:See complete output in console
If you have any libraries in your libs folder --> Right Click > Add as library
Then delete this line > compile fileTree(include: ['*.jar'], dir: 'libs')
OR
It must have been a problem with the Java install. Remove all traces of Java and reinstall. Answer here Android java.exe finished with non-zero exit value 1
Please make sure your Minimum SDK more or equal to API Level-15, check your project libs folder and make sure it should not have any 'Face Book' (.jar) files.
if you have two classes or variables with the same name except in first caracter (for me one starts with a capital letter) this will cause the problem if you're using java 1.8
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 want to use google map in my application ,this is my gradle code :
compile 'com.android.support:appcompat-v7:23.0.0'
compile files('libs/commons-net-3.3.jar')
compile files('libs/Parse-1.4.3.jar')
compile files('libs/universal-image-loader-1.8.4-with-sources.jar')
compile files('libs/org.apache.http.legacy.jar')
compile 'com.koushikdutta.ion:ion:2.1.6'
compile 'com.android.support:recyclerview-v7:23.0.0'
compile 'com.android.support:cardview-v7:23.0.0'
compile 'com.android.support:design:23.0.0'
compile 'com.soundcloud.android:android-crop:1.0.1#aar'
compile 'com.google.android.gms:play-services:7.8.0'
the problem is after adding com.google.android.gms:play-services:7.8.0 , I could not run my application anymore and I get this errors :
:app:prepareComAndroidSupportAppcompatV72300Library UP-TO-DATE
:app:prepareComAndroidSupportCardviewV72300Library UP-TO-DATE
:app:prepareComAndroidSupportDesign2300Library UP-TO-DATE
:app:prepareComAndroidSupportMediarouterV72220Library UP-TO-DATE
:app:prepareComAndroidSupportRecyclerviewV72300Library UP-TO-DATE
:app:prepareComAndroidSupportSupportV42300Library UP-TO-DATE
:app:prepareComGoogleAndroidGmsPlayServices780Library UP-TO-DATE
:app:prepareComGoogleAndroidGmsPlayServicesAds780Library UP-TO-DATE
:app:prepareComGoogleAndroidGmsPlayServicesAnalytics780Library UP-TO-DATE
:app:prepareComGoogleAndroidGmsPlayServicesAppindexing780Library UP-TO-DATE
:app:prepareComGoogleAndroidGmsPlayServicesAppinvite780Library UP-TO-DATE
:app:prepareComGoogleAndroidGmsPlayServicesAppstate780Library UP-TO-DATE
:app:prepareComGoogleAndroidGmsPlayServicesBase780Library UP-TO-DATE
:app:prepareComGoogleAndroidGmsPlayServicesCast780Library UP-TO-DATE
:app:prepareComGoogleAndroidGmsPlayServicesDrive780Library UP-TO-DATE
:app:prepareComGoogleAndroidGmsPlayServicesFitness780Library UP-TO-DATE
:app:prepareComGoogleAndroidGmsPlayServicesGames780Library UP-TO-DATE
:app:prepareComGoogleAndroidGmsPlayServicesGcm780Library UP-TO-DATE
:app:prepareComGoogleAndroidGmsPlayServicesIdentity780Library UP-TO-DATE
:app:prepareComGoogleAndroidGmsPlayServicesLocation780Library UP-TO-DATE
:app:prepareComGoogleAndroidGmsPlayServicesMaps780Library UP-TO-DATE
:app:prepareComGoogleAndroidGmsPlayServicesNearby780Library UP-TO-DATE
:app:prepareComGoogleAndroidGmsPlayServicesPanorama780Library UP-TO-DATE
:app:prepareComGoogleAndroidGmsPlayServicesPlus780Library UP-TO-DATE
:app:prepareComGoogleAndroidGmsPlayServicesSafetynet780Library UP-TO-DATE
:app:prepareComGoogleAndroidGmsPlayServicesVision780Library UP-TO-DATE
:app:prepareComGoogleAndroidGmsPlayServicesWallet780Library UP-TO-DATE
:app:prepareComGoogleAndroidGmsPlayServicesWearable780Library UP-TO-DATE
:app:prepareComSoundcloudAndroidAndroidCrop101Library 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: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:preDebugAndroidTestBuild UP-TO-DATE
:app:prepareDebugAndroidTestDependencies
:app:compileDebugAndroidTestAidl UP-TO-DATE
:app:processDebugAndroidTestManifest UP-TO-DATE
:app:compileDebugAndroidTestRenderscript UP-TO-DATE
:app:generateDebugAndroidTestBuildConfig UP-TO-DATE
:app:generateDebugAndroidTestAssets UP-TO-DATE
:app:mergeDebugAndroidTestAssets UP-TO-DATE
:app:generateDebugAndroidTestResValues UP-TO-DATE
:app:generateDebugAndroidTestResources UP-TO-DATE
:app:mergeDebugAndroidTestResources UP-TO-DATE
:app:processDebugAndroidTestResources UP-TO-DATE
:app:generateDebugAndroidTestSources 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
UNEXPECTED TOP-LEVEL EXCEPTION:
com.android.dex.DexIndexOverflowException: method ID not in [0, 0xffff]: 65536
at com.android.dx.merge.DexMerger$6.updateIndex(DexMerger.java:502)
at com.android.dx.merge.DexMerger$IdMerger.mergeSorted(DexMerger.java:277)
at com.android.dx.merge.DexMerger.mergeMethodIds(DexMerger.java:491)
at com.android.dx.merge.DexMerger.mergeDexes(DexMerger.java:168)
at com.android.dx.merge.DexMerger.merge(DexMerger.java:189)
at com.android.dx.command.dexer.Main.mergeLibraryDexBuffers(Main.java:502)
at com.android.dx.command.dexer.Main.runMonoDex(Main.java:334)
at com.android.dx.command.dexer.Main.run(Main.java:277)
at com.android.dx.command.dexer.Main.main(Main.java:245)
at com.android.dx.command.Main.main(Main.java:106)
Error:Execution failed for task ':app:dexDebug'.
> com.android.ide.common.process.ProcessException: org.gradle.process.internal.ExecException: Process 'command 'F:\sdk\bin\java.exe'' finished with non-zero exit value 2
Could you help me ? What is the problem ? It's been 5 hours that I could not sovle this
thanks
Try using
multiDexEnabled true
in build.gradle
defaultConfig {
applicationId 'pkg'
minSdkVersion
targetSdkVersion
versionCode
versionName
// Enable MultiDexing: https://developer.android.com/tools/building/multidex.html
multiDexEnabled true
}
I have downloaded and added xstream-1.4.8.jar to my Android Studio project. When I build the project it works fine but when I try to run it I get the following error from the Gradle Build window:
Information:Gradle tasks [:app:assembleDebug]
:app:preBuild UP-TO-DATE
:app:preDebugBuild UP-TO-DATE
:app:compileDebugNdk UP-TO-DATE
:app:checkDebugManifest
:app:preReleaseBuild UP-TO-DATE
:app:prepareComAndroidSupportAppcompatV72103Library UP-TO-DATE
:app:prepareComAndroidSupportSupportV42103Library 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: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:compileDebugJava UP-TO-DATE
:app:preDexDebug
UNEXPECTED TOP-LEVEL EXCEPTION:
com.android.dx.cf.iface.ParseException: bad class file magic (cafebabe) or version (0034.0000)
at com.android.dx.cf.direct.DirectClassFile.parse0(DirectClassFile.java:472)
at com.android.dx.cf.direct.DirectClassFile.parse(DirectClassFile.java:406)
at com.android.dx.cf.direct.DirectClassFile.parseToInterfacesIfNecessary(DirectClassFile.java:388)
at com.android.dx.cf.direct.DirectClassFile.getMagic(DirectClassFile.java:251)
at com.android.dx.command.dexer.Main.processClass(Main.java:704)
at com.android.dx.command.dexer.Main.processFileBytes(Main.java:673)
at com.android.dx.command.dexer.Main.access$300(Main.java:83)
at com.android.dx.command.dexer.Main$1.processFileBytes(Main.java:602)
at com.android.dx.cf.direct.ClassPathOpener.processArchive(ClassPathOpener.java:284)
at com.android.dx.cf.direct.ClassPathOpener.processOne(ClassPathOpener.java:166)
at com.android.dx.cf.direct.ClassPathOpener.process(ClassPathOpener.java:144)
at com.android.dx.command.dexer.Main.processOne(Main.java:632)
at com.android.dx.command.dexer.Main.processAllFiles(Main.java:510)
at com.android.dx.command.dexer.Main.runMonoDex(Main.java:280)
at com.android.dx.command.dexer.Main.run(Main.java:246)
at com.android.dx.command.dexer.Main.main(Main.java:215)
at com.android.dx.command.Main.main(Main.java:106)
...while parsing com/thoughtworks/xstream/mapper/LambdaMapper.class
1 error; aborting
Error:Execution failed for task ':app:preDexDebug'.
com.android.ide.common.process.ProcessException: org.gradle.process.internal.ExecException: Process 'command 'C:\Program Files\Java\jdk1.8.0_25\bin\java.exe'' finished with non-zero exit value 1
Information:BUILD FAILED
Information:Total time: 14.974 secs
Information:1 error
Information:0 warnings
Information:See complete output in console
I have looked at the related answers on here and none of the suggested solutions work for me.
Thanks in advance.
XStream 1.4.8 is compiled for Java 8 and the latest version Android supports is Java 7.
One solution is to use XStream 1.4.7, that works with Android, and another to download XStream 1.4.8 sources and compile them yourself. In that case you will have to remove LambdaMapper.java and possibly some other problematic classes.
Also you can have issues with different versions of xmlpull parser used. In that case you can exclude one from compiling.
compile('com.thoughtworks.xstream:xstream:1.4.7') {
exclude group: 'xmlpull', module: 'xmlpull'
}
Even the "Studio Android 0.8.x" I could reference an external library project as a module of my project.
In settings.gradle file:
include ':app'
// sinapse library
include ':SinapseLibrary2.1'
project(':SinapseLibrary2.1').projectDir = new File('/Users/douglas/AndroidStudioProjects/SinapseLibrary2.1/library')
After the 0.9.x version that is not possible. When I run the app I get the message below.
I use the same project library within several other projects.
This is a bug, or is there an alternative?
Information:Gradle tasks [:app:assembleDebug]
:app:preBuild
:app:compileDebugNdk UP-TO-DATE
:SinapseLibrary2.1:compileLint
:SinapseLibrary2.1:copyReleaseLint UP-TO-DATE
:SinapseLibrary2.1:mergeReleaseProguardFiles UP-TO-DATE
:SinapseLibrary2.1:preBuild
:SinapseLibrary2.1:preReleaseBuild
:SinapseLibrary2.1:checkReleaseManifest
:SinapseLibrary2.1:prepareReleaseDependencies
:SinapseLibrary2.1:compileReleaseAidl UP-TO-DATE
:SinapseLibrary2.1:compileReleaseRenderscript UP-TO-DATE
:SinapseLibrary2.1:generateReleaseBuildConfig UP-TO-DATE
:SinapseLibrary2.1:generateReleaseAssets UP-TO-DATE
:SinapseLibrary2.1:mergeReleaseAssets UP-TO-DATE
:SinapseLibrary2.1:generateReleaseResValues UP-TO-DATE
:SinapseLibrary2.1:generateReleaseResources UP-TO-DATE
:SinapseLibrary2.1:packageReleaseResources UP-TO-DATE
:SinapseLibrary2.1:processReleaseManifest UP-TO-DATE
:SinapseLibrary2.1:processReleaseResources UP-TO-DATE
:SinapseLibrary2.1:generateReleaseSources UP-TO-DATE
:SinapseLibrary2.1:compileReleaseJava UP-TO-DATE
:SinapseLibrary2.1:processReleaseJavaRes UP-TO-DATE
:SinapseLibrary2.1:packageReleaseJar UP-TO-DATE
:SinapseLibrary2.1:compileReleaseNdk UP-TO-DATE
:SinapseLibrary2.1:packageReleaseJniLibs UP-TO-DATE
:SinapseLibrary2.1:packageReleaseLocalJar UP-TO-DATE
:SinapseLibrary2.1:packageReleaseRenderscript UP-TO-DATE
:SinapseLibrary2.1:bundleRelease UP-TO-DATE
:app:preDebugBuild
:app:checkDebugManifest
:app:preReleaseBuild
:app:prepareCromoledRemoteControlSinapseLibrary21UnspecifiedLibrary 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: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:compileDebugJava UP-TO-DATE
:app:preDexDebug
UNEXPECTED TOP-LEVEL EXCEPTION:
...while parsing br/ind/sinapse/library/BuildConfig.class
1 error; aborting
Error:Execution failed for task ':app:preDexDebug'.
> com.android.ide.common.internal.LoggedErrorException: Failed to run command:
/Users/douglas/ferramentas/adt-bundle-mac-x86_64-20140702/build-tools/21.1.2/dx --dex --output /Users/douglas/AndroidStudioProjects/CromoledRemoteControl/app/build/intermediates/pre-dexed/debug/classes-b4d0e7e6eb67c94397ec32d2b0a00147807d74d7.jar /Users/douglas/AndroidStudioProjects/CromoledRemoteControl/app/build/intermediates/exploded-aar/CromoledRemoteControl/SinapseLibrary2.1/unspecified/classes.jar
Error Code:
1
Output:
UNEXPECTED TOP-LEVEL EXCEPTION:
com.android.dx.cf.iface.ParseException: bad class file magic (cafebabe) or version (0034.0000)
at com.android.dx.cf.direct.DirectClassFile.parse0(DirectClassFile.java:472)
at com.android.dx.cf.direct.DirectClassFile.parse(DirectClassFile.java:406)
at com.android.dx.cf.direct.DirectClassFile.parseToInterfacesIfNecessary(DirectClassFile.java:388)
at com.android.dx.cf.direct.DirectClassFile.getMagic(DirectClassFile.java:251)
at com.android.dx.command.dexer.Main.processClass(Main.java:704)
at com.android.dx.command.dexer.Main.processFileBytes(Main.java:673)
at com.android.dx.command.dexer.Main.access$300(Main.java:83)
at com.android.dx.command.dexer.Main$1.processFileBytes(Main.java:602)
at com.android.dx.cf.direct.ClassPathOpener.processArchive(ClassPathOpener.java:284)
at com.android.dx.cf.direct.ClassPathOpener.processOne(ClassPathOpener.java:166)
at com.android.dx.cf.direct.ClassPathOpener.process(ClassPathOpener.java:144)
at com.android.dx.command.dexer.Main.processOne(Main.java:632)
at com.android.dx.command.dexer.Main.processAllFiles(Main.java:510)
at com.android.dx.command.dexer.Main.runMonoDex(Main.java:280)
at com.android.dx.command.dexer.Main.run(Main.java:246)
at com.android.dx.command.dexer.Main.main(Main.java:215)
at com.android.dx.command.Main.main(Main.java:106)
...while parsing br/ind/sinapse/library/BuildConfig.class
1 error; aborting
Information:BUILD FAILED
Information:Total time: 2.351 secs
Information:1 error
Information:0 warnings
Information:See complete output in console
It is not so sure but I have experienced a similar error message as "local path doesn't exist".
My problem was solved by executing "Sync Project with Gradle Files" with the button on the Toolbar.
thank you for your attention. Finally solved the problem, but I could not understand what was the cause.
I undid the project changes that were using the version of "Android 0.8.x Studio" and then imported again in the "Android Studio 1.0.1". Updated the proguard parameters, etc.
Now it's all right. Thank you.