Tag: android-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

Gradle task to change a boolean in build config

I would like to create a very simple task which change a boolean in my gradle config. I work on an Android application which can be run with several profiles, and for each build a need to specify if in my code the app must fake the bluetooth or not. My gradle (relevant code) : […]

Duplicate Entry Google Gson

My error: Error:Execution failed for task ‘:app:packageAllDebugClassesForMultiDex’. > java.util.zip.ZipException: duplicate entry: com/google/gson/annotations/Expose.class I’m trying to use Stripe and integrate it with retrofit. I have the Stripe lib build.gradle file and the app build.gradle file. I dont see whats causing this error and I need the dependency in both build.gradle files because both Stripe and Retrofit […]

Why won't Android Support Libraries work in my project?

Using Android Studio, I followed the steps at https://developer.android.com/tools/support-library/setup.html as acurately as I could, but it told me the following error: Error:Could not find method compile() for arguments [com.android.support:appcompat-v7:18.0.+] on org.gradle.api.internal.artifacts.dsl.dependencies.DefaultDependencyHandler_Decorated@18899229. Please install the Android Support Repository from the Android SDK Manager. Open Android SDK Manager But I have already installed the Support Repository and […]

Android Studio: Failed to complete gradle execution. Cause is empty

I tried setting different Gradle Vm Option from all the answers found on stackoverflow, but nothing seems to be working out I’m on Android Studio 1.2.2 I’m getting this error when I try to run the app on either on the emulator or the device. Only thing that is working for me is that I […]

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

Upgrade Android Studio 2.1 Preview3 : Cannot configure the 'publishing' extension after it has been accessed

This question already has an answer here: Error:Cannot configure the 'publishing' extension after it has been accessed 3 answers

Butterknife 8.1.0 not working with JDK 1.8 in Android Studio 2.1.2

I’m fairly new to Android, Android Studio, Butterknife and the Gradle build system. However, I’m not new to Java, or programming in general. I’m trying to build an Android app with JDK 1.8 and Butterknife version 8.1.0 , but the Gradle build keeps failing, saying: Error:Could not find property ‘options’ on task ‘:app:compileDebugJavaWithJack’. Note: My […]

gradle command : crashlyticsUploadDistributionRelease with flavor

I’m trying to use the following gradle command to upload apk with flavor: ./gradlew assembleDevRelease crashlyticsUploadDistributionDevRelease However, it’s failing with the following exception log: Caused by: com.crashlytics.tools.android.exception.DistributionException: Crashlytics halted compilation because it had a problem uploading the distribution.Project dev is inactive at com.crashlytics.tools.android.DistributionTasks.uploadDistribution(DistributionTasks.java:91) at com.crashlytics.tools.android.DeveloperTools.processProperties(DeveloperTools.java:583) … 58 more It seems like there’s no packagename match […]

Running gradle's connectedAndroidTest on a specific device

How do you run connectedAndroidTest on a particular device? I would expect something like: ./gradlew connectedAndroidTest -DconnectedAndroidTest.device=XXXX We have a number of devices plugged into our CI server and I can’t seem to find any documentation on how to target a specific connected device. connectedAndroidTest runs the tests on ALL connected devices currently. Thanks.

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