I am getting this error from build-tools\23.0.2\ (Aapt.exe)
finished with non zero exit value 1.
I am using Android Studio Version 1.4.1
I am using the API level 23 with the updated build tools, and my log cat is often meaning out the string.xml where I created my strings to refer it for the list view.
Executing tasks: [:app:generateDebugSources,
:app:generateDebugAndroidTestSources, :app:compileDebugSources,
:app:compileDebugAndroidTestSources, :mylibrary:generateDebugSources,
:mylibrary:generateDebugAndroidTestSources,
:mylibrary:compileDebugSources,
:mylibrary:compileDebugAndroidTestSources]
Configuration on demand is an incubating feature. :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:prepareComAndroidSupportRecyclerviewV72311Library UP-TO-DATE
:app:prepareComAndroidSupportSupportV42311Library 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 AGPBI: { "kind":"error","text":"Apostrophe
not preceded by \ ( in ithin the lifecycle callback methods, you can
declare how your activity behaves when the user leaves and re-enters
the activity. For example, if you\u0027re building a streaming video
player, you might pause the video and terminate the network connection
when the user switches to another app. When the user returns, you can
reconnect to the network and allow the user to resume the video from
the same spot. )", "sources":[
{"file":"C:\Users\PreciseT3\AndroidStudioProjects\ListviewApp1\app\src\main\res\values\strings.xml","position":
{ "startLine":1}}],"original":""}
FAILED
FAILURE: Build failed with an exception.
What went wrong: Execution failed for task ':app:processDebugResources'.
com.android.ide.common.process.ProcessException: org.gradle.process.internal.ExecException: Process 'command
'C:\Users\PreciseT3\AppData\Local\Android\sdk\build-tools\23.0.2\aapt.exe''
finished with non-zero exit value 1
Try: Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
BUILD FAILED
Total time: 12.649 secs
Problem is in your string.xml
find all occurrences of single-quote (') or apostrophe and add a back-slash escape character (\) before each occurrence.
XML cannot deal with (')
Basically, replace all ' with \'
Compare your gradle file I hope this work
apply plugin: 'com.android.application'
android {
compileSdkVersion 23
buildToolsVersion '23.0.2'
defaultConfig {
applicationId "info.tranetech.laundry"
minSdkVersion 15
targetSdkVersion 23
versionCode 1
versionName "1.0"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
android {
useLibrary 'org.apache.http.legacy'
}
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
compile 'com.android.support:appcompat-v7:23.0.1'
compile 'com.android.support:recyclerview-v7:+'
compile 'com.android.support:cardview-v7:+'
compile 'com.android.support:design:23.0.1'
compile 'com.squareup.picasso:picasso:+'
testCompile 'junit:junit:4.12'
compile 'com.facebook.android:facebook-android-sdk:4.0.0'
compile files('libs/android-async-http-1.4.4.jar')
compile 'com.google.android.gms:play-services:8.4.0'
}
Related
When I run Build - rebuild project I get the following error
I have tryed many sollution but nothing works..
What went wrong:
the error build code:
Executing tasks: [:app:generateDebugSources]
Configuration on demand is an incubating feature.
:app:preBuild UP-TO-DATE
:app:preDebugBuild UP-TO-DATE
:app:compileDebugAidl UP-TO-DATE
:app:compileDebugRenderscript UP-TO-DATE
:app:checkDebugManifest UP-TO-DATE
:app:generateDebugBuildConfig UP-TO-DATE
:app:prepareLintJar UP-TO-DATE
:app:mainApkListPersistenceDebug UP-TO-DATE
:app:generateDebugResValues UP-TO-DATE
:app:generateDebugResources UP-TO-DATE
:app:mergeDebugResources UP-TO-DATE
:app:createDebugCompatibleScreenManifests UP-TO-DATE
:app:processDebugManifest
:app:splitsDiscoveryTaskDebug UP-TO-DATE
AGPBI: {"kind":"error","text":"error: resource drawable/appiconlarge () not found.","sources":[{"file":"/home/.gradle/caches/transforms-1/files-1.1/appcompat-v7-25.3.1.aar/a9a8f29f5baeae5b590388a64347d1e6/res/values/values.xml","position":{"startLine":1362,"startColumn":4,"startOffset":99385,"endLine":1403,"endColumn":12,"endOffset":102566}}],"original":"","tool":"AAPT"}
:app:processDebugResources
error: failed linking references.
:app:processDebugResources FAILED
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':app:processDebugResources'.
> Failed to process resources, see aapt output above for details.
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
Build.gradle file
apply plugin: 'com.android.application'
android {
compileSdkVersion 25
buildToolsVersion '27.0.3'
defaultConfig {
applicationId "xxxx"
minSdkVersion 19
targetSdkVersion 24
versionCode 1
versionName "1.0"
testInstrumentationRunner
manifestPlaceholders = [auth0Domain:"#string/com_auth0_domain"]
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
androidTestImplementation('com.android.support.test.espresso:espresso-core:2.2.2', {
exclude group: 'com.android.support', module: 'support-annotations'
})
testImplementation 'junit:junit:4.12'
implementation 'de.hdodenhof:circleimageview:2.1.0'
implementation 'com.google.android.gms:play-services-maps:10.0.0'
implementation 'com.android.volley:volley:1.0.0'
implementation 'com.auth0.android:lock:2.7.0'
implementation 'com.android.support:cardview-v7:25.3.1'
implementation 'com.android.support:support-annotations:24.2.0'
implementation 'com.squareup.retrofit2:retrofit:2.3.0'
implementation 'com.squareup.retrofit2:converter-gson:2.3.0'
}
The main issue is
resource drawable/appiconlarge not found
Please check the drawable/appiconlarge file exists or not. If not please add appiconlarge image on the drawable directory.
Hope this will solve your problem.
Consider doing this, not sure it would remove the error but it helped in my case.
android.enableAapt2=true
I am new To android studio. I have made a Java project which mainly works with an SQLite db (in assets folder). I migrated This project to android studio from netbeans. When I press run and choose an emulator, Gradle Build Tasks start to execute and an error occurs which says:
Error:Execution failed for task
':app:transformDexArchiveWithExternalLibsDexMergerForDebug'.
> java.lang.RuntimeException:
com.android.builder.dexing.DexArchiveMergerException: Unable to merge dex
The Complete error output in console says:
* What went wrong:
Execution failed for task ':app:transformDexArchiveWithExternalLibsDexMergerForDebug'.
> java.lang.RuntimeException: com.android.builder.dexing.DexArchiveMergerException: Unable to merge dex
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
* Get more help at https://help.gradle.org
BUILD FAILED in 39s
This is the Stack trace after pressing 'run'
Executing tasks: [:app:assembleDebug]
:app:preBuild UP-TO-DATE
:app:preDebugBuild UP-TO-DATE
:app:compileDebugAidl UP-TO-DATE
:app:compileDebugRenderscript UP-TO-DATE
:app:checkDebugManifest UP-TO-DATE
:app:generateDebugBuildConfig UP-TO-DATE
:app:prepareLintJar UP-TO-DATE
:app:generateDebugResValues UP-TO-DATE
:app:generateDebugResources UP-TO-DATE
:app:mergeDebugResources UP-TO-DATE
:app:createDebugCompatibleScreenManifests UP-TO-DATE
:app:processDebugManifest
:app:splitsDiscoveryTaskDebug UP-TO-DATE
:app:processDebugResources
:app:generateDebugSources
:app:javaPreCompileDebug UP-TO-DATE
:app:compileDebugJavaWithJavac UP-TO-DATE
:app:compileDebugNdk NO-SOURCE
: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:transformClassesWithDexBuilderForDebug UP-TO-DATE
:app:transformDexArchiveWithExternalLibsDexMergerForDebug FAILED
There are a lot of solution on the web like putmultiDexEnabled true in gradle.build file which I already had.
Update This is my gradle.build file
apply plugin: 'com.android.application'
android {
compileSdkVersion 26
defaultConfig {
applicationId "com.example.bcosta.myapplication"
minSdkVersion 23
targetSdkVersion 23
versionCode 1
versionName "1.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
multiDexEnabled = true
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
implementation fileTree(include: ['*.jar'], dir: 'libs')
implementation 'com.android.support:appcompat-v7:26.1.0'
implementation 'com.android.support.constraint:constraint layout:1.0.2'
testImplementation 'junit:junit:4.12'
androidTestImplementation 'com.android.support.test:runner:1.0.1'
androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.1'
}
This seems like a common problem with no definitive solution.
Try:
Delete the .gradle directory.
Clean project and build again.
If that doesn't work, try adding the following to your build.gradle:
android {
dexOptions{
jumboMode=true;
javaMaxHeapSize "4g"
}
}
Also, try File -> Invalidate Caches/Restart
Try this,
android {
defaultConfig {
...
multiDexEnabled true
}
}
dependencies {
compile 'com.android.support:multidex:1.0.1'
}
If you don’t have a custom Application class, then add this line to manifest
<application
android:name="android.support.multidex.MultiDexApplication"
.....your code
If you already have your own Application class, make it extend android.support.multidex.MultiDexApplication instead of android.app.Application
import android.support.multidex.MultiDexApplication;
public class MyApplication extends MultiDexApplication {
/* To enable Multi-Dex, you have 3 options -
1. Declare android.support.multidex.MultiDexApplication as your application class in AndroidManifest.xml
2. Extend MultiDexApplication like we are doing here
3. Override attachBaseContext() in your application class as shown below
/*
*/
/*
#Override
protected void attachBaseContext(Context base) {
super.attachBaseContext(base);
MultiDex.install(this);
}
*/
}
Error:Execution failed for task ':app:mergeDebugResources'.
Error: java.util.concurrent.ExecutionException: com.android.ide.common.process.ProcessException:
Error:java.util.concurrent.ExecutionException: com.android.ide.common.process.ProcessException:
GRADLE CONSOLE OUTPUT:
Executing tasks: [:app:generateDebugSources, :app:generateDebugAndroidTestSources, :app:mockableAndroidJar, :app:prepareDebugUnitTestDependencies]
Configuration on demand is an incubating feature.
Incremental java compilation is an incubating feature.
:app:preBuild UP-TO-DATE
:app:preDebugBuild UP-TO-DATE
:app:checkDebugManifest
:app:preReleaseBuild UP-TO-DATE
:app:prepareComAndroidSupportAnimatedVectorDrawable2510Library UP-TO-DATE
:app:prepareComAndroidSupportAppcompatV72510Library UP-TO-DATE
:app:preDebugAndroidTestBuild UP-TO-DATE
:app:prepareComAndroidSupportMultidex101Library UP-TO-DATE
:app:prepareComAndroidSupportSupportCompat2510Library UP-TO-DATE
:app:prepareComAndroidSupportSupportCoreUi2510Library UP-TO-DATE
:app:prepareComAndroidSupportSupportCoreUtils2510Library UP-TO-DATE
:app:prepareComAndroidSupportSupportFragment2510Library UP-TO-DATE
:app:prepareComAndroidSupportSupportMediaCompat2510Library UP-TO-DATE
:app:prepareComAndroidSupportSupportV42510Library UP-TO-DATE
:app:prepareComAndroidSupportSupportVectorDrawable2510Library UP-TO-DATE
:app:prepareComAndroidVolleyVolley100Library 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
Error: java.util.concurrent.ExecutionException: com.android.ide.common.process.ProcessException:
:app:mergeDebugResources FAILED
FAILURE: Build failed with an exception.
What went wrong:
Execution failed for task ':app:mergeDebugResources'.
Error: java.util.concurrent.ExecutionException: com.android.ide.common.process.ProcessException:
Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
BUILD FAILED
Can anyone help me in fixing this. I am new to android :(
I have added a screen shot of Android Manifest.
So far I have tried below steps to fix the issue. Still no help.
1) Clean Prjoect
2) Rebuild Project
3) File > Invalid Cache/Restart
build.gradle
apply plugin: 'com.android.application'
android {
compileSdkVersion 25
buildToolsVersion "25.0.2"
defaultConfig {
applicationId "com.theaquarious.myfavapp"
minSdkVersion 14
targetSdkVersion 25
versionCode 1
versionName "1.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
multiDexEnabled true
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
exclude group: 'com.android.support', module: 'support-annotations'
})
compile 'com.android.support:appcompat-v7:25.1.0'
testCompile 'junit:junit:4.12'
compile 'com.mcxiaoke.volley:library:1.0.19'
}
This issue is now resolved. The error was raised due to the image file. I have changed the extension of an JPG image to PNG without using any editor. Due to this android studio started to throw the error. Thanks to everyone who tried to help me. If anyone needs more clarification on this, just comment.
This appears to be a bug in aquiring a lock in some Java thread. I see this on my Windows 7 PC starting recently. I have had success by simply running Task Manager and then killing the java.exe process. If I then try again, the build seems to work fine.
The error is because the names of the files that are saved in your Drawable folder can not be capitalized. Rename the file and leave everything in lowercase.
Don’t save drawable images in capital case and it should be png not jpg else it will throw an error : Execution failed for task ':app:mergeDebugResources'
My gradle is
apply plugin: 'com.android.application'
android {
compileSdkVersion 23
buildToolsVersion "23.0.2"
defaultConfig {
applicationId "com.tbkha"
minSdkVersion 14
targetSdkVersion 23
versionCode 2
versionName "1.0.1"
multiDexEnabled true
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
repositories {
maven {
url 'http://swisscodemonkeys.github.io/appbrain-sdk/maven'
}
}
}
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
testCompile 'junit:junit:4.12'
compile 'com.android.support:appcompat-v7:23.1.1'
compile 'com.android.support:design:23.1.1'
compile 'com.android.support:cardview-v7:23.1.1'
compile 'com.android.support:support-v4:23.1.1'
compile 'com.android.support:recyclerview-v7:23.1.1'
compile 'com.j256.ormlite:ormlite-android:4.48'
compile 'com.squareup.retrofit:retrofit:1.9.0'
compile 'com.github.bumptech.glide:glide:3.6.0'
compile 'de.hdodenhof:circleimageview:1.3.0'
compile 'com.github.nirhart:parallaxscroll:1.0'
compile 'com.facebook.android:facebook-android-sdk:4.1.0'
compile 'com.google.android.gms:play-services:8.4.0'
compile 'com.appbrain:appbrain-applift-sdk:10.51'
compile 'com.android.support:multidex:1.0.1'
}
I face this problem:
Information:Gradle tasks [:tbkha:assembleDebug]
:tbkha:preBuild UP-TO-DATE
:tbkha:preDebugBuild UP-TO-DATE
:tbkha:checkDebugManifest
:tbkha:preReleaseBuild UP-TO-DATE
:tbkha:prepareComAndroidSupportAppcompatV72311Library UP-TO-DATE
:tbkha:prepareComAndroidSupportCardviewV72311Library UP-TO-DATE
:tbkha:prepareComAndroidSupportDesign2311Library UP-TO-DATE
:tbkha:prepareComAndroidSupportMediarouterV72300Library UP-TO-DATE
:tbkha:preDebugAndroidTestBuild UP-TO-DATE
:tbkha:prepareComAndroidSupportMultidex101Library UP-TO-DATE
:tbkha:prepareComAndroidSupportRecyclerviewV72311Library UP-TO-DATE
:tbkha:prepareComAndroidSupportSupportV42311Library UP-TO-DATE
:tbkha:prepareComFacebookAndroidFacebookAndroidSdk410Library UP-TO-DATE
:tbkha:prepareComGithubNirhartParallaxscroll10Library UP-TO-DATE
:tbkha:prepareComGoogleAndroidGmsPlayServices840Library UP-TO-DATE
:tbkha:prepareComGoogleAndroidGmsPlayServicesAds840Library UP-TO-DATE
:tbkha:prepareComGoogleAndroidGmsPlayServicesAnalytics840Library UP-TO-DATE
:tbkha:prepareComGoogleAndroidGmsPlayServicesAppindexing840Library UP-TO-DATE
:tbkha:prepareComGoogleAndroidGmsPlayServicesAppinvite840Library UP-TO-DATE
:tbkha:prepareComGoogleAndroidGmsPlayServicesAppstate840Library UP-TO-DATE
:tbkha:prepareComGoogleAndroidGmsPlayServicesAuth840Library UP-TO-DATE
:tbkha:prepareComGoogleAndroidGmsPlayServicesBase840Library UP-TO-DATE
:tbkha:prepareComGoogleAndroidGmsPlayServicesBasement840Library UP-TO-DATE
:tbkha:prepareComGoogleAndroidGmsPlayServicesCast840Library UP-TO-DATE
:tbkha:prepareComGoogleAndroidGmsPlayServicesDrive840Library UP-TO-DATE
:tbkha:prepareComGoogleAndroidGmsPlayServicesFitness840Library UP-TO-DATE
:tbkha:prepareComGoogleAndroidGmsPlayServicesGames840Library UP-TO-DATE
:tbkha:prepareComGoogleAndroidGmsPlayServicesGcm840Library UP-TO-DATE
:tbkha:prepareComGoogleAndroidGmsPlayServicesIdentity840Library UP-TO-DATE
:tbkha:prepareComGoogleAndroidGmsPlayServicesLocation840Library UP-TO-DATE
:tbkha:prepareComGoogleAndroidGmsPlayServicesMaps840Library UP-TO-DATE
:tbkha:prepareComGoogleAndroidGmsPlayServicesMeasurement840Library UP-TO-DATE
:tbkha:prepareComGoogleAndroidGmsPlayServicesNearby840Library UP-TO-DATE
:tbkha:prepareComGoogleAndroidGmsPlayServicesPanorama840Library UP-TO-DATE
:tbkha:prepareComGoogleAndroidGmsPlayServicesPlus840Library UP-TO-DATE
:tbkha:prepareComGoogleAndroidGmsPlayServicesSafetynet840Library UP-TO-DATE
:tbkha:prepareComGoogleAndroidGmsPlayServicesVision840Library UP-TO-DATE
:tbkha:prepareComGoogleAndroidGmsPlayServicesWallet840Library UP-TO-DATE
:tbkha:prepareComGoogleAndroidGmsPlayServicesWearable840Library UP-TO-DATE
:tbkha:prepareDeHdodenhofCircleimageview130Library UP-TO-DATE
:tbkha:prepareDebugDependencies
:tbkha:compileDebugAidl UP-TO-DATE
:tbkha:compileDebugRenderscript UP-TO-DATE
:tbkha:generateDebugBuildConfig UP-TO-DATE
:tbkha:generateDebugAssets UP-TO-DATE
:tbkha:mergeDebugAssets UP-TO-DATE
:tbkha:generateDebugResValues UP-TO-DATE
:tbkha:generateDebugResources UP-TO-DATE
:tbkha:mergeDebugResources UP-TO-DATE
:tbkha:processDebugManifest UP-TO-DATE
:tbkha:processDebugResources UP-TO-DATE
:tbkha:generateDebugSources UP-TO-DATE
:tbkha:compileDebugJavaWithJavac UP-TO-DATE
:tbkha:compileDebugNdk UP-TO-DATE
:tbkha:compileDebugSources UP-TO-DATE
:tbkha:transformClassesWithJarMergingForDebug UP-TO-DATE
:tbkha:collectDebugMultiDexComponents UP-TO-DATE
:tbkha:transformClassesWithMultidexlistForDebug UP-TO-DATE
:tbkha:transformClassesWithDexForDebug
UNEXPECTED TOP-LEVEL ERROR:
java.lang.OutOfMemoryError: GC overhead limit exceeded
Error:Execution failed for task ':tbkha:transformClassesWithDexForDebug'.
> com.android.build.api.transform.TransformException: com.android.ide.common.process.ProcessException: org.gradle.process.internal.ExecException: Process 'command 'C:\Program Files\Java\jdk1.8.0_65\bin\java.exe'' finished with non-zero exit value 3
Information:BUILD FAILED
Information:Total time: 4 mins 38.558 secs
Information:1 error
Information:0 warnings
Information:See complete output in console
Thanks all,
I solved this problem by this steps:
1- add (org.gradle.jvmargs=-Xmx1024m) Inside my_project/gradle/wrapper/gradle-wrapper.properties
2- add (dexOptions { javaMaxHeapSize "4g" }) to build.gradle.
This problem is solved.
It takes a lot of memory to dex all that java code, and considering you have a lot of dependencies it looks likes you need a lot more! Increase the memory available to your Gradle process.
Inside your project/gradle/wrapper/gradle-wrapper.properties
add this line
org.gradle.jvmargs=-Xmx1024m
For instance it could look like this:
See here for more: https://docs.gradle.org/current/userguide/build_environment.html
org.gradle.jvmargs
Specifies the jvmargs used for the daemon process. The setting is particularly useful for tweaking memory settings. At the moment the default settings are pretty generous with regards to memory.
I'm trying to implement Google sign in for Android and I'm following the instructoins via
https://developers.google.com/identity/sign-in/android/start-integrating
But while building the application I'm receiving the following error.
Information:Gradle tasks [:app:generateDebugSources,
:app:generateDebugAndroidTestSources, :app:assembleDebug]
:app:preBuild UP-TO-DATE :app:preDebugBuild UP-TO-DATE
:app:checkDebugManifest :app:preReleaseBuild UP-TO-DATE
:app:prepareComAndroidSupportAppcompatV72301Library UP-TO-DATE
:app:prepareComAndroidSupportDesign2301Library UP-TO-DATE
:app:prepareComAndroidSupportSupportV42301Library UP-TO-DATE
:app:prepareComGoogleAndroidGmsPlayServicesAds810Library UP-TO-DATE
:app:prepareComGoogleAndroidGmsPlayServicesAnalytics810Library
UP-TO-DATE
:app:prepareComGoogleAndroidGmsPlayServicesAppindexing810Library
UP-TO-DATE :app:prepareComGoogleAndroidGmsPlayServicesBase810Library
UP-TO-DATE
:app:prepareComGoogleAndroidGmsPlayServicesBasement810Library
UP-TO-DATE
:app:prepareComGoogleAndroidGmsPlayServicesIdentity810Library
UP-TO-DATE
:app:prepareComGoogleAndroidGmsPlayServicesMeasurement810Library
UP-TO-DATE :app:prepareComGoogleAndroidGmsPlayServicesPlus810Library
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
No matching client found for package name 'com.questo.rugved.questo'
:app:generateDebugResources :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:compileDebugJavaWithJavac UP-TO-DATE :app:compileDebugNdk
UP-TO-DATE :app:compileDebugSources UP-TO-DATE
:app:transformClassesAndResourcesWithExtractJarsForDebug
:app:transformClassesWithDexForDebug UNEXPECTED TOP-LEVEL EXCEPTION:
Error:Execution failed for task
':app:transformClassesWithDexForDebug'.
com.android.build.transform.api.TransformException:
com.android.ide.common.process.ProcessException:
org.gradle.process.internal.ExecException: Process 'command
'/usr/lib/jvm/java-7-oracle/bin/java'' finished with non-zero exit
value 2 Information:BUILD FAILED Information:Total time: 1 mins 39.994
secs Information:1 error Information:0 warnings Information:See
complete output in console
My top level gradle is
buildscript {
repositories {
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:1.3.0'
classpath 'com.google.gms:google-services:1.4.0-beta3'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
allprojects {
repositories {
jcenter()
}
}
My app level gradle is
<pre>
apply plugin: 'com.android.application'
apply plugin: 'com.google.gms.google-services'
android {
compileSdkVersion 23
buildToolsVersion '23.0.1'
defaultConfig {
applicationId "com.questo.rugved.questo"
minSdkVersion 15
targetSdkVersion 23
versionCode 1
versionName "1.0"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
compile 'com.android.support:appcompat-v7:23.0.1'
compile 'com.android.support:design:23.+'
compile 'com.google.android.gms:play-services-identity:8.1.0'
compile 'com.google.android.gms:play-services-plus:8.1.0'
}
please help.
Maybe this link helps you. link
That helped me:
android {
...
defaultConfig {
...
multiDexEnabled true
}
}
This problem occurs because of multiple inclusion of dependencies. You are including a dependency that is already specified in your build.gradle file. For example:
compile 'com.google.android.gms:play-services:9.0.2'
compile 'com.google.android.gms:play-services-identity:9.0.2'
the above specification of dependency will generate this problem, because play-services includes everything, including play-services-identity, & so, here the same dependency is included for multiple times.
The recommended option is to only include those dependencies that you actually need. If you need play services location & maps, only include these dependencies as:
compile 'com.google.android.gms:play-services-location:9.0.2'
compile 'com.google.android.gms:play-services-maps:9.0.2'
Without including everything with 'com.google.android.gms:play-services:9.0.2'.
In your specific case, I suspect the conflict is arising between google-services of the top level gradle file and play-services-identity & play-services-plus in the app level gradle file. Using only those services that you specifically need resolving multiple inclusion will resolve your issue.
In general, you should not use "multiDexEnabled true" if you don't have a strong & legitimate reason. Using it without knowing the actual problem means that you are bypassing a problem. You are allowing multiple overlapping dependencies yielding a potential source of api conflicts & bigger apk size.
Adding
dexOptions {
incremental = true;
preDexLibraries = false
javaMaxHeapSize "4g" // 2g should be also OK
}
in with in android in build.gradle works for me.
Had the same problem.
Mine was fixed by setting the JAVA_HOME variable to java 8 jdk
export JAVA_HOME="/usr/lib/jvm/java-8-openjdk-amd64/"