Questions tagged [android-build]

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

882 questions
31
votes
3 answers

Android Studio: Switching a URL depending on buildtype? (used for testing in debug /release)

I have been reading something about variants and buildtypes and I don't know if I am understanding it right but I would like to store a URL for locahost (testing) and one for production (live site on the internet). And I need to switch them…
Martin
  • 23,844
  • 55
  • 201
  • 327
28
votes
1 answer

What is the use of LOCAL_MODULE_TAGS?

I want to update my Android.mk file in a package in order to build that new package, but I don't understand what the purpose of the LOCAL_MODULE_TAGS is. What does the LOCAL_MODULE_TAGS do?
28
votes
4 answers

Speed up Android project build time in IntelliJ IDEA

I am wondering, if there is any way, how to set skip packaging and dexing in IntelliJ IDEA like in Eclipse and ADT. There is Additional VM Options field in Android DX Compiler section in IntelliJ Preferences, maybe this could be a way, how to set…
sealskej
  • 7,281
  • 12
  • 53
  • 64
27
votes
4 answers

How to set different applicationId for each flavor combination using flavorDimensions?

I have and old android app that I am trying to migrate to the android gradle build system. The app is currently built in a multi project setup and published as four different apps (two different data sets included and free/paid versions for both…
Fredrik
  • 487
  • 5
  • 12
26
votes
1 answer

How to create build.xml for an Android project?

I've been trying to run simple programs that I obtained directly from the Source Code download for the book 'Beginning Android 4'. However, I have lots of problems with the build.xml files (see previous questions, which are unanswered). My latest…
JB_User
  • 3,117
  • 7
  • 31
  • 51
25
votes
5 answers

Android Instant App: How to create URL addressable modules?

Google updated their documentation about instant apps recently: Prepare your app Most of the points are clear except 3. Refactor your app, if necessary. They suggest for retail modules like browse, search, item detail, and check out. Question: How…
25
votes
6 answers

Android source code compile error: "Try increasing heap size with java option '-Xmx'"

Error happens when I try to compile Android source code(Sourcecode-version: 6.0.1; RAM: 6G; host system: ubuntu 14.04),log is below: including ./system/netd/Android.mk ... including ./system/security/keystore-engine/Android.mk ... including…
Eddy.Liu
  • 253
  • 1
  • 3
  • 6
25
votes
2 answers

Gradle compile error "No Signature of Method"

When I try to run ./gradlew build.gradle from terminal, I have been getting following error: > No signature of method: org.gradle.api.internal.artifacts.dsl.dependencies.DefaultDependencyHandler.compile() is applicable for argument types:…
user2506411
  • 303
  • 1
  • 5
  • 10
24
votes
6 answers

How to show compilation errors in android studio

I want to know how to show compilation errors in Android Studio. I tried the following one: Android Studio: Where is the Compiler Error Output Window? But it is showing another error: javac: invalid target release: 1.8 Anybody who knows the actual…
iamcrypticcoder
  • 2,609
  • 4
  • 27
  • 50
23
votes
3 answers

Change apk output folder in Gradle 4.1

I would like to change the APK output folder and this is what I used to do: applicationVariants.all { variant -> variant.outputs.all { def filePath = "${rootProject.rootDir.absolutePath}/apks/${variant.name}" println("My Path: "…
23
votes
2 answers

How to hide Android sdkmanager download progress bar?

When I run an sdkmanager command like sdkmanager "build-tools;26.0.1" it spits out hundreds of lines in Jenkins console because of the download progress bar. Is there a way to hide it or put it in quiet mode? I don't see an option in sdkmanager…
23
votes
5 answers

How to do an android mm clean?

I'm building custom module in Android source using the mm command. When I run mm clean, it seems that the whole project is cleaned. How can I restrict the clean to just the current module?
herbertD
  • 10,657
  • 13
  • 50
  • 77
22
votes
6 answers

Disable Android resource / image / PNG optimization

How do I prevent the Android "build process" from optimizing .png images? I have an Android project with the following res directories: - /res/ - /res/drawable - /res/drawable-hdpi - /res/drawable-hdpi-v5 - /res/drawable-ldpi -…
Maris B.
  • 2,333
  • 3
  • 21
  • 35
21
votes
5 answers

Hello world using the Android SDK alone (no IDE)

My aims are to: Test the basic development tools on a simple program Expand the program into a useful app I prefer to work with small, independent tools as opposed to IDEs. I prefer to code in a procedural or imperative style (plain old Java) as…
Michael Allan
  • 3,731
  • 23
  • 31
19
votes
2 answers

Vector drawables that are automatically converted to pngs

At Google IO, the Tools team briefly showed the possibility to define vector drawables with a specific suffix (e.g. ic_heart_48px.xml) that will then be converted to pngs of all necessary densities. Unfortunately I don't find any documentation about…
Taig
  • 6,718
  • 4
  • 44
  • 65
1 2
3
58 59