Tag: android-gradle

Error after adding play-services library : ':app:transformClassesWithJarMergingForDebug'

My project was working perfectly with those libraries included: // Support libraries compile ‘com.android.support:support-v4:23.1.0’ compile ‘com.android.support:appcompat-v7:23.1.0’ compile ‘com.android.support:cardview-v7:23.1.0’ compile ‘com.android.support:recyclerview-v7:23.1.0’ // Other stuff compile ‘com.jakewharton:butterknife:7.0.1’ compile ‘com.squareup.picasso:picasso:2.5.2’ compile ‘com.google.code.gson:gson:2.3’ compile ‘com.squareup.retrofit:retrofit:1.9.0’ compile ‘com.afollestad:material-dialogs:0.7.8.1’ compile ‘com.jpardogo.materialtabstrip:library:1.1.0’ compile ‘com.melnykov:floatingactionbutton:1.3.0’ compile ‘com.code-troopers.betterpickers:library:2.0.0’ compile ‘com.loopj.android:android-async-http:1.4.9’ compile ‘com.squareup.okhttp:okhttp:2.5.0’ compile ‘com.facebook.fresco:fresco:0.7.0’ now i tried to follow this tutorial: Set up a […]

Android Studio: Unexpected top level exception (finished with non-zero exit value 2..)

When i’m trying to debug my android app i’m getting the following error message: 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 ‘/Library/Java/JavaVirtualMachines/jdk1.8.0_31.jdk/Contents/Home/bin/java” finished with non-zero exit value 2 The error first appeared on adding a new dependency. This is my gradle file compile ‘com.android.support:appcompat-v7:23.0.1’ compile ‘com.android.support:design:23.0.1’ compile ‘com.android.support:recyclerview-v7:23.0.1’ compile ‘com.google.dagger:dagger:2.0.1’ apt ‘com.google.dagger:dagger-compiler:2.0.1’ […]

Error:(2, 0) Plugin with id 'com.github.dcendents.android-maven' not found

I use the following library to add material design to my android project https://github.com/navasmdc/MaterialDesignLibrary But after importing it as a module, I get the following error. How can I fix it Error:(2, 0) Plugin with id ‘com.github.dcendents.android-maven’ not found.

transformClassesAndResourcesWithProguardForRelease FAILED

I am trying to Build my Android application with Gradle in console. But getting below error about task ‘:app:transformClassesAndResourcesWithProguardForRelease’: build.gradle: buildscript { repositories { jcenter() maven { url “https://jitpack.io” } } dependencies { classpath ‘com.android.tools.build:gradle:2.2.3’ classpath ‘com.google.gms:google-services:3.0.0’ } } allprojects { repositories { jcenter() maven { url “https://jitpack.io” } } } task clean(type: Delete) { […]

Android Gradle Plugin 1.1.0 – getNdkFolder() not found anymore, any replacement?

I just updated android Gradle plugin to 1.1.0 from 1.0.0, and I got this error: No signature of method: com.android.build.gradle.LibraryPlugin.getNdkFolder() is applicable for argument types: () values: [] I tried to find diff of gradle plugin 1.0.0 to 1.1.0 but couldn’t find anywhere online. Seems like getNdkFolder method has been either changed or removed. Is […]

Android Studio Gradle error “Multiple dex files define…”

My Project was working fine, when I have added facebook sdk into my project I have an error like this, I have tried so many ways to fix this, but I didn’t. What should I do? Error:Execution failed for task ‘:app:packageAllDebugClassesForMultiDex’. > java.util.zip.ZipException: duplicate entry: bolts/AggregateException.class My App gradle is below apply plugin: ‘com.android.application’ android […]

Multi-flavor compile dependencies in gradle

Is there a way to have compile dependencies by multiple flavors in Android Studio (build.gradle)? I have 2 flavorGroups, and in each 2 variants. Out of the 4 possible combinations I would like to be able to depend on a lib only if I’m both in latest and in free flavor. latestCompile or freeCompile works, […]

Databinding fails with NoSuchMethodError

After updating to gradle 2.10 every time when I try to assemble debug build of the app I get the NoSuchMethodError exception. Here is the relevant part of the build log: java.lang.RuntimeException: failure, see logs for details. cannot generate view binders java.lang.NoSuchMethodError: com.google.common.base.Strings.isNullOrEmpty(Ljava/lang/String;)Z at android.databinding.tool.util.StringUtils.capitalize(StringUtils.java:57) at android.databinding.tool.util.ParserHelper.toClassName(ParserHelper.java:23) at android.databinding.tool.store.ResourceBundle$LayoutFileBundle.getFullBindingClass(ResourceBundle.java:551) at android.databinding.tool.store.ResourceBundle$LayoutFileBundle.getBindingClassPackage(ResourceBundle.java:541) at android.databinding.tool.CompilerChef.pushClassesToAnalyzer(CompilerChef.java:124) at android.databinding.tool.CompilerChef.createChef(CompilerChef.java:73) […]

Could not get unknown property 'assembleRelease' while using gradle 2.14.1

When using older version then gradle 2.14.1 then below statement compiled and run successfully but after updating with gradle 2.14.1, its not working. code: assembleRelease.dependsOn ‘increaseVersionCodeAndName’ Thanks, Devang

Finished with Non Zero Exit Value 3

I am trying to run my project, but I keep getting this error: Error:Execution failed for task ‘:app:preDexDebug’. com.android.ide.common.process.ProcessException: org.gradle.process.internal.ExecException: Process ‘command ‘/Library/Java/JavaVirtualMachines/jdk1.8.0_25.jdk/Contents/Home/bin/java” finished with non-zero exit value 3 This is my gradle: apply plugin: ‘com.android.application’ android { compileSdkVersion 21 buildToolsVersion “21.1.2” defaultConfig { applicationId “com.blume.android” minSdkVersion 14 targetSdkVersion 21 versionCode 1 versionName “1.0” } […]

Android Babe is a Google Android Fan, All about Android Phones, Android Wear, Android Dev and Android Games Apps and so on.