Tag: android-gradle

Error:Jack is required to support java 8 language features

This question already has an answer here: How to enable Jack (Java Android Compiler Kit) in android studio 5 answers

Duplicate files copied (Android Studio 0.4.0)

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

Gradle, Android and the ANDROID_HOME SDK location

edit: (aug-2016) That question is from November 2013 (while Android Studio was still in Developer Preview mode), Currently (AS v2.2, Aug-2016) during instalation AS asks to choose the SDK folder (or install on their default) and it automatically applies to which ever project you’re opening. That means any possible workaround or fix is irrelevant as […]

How to set versionName in APK filename using gradle?

I’m trying to set a specific version number in the gradle auto-generated APK filename. Now gradle generates myapp-release.apk but I want it to look something like myapp-release-1.0.apk. I have tried renaming options that seems messy. Is there a simple way to do this? buildTypes { release { signingConfig signingConfigs.release applicationVariants.each { variant -> def file […]

What Product Flavor does Android Studio build by default in build.gradle?

We have an Android project that uses the new Gradle build system, and we use Android Studio as a development tool. When there are several product flavors specified in build.gradle, we notice that Android Studio builds the first one specified alphabetically. Is there a way to tell Android Studio to build and test only a […]

Adding local .aar files to Gradle build using “flatDirs” is not working

I’m aware of this question: Adding local .aar files to my gradle build but the solution does not work for me. I tried adding this statement to the top level of my build.gradle file: repositories { mavenCentral() flatDir { dirs ‘libs’ } } I’ve also put the slidingmenu.aar file into /libs and referenced it in […]

how can I add the aidl file to Android studio (from the in-app billing example)

I am currently migrating an Eclipse app to Android Studio. This app was using the in app billing. My main problem is to compile the project and the aidl file (I guess you all use this file) I get this error message: Gradle: error: cannot find symbol class IInAppBillingService Gradle: error: package IInAppBillingService does not […]

finished with non zero exit value

I am trying to import my project. but when I run the application I am getting the following error: Error: Execution failed for task ‘:app:processDebugResources’. > com.android.ide.common.process.ProcessException: org.gradle.process.internal.ExecException: Process ‘command ‘C:\Users\Vishnu Ruhela\AppData\Local\Android\sdk\build-tools\21.1.2\aapt.exe” finished with non- zero exit value 1 here is my gradle file apply plugin: ‘com.android.application’ android { compileSdkVersion 21 buildToolsVersion “21.1.2” defaultConfig { […]

Android Gradle Apache HttpClient does not exist?

I am trying to convert an IntelliJ project to the Gradle system of Android Studio but I am running into errors with Apache HttpClient? Am I missing something, the errors I am getting are as follows: Error:(10, 30) error: package org.apache.http.client does not exist Error:(11, 30) error: package org.apache.http.client does not exist Error:(12, 37) error: […]

Automatically accept all SDK licences

Since gradle android plugins 2.2-alpha4: Gradle will attempt to download missing SDK packages that a project depends on Which is amazingly cool and was know to be a JakeWharton project. But, to download the SDK library you need to: accept the license agreements or gradle tells you: You have not accepted the license agreements of […]

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