Tag: android-gradle

Gradle: How to publish a Android library to local repository

I have a library and a Android app using Gradle and Android Studio. I can include the library directly in the project as following compile project(‘:library’) Because I don’t want to mesh up with library source code, I want to publish the library into local repository so that I can use as compile ‘com.mygroup:library:1.0’ Any […]

Speed up gradle build in multidex application

My application has a bunch of librarys that are essential that is why I was forced to use multidex support library and it works nicely. But where the problem shows is in the gradle buid speed. It takes on average 2minutes to build and when I am developing and testing this is quite annoying. Is […]

Android Studio gradle doesn't compile the specified version

I’ve been developing this small project for some days now but suddenly today, Android Studio started to give me this error Error:Execution failed for task ‘:app:processDebugManifest’. > Manifest merger failed : uses-sdk:minSdkVersion 14 cannot be smaller than version 14 declared in library com.android.support:support-v4:21.0.0-rc1 I understood that it is because it’s trying to compile the library […]

Dagger 2 and android Studio: working but can't see generated classes

I’m trying to use Dagger 2 in an Android Studio Project. I’ve used the CoffeeMaker example. I’ve managed to make the app build and working however: – I don’t success in seeing the generated code. – If I debug, I can’t see it neither. – Moreover DaggerCoffeeApp_Coffee as marked as reed (Cannot resolve symbol) My […]

File res/drawable/abc_ic_ab_back_material.xml from drawable resource ID #0x7f020016

This question already has an answer here: Update Android Support Library to 23.2.0 cause error: XmlPullParserException Binary XML file line #17<vector> tag requires viewportWidth > 0 26 answers

Android Test Module (Gradle Plugin 1.3) doesn't work: “debug-classes not found”

I’m attempting to set up a unit test module as described in the android studio blog post. However, doing a gradle build fails telling me “Configuration with name ‘debug-classes’ not found”. Debug is the name of the targetVariant it’s trying to build, but I don’t understand what is going wrong here. Here’s my test module’s […]

com.android.dex.DexException: Multiple dex files define

I am using Android Studio 0.4.2. Opened project from a friend who is using 0.3.2. Tried to compile but got exception. Execution failed for task ‘:JuiceTV:dexDebug’. > com.android.ide.common.internal.LoggedErrorException: Failed to run command: C:\Program Files\Android\android-studio\sdk\build-tools\19.0.0\dx.bat –dex –output D:\Antik TV – Android\JuiceTV\build\libs\JuiceTV-debug.dex D:\Antik TV – Android\JuiceTV\build\classes\debug D:\Antik TV – Android\JuiceTV\build\dependency-cache\debug D:\Antik TV – Android\JuiceTV\build\pre-dexed\debug\classes-ffe9228b675e120536184b1056a59fcfc91e4006.jar D:\Antik TV – […]

Getting unknown property 'classpath' with Jack compiler for Android

I am trying to compile my project with the next Jack compiler. I just updated Android Studio to 2.2-Beta and my gradle plugin to 2.14.1. Here’s my gradle file: buildscript { repositories { mavenCentral() jcenter() } dependencies { classpath ‘com.android.tools.build:gradle:2.2.0-beta1’ classpath ‘com.neenbedankt.gradle.plugins:android-apt:1.8’ classpath ‘com.github.jacobono:gradle-jaxb-plugin:1.3.6’ } } allprojects { repositories { jcenter() } } task clean(type: […]

How to turn on console output in Android Unit tests?

Is there any way to turn on the test logging in the console output? I know that we can look at the test results generated in a HTML file and check standard output there, but I find it a little bit inconvinient. I know that there is a way to do this with standard java […]

Why Android Gradle preDexDebug “Source and destination must be different” build failed?

I have an Android application built with Android Studio 0.8.1 and facing the issue: Error:Execution failed for task ‘:app:preDexDebug’. > java.lang.IllegalArgumentException: Source C:\Users\mfedorov\AndroidStudioProjects\EPOS2\app\build\intermediates\pre-dexed\debug\mate-api-0.0.1-SNAPSHOT-0ef7e3259aeaf19202f545da97dc6b1ae2502c9a.jar and destination C:\Users\mfedorov.ALTIUS-PLUS\AndroidStudioProjects\EPOS2\app\build\intermediates\pre-dexed\debug\mate-api-0.0.1-SNAPSHOT-0ef7e3259aeaf19202f545da97dc6b1ae2502c9a.jar must be different Here’s my build.gradle file contents (the part that I have changed, the rest is default) configurations.all { // check for updates every build resolutionStrategy.cacheChangingModulesFor 0, ‘seconds’ […]

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