android-build

failed to find target with hash string android-23

有些话、适合烂在心里 提交于 2019-11-27 11:44:29
When trying to build OpenStreetMapView from git://github.com/osmdroid/osmdroid, I get this error: failed to find target with hash string android-23: D:\Users\myusername\AppData\Local\Android How can I fix this? Previous questions similar to this suggest checking that android 23 is not installed, but in my case, it is. Below is some pertinent info: ANDROID_HOME is D:\Users\myusername\AppData\Local\Android\sdk D:\Users\myusername\AppData\Local\Android\sdk\platforms\ contains the directory \android-23\, (as well as android-19, android-21, android-22, android-MNC) build.gradle apply plugin: 'com

Disable Manifest Merger in Android Gradle Build

旧巷老猫 提交于 2019-11-27 08:22:50
I am using the new gradle android buildsystem. The project consists of two android library projects and one main project. Using the ant build, the manifest merger must be enable in project.properties. But when using the gradle build system the manifest merger is enabled by default. How can i disable the manifest merger? Edit: this is actually possible though indirectly, starting with 0.3 What you need to do is disable the processManifest task so that it doesn't run and tell the processResources where the manifest to use is: android.applicationVariants.all { variant -> variant.processResources

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

▼魔方 西西 提交于 2019-11-27 06:59:59
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 datasets). I have managed to get away from the multi project setup by using flavorDimensions (previously called flavorGroups), but I can not figure out how to set a different applicationId for each flavor combination. Since the app versions are already published, I need to keep the same applicationid as they currently have. Because of how my original

How to create build.xml for an Android project? [duplicate]

十年热恋 提交于 2019-11-27 05:42:08
问题 This question already has an answer here: How to build the Android sample projects using Ant? build.xml does not exist 4 answers 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 is, which comes from the a simple Label demo program: # ant debug Buildfile: /home/me/src/ANDROID/MyProjects/Label/build

Android Build: Dex Jumbo Mode in Gradle

自古美人都是妖i 提交于 2019-11-27 05:24:03
问题 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? 回答1: You can modify your build.gradle file to include: android { dexOptions { jumboMode = true } } 回答2: Modify build.gradle in your module to add: android { dexOptions { jumboMode = true } } After that run gradle clean in your project root 回答3: I'm not sure if it possbile to set force jumbo in Gradle

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

独自空忆成欢 提交于 2019-11-27 03:38:07
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). Ethan You could so something like this android { ... defaultConfig { minSdkVersion 8 versionCode 10 } flavorDimensions "flavor1", "flavor2" productFlavors { flavor1 { applicationId "com.example.flavor1" versionCode 20 } flavor2 { applicationId "com.example.flavor2" minSdkVersion 14 } } } You can also change the field android.defaultConfig.applicationId if you want to do one-off builds. Taken from:

Android Gradle Plugin 1.1.0 - getNdkFolder() not found anymore, any replacement?

我是研究僧i 提交于 2019-11-27 03:22:46
问题 I just updated android Gradle plugin to 1.1.0 from 1.0.0, and I got this error: No signature of method: com.android.build.gradle.LibraryPlugin.getNdkFolder() is applicable for argument types: () values: [] I tried to find diff of gradle plugin 1.0.0 to 1.1.0 but couldn't find anywhere online. Seems like getNdkFolder method has been either changed or removed. Is there a replacement ? Or any other way to get NdkFolder ? I'm using that method like this, def ndkDir = project.plugins.findPlugin (

How do I run the Android Emulator after a Build?

橙三吉。 提交于 2019-11-27 02:57:38
问题 So I have download the source code successfully, built it successfully, and can run the emulator successfully. However it never boots into the actual image. Instead I look at the terminal and it gives me the following error. OpenGL Warning: XGetVisualInfo returned 0 visuals for 0x2deae10 OpenGL Warning: Retry with 0x105 returned 1 visuals Failed to create Context 0x3005 emulator: WARNING: Could not initialize OpenglES emulation, using software renderer. destroyOpenGLSubwindow not implemented

Android Studio: Error:Execution failed for task ':app:dexDebug'

Deadly 提交于 2019-11-27 02:46:59
问题 I'm using Android Studio for the first time and I got the following error after importing the project (previously it was an eclipse project where I had issues too.) Here is the information given: Error:Execution failed for task ':app:dexDebug'. > com.android.ide.common.internal.LoggedErrorException: Failed to run command: /home/crash-id/Development/SDK/adt-bundle-linux-x86_64-20140702/sdk/build-tools/21.1.2/dx --dex --no-optimize --output /home/crash-id/AndroidstudioProjects/LocalSin/app

How to use the Renderscript Support Library with Gradle

两盒软妹~` 提交于 2019-11-27 00:57:08
Is it possible to use the Support Renderscript Library with Gradle? If so, how do you include it in your project? Tim Murray Gradle for Android has now Renderscript v8 support with only 2 lines in your build script. See answer by Austyn Mahoney . Keeping the original answer for historical purpose. Old Answer: Gradle supports native RS compilation, but not the RS support library. The reason is that the RS support library is hugely complicated compared to any other support library. The RS support library is actually a Java support library, a set of native libraries backing that Java lib,