Questions tagged [android-build]

For questions related to the build process of Android Applications, for all build tools.

882 questions
69
votes
3 answers

How to build the Android sample projects using Ant? build.xml does not exist

I believe I've followed the instructions in the Android SDK, and I'm now trying to build the sample LunarLander (random one picked) $ cd samples/android-11/LunarLander $ ant debug Buildfile: build.xml does not exist! Build failed I believe all…
Kalen
  • 3,106
  • 8
  • 29
  • 42
59
votes
3 answers

Where does local.properties go for android project?

Getting this complaint from IntelliJ 13: 8:15:48 PM Gradle '' project refresh failed: SDK location not found. Define location with sdk.dir in the local.properties file or with an ANDROID_HOME environment variable. …
pfrank
  • 2,090
  • 1
  • 19
  • 26
55
votes
5 answers

How to change the Android app package name when assembling with Gradle?

Is it possible to change the package name of an Android application using Gradle? I need to compile two copies of the same app, having a unique package name (so I can publish to the market twice).
Seraphim's
  • 12,559
  • 20
  • 88
  • 129
51
votes
3 answers

warning : The following options were not recognized by any processor: '[dagger.fastInit, kapt.kotlin.generated]'

I get this warning when I try to run or build an app in Android Studio. Why am I getting this? Do I need to heed this warning? The following options were not recognized by any processor: '[dagger.fastInit, kapt.kotlin.generated]'
Bincy Baby
  • 3,941
  • 5
  • 36
  • 62
50
votes
6 answers

Android Build: Dex Jumbo Mode in Gradle

I am using following line in android ant build (project.properties): dex.force.jumbo=true Now we are migrating from ant to Gradle. Is it possible to get jumbo mode active in Android Gradle build?
endian
  • 4,761
  • 7
  • 32
  • 54
49
votes
4 answers

How to update Gradle dependencies to their latest version

Is there an easy way to get gradle to update dependencies to their latest available version? For build reproducibility all my dependencies are defined with a version number like this in my build.gradle file: dependencies { compile…
44
votes
10 answers

Automatic versioning of Android build using git describe with Gradle

I have searched extensively, but likely due to the newness of Android Studio and Gradle. I haven't found any description of how to do this. I want to do basically exactly what is described in this post, but with Android Studio, Gradle and Windows…
Mike Yount
  • 443
  • 1
  • 5
  • 8
42
votes
8 answers

Google-play-services_lib Unable to resolve target 'android-9

When I start up my Android ADT most if not all of my projects have a red exclamation next to them. And when I try to build and run them I get an error: "google-play-services_lib] Unable to resolve target 'android-9'" I am not sure what this means…
Randolph
  • 951
  • 2
  • 11
  • 24
42
votes
5 answers

Run task before compilation using Android Gradle plugin

I have a very simple build.gradle file with the following content: buildscript { repositories { mavenCentral() } dependencies { classpath 'com.android.tools.build:gradle:0.4.1' } } apply plugin: 'android' android…
Michael
  • 53,859
  • 22
  • 133
  • 139
39
votes
3 answers

How to convert an Eclipse Android project to use Ant for build?

I have an Android project in Eclipse I would like to convert to be built with Ant instead. How can I achieve this? I have tried exporting an Ant build file but I'm pretty sure that's not going to work (nor does it when running ant with the exported…
Jason
  • 4,034
  • 4
  • 40
  • 62
33
votes
1 answer

Why won't gradle override Java classes in different Android flavors?

I have an android app with 2 flavors: -flavor1 -flavor2 My directory tree is : /src/main /src/flavor1 /src/flavor2 main has the default source set. flavor1, and flavor2 directories have their own source set, that gradle gets automatically. If I…
agustinaliagac
  • 829
  • 10
  • 24
33
votes
6 answers

How to use the Renderscript Support Library with Gradle

Is it possible to use the Support Renderscript Library with Gradle? If so, how do you include it in your project?
Janusz
  • 187,060
  • 113
  • 301
  • 369
33
votes
2 answers

Difference between eng and user-debug build in Android

I would like to know the difference between the two build_flavor's viz. eng & user-debug The difference between eng and user build flavors is quiet evident. But eng and user-debug is confusing me somewhat. What are the additional Debug facilities…
spitfire88
  • 1,596
  • 3
  • 19
  • 31
32
votes
4 answers

Invalid source release 1.7 error when compiling with gradle

I need 1.7 for a library which uses diamond operators. I followed these sO answers...but no joy. From gradle build compileSdkVersion 19 buildToolsVersion '19.0.3' compileOptions { sourceCompatibility JavaVersion.VERSION_1_7 …
serenskye
  • 3,467
  • 5
  • 35
  • 51
31
votes
3 answers

Android separate string values for release and debug builds

Every time i release my app i change all my url strings and some keys from testing to production. The way I do it is just comment out the testing strings before i release. Is there a better way to handle strings based on the build type ?
spaceMonkey
  • 4,475
  • 4
  • 26
  • 34
1
2
3
58 59