Android- Error:Execution failed for task ‘:app:transformClassesWithDexForRelease’

The Problem is that i am able to run my app when i change to debug mode but it fails when i switch to release mode. Exception: **FAILURE: Build failed with an exception.** > Execution failed for task ‘:app:transformClassesWithDexForRelease’. > 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 ‘/Library/Java/JavaVirtualMachines/jdk1.8.0_65.jdk/Contents/Home/bin/java” finished with non-zero exit value 1 When … Read more

How/when to generate Gradle wrapper files?

I am trying to understand how the Gradle Wrapper works. In many source repos, I see the following structure: projectRoot/ src/ build.gradle gradle.properties settings.gradle gradlew gradlew.bat gradle/ wrapper/ gradle-wrapper.jar gradle-wrapper.properties My questions: How/when does one generate gradlew/gradlew.bat? Are you supposed to generate them only one time when the project is first created, do you generate … Read more

Could not find or load main class org.gradle.wrapper.GradleWrapperMain

I cleaned the whole project by deleting local directories like ~/.gradle, ~/.m2 ~./android and ~/workspace/project/.gradle and chosing File -> Invalidate Caches / Restart… in Android Studio. Now execution of the command ./gradlew leads to the following output: usr$ ./gradlew tasks Error: Could not find or load main class org.gradle.wrapper.GradleWrapperMain Needless to say, I deleted too … Read more

gradlew: Permission Denied

I am attempting to run gradlew from my command line, but am constantly facing the following error. Brendas-MacBook-Pro:appx_android brendalogy$ ./gradlew compileDebug –stacktrace -bash: ./gradlew: Permission denied I am already running this command from my project directory. Need to run this command as I am facing the same (nondescriptive) error on Android Studio 0.2.x as encountered … Read more