Tag: gradle

gradle force build tools version on third party libraries?

how can I force a library to use sdk build tools 19.1.0 or above without forking/manually editing the build.gradle file for the library? I keep getting this error when using libraries… Error:The SDK Build Tools revision (…….) is too low for project ‘:somelibrary’. Minimum required is 19.1.0

Duplicate Files copied in APK META-INF when Gradle building

I’ve been looking around at some of the answers posted here about this error but have had no luck. I’m hoping to get some clarification about what’s going on. my error is as follows: Error:Execution failed for task ‘:app:transformResourcesWithMergeJavaResForDebug’. com.android.build.api.transform.TransformException: com.android.builder.packaging.DuplicateFileException: Duplicate files copied in APK META-INF/maven/commons-io/commons-io/pom.xml File1: /home/colin/.gradle/caches/modules-2/files-2.1/org.apache.commons/commons-io/1.3.2/b6dde38349ba9bb5e6ea6320531eae969985dae5/commons-io-1.3.2.jar File2: /home/colin/.gradle/caches/modules-2/files-2.1/commons-io/commons-io/1.3.2/b6dde38349ba9bb5e6ea6320531eae969985dae5/commons-io-1.3.2.jar I’ve done packagingOptions { […]

Gradle release build still debuggable?

According to the Gradle docs, the default value for “debuggable” a “release” buildType is false. However, whether I explicitly set it to false or not, my release build always seems to be debuggable (I can see logcat output). Am I misinterpreting this property? Can someone please explain? Here’s my build.gradle: buildscript { repositories { mavenCentral() […]

Android/gradle: not able to use repository

I tried to remove my jar* libraries and add them as maven-repository-dependencies. It looks very promising, but I am not able to do it. I tested it with a single library (gson) and now my gradle.build looks like this: buildscript { repositories { mavenCentral() } dependencies { classpath ‘com.android.tools.build:gradle:0.5.+’ } } apply plugin: ‘android’ dependencies […]

NoClassDefFoundError When Using Dagger 2 After Switching to Android Studio 2.0

Before upgrading to Android Studio 2.0 I could use Dagger 2 no problem. Now I am getting a NoClassDefFoundError This has shut me down for more than a day and I’m reaching out for some help. It seems as though Gradle cannot my AppModule class even though it is pretty clear that it is in […]

Gradle assembleDebug and preDexDebug fail with CircleCI

I tried to assembleDebug using CircleCI, but it must fail to build(preDex). Why can’t I do that? Using ProductFlavor(the name is production) Android Gradle ver.1.1.0-rc1 Problem ./gradlew assembleProductionDebug died unexpectedly Building 92%3% > :app:preDexProductionDebugaction ./gradlew assembleProductionDebug failed circle.yml general: artifacts: – “app/build/outputs/apk/app-production-release-unaligned.apk” machine: java: version: openjdk7 environment: ANDROID_HOME: /usr/local/android-sdk-linux dependencies: pre: – echo y | […]

android studio gradle sync error

After trying a preview version that gave me odd errors, i just did a fresh install of Android Studio 1.1.0 on Ubuntu Linux. I also removed the preferences directory to start from scratch. Now even with new projects gradle sync fails with this error and i cannot find the cause or other informations that can […]

Failed to complete Gradle execution (new project) – java home different

I downloaded Android Studio version [build 135.1653844] and created a new project. I am getting an error: Failed to complete Gradle execution. Cause: The newly created daemon process has a different context than expected. It won’t be possible to reconnect to this daemon. Context mismatch: Java home is different. Wanted: DefaultDaemonContext[uid=null,javaHome=C:\Program Files\Java\jdk1.6.0_45,daemonRegistryDir=C:\Users\gargn\.gradle\daemon,pid=1000,idleTimeout=null,daemonOpts=-XX:MaxPermSize=256m,-XX:+HeapDumpOnOutOfMemoryError,-Xmx1024m,-Dfile.encoding=windows-1252,-Duser.country=US,-Duser.language=en,-Duser.variant] Actual: DefaultDaemonContext[uid=9a6c3945-1d55-46d7-897b-4ed84a5707bb,javaHome=C:\Program Files\Java\jdk1.6.0_45\jre,daemonRegistryDir=C:\Users\gargn\.gradle\daemon,pid=1664,idleTimeout=10800000,daemonOpts=-XX:MaxPermSize=256m,-XX:+HeapDumpOnOutOfMemoryError,-Xmx1024m,-Dfile.encoding=windows-1252,-Duser.country=US,-Duser.language=en,-Duser.variant] […]

Duplicate files when adding compiling with Gradle in Android Studio

This question already has an answer here: Android Gradle plugin 0.7.0: “duplicate files during packaging of APK” 19 answers

Android Studio Javadoc: Cannot find symbol

I’m trying to prepare and upload my Android library to Bintray and part of that process runs the following javadoc task: task javadoc(type: Javadoc) { source = android.sourceSets.main.java.srcDirs classpath += project.files(android.getBootClasspath().join(File.pathSeparator)) } This task is part of a larger gradle script here: https://raw.githubusercontent.com/attwellBrian/JCenter/master/bintrayv1.gradle When the javadoc task runs, the following problems occur: Every @NonNull and […]

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