android-build

“Conversion to Dalvik format failed with error 1” — on export only

牧云@^-^@ 提交于 2019-12-17 17:38:36
问题 I know this is a repeat question but I've read and tried every solution on this site and I'm still getting the error; also, I'm getting it ONLY when I export my signed apk from Eclipse. I'm able to build and run the unsigned apk. I have: Deleted (and later restored) all libraries from the build path Cleaned and rebuilt all my projects Restarted Eclipse with -clean option Re-create the app project from scratch I know error 1 means I have duplicate symbols but I've checked, clean and rebuilt my

How to use the Renderscript Support Library with Gradle

你说的曾经没有我的故事 提交于 2019-12-17 06:35:34
问题 Is it possible to use the Support Renderscript Library with Gradle? If so, how do you include it in your project? 回答1: 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

Run task before compilation using Android Gradle plugin

淺唱寂寞╮ 提交于 2019-12-17 05:01:22
问题 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 { buildToolsVersion "17.0.0" compileSdkVersion 17 sourceSets { main { manifest.srcFile 'AndroidManifest.xml' res.srcDirs = ['res'] assets.srcDirs = ['assets'] } } } task generateSources { doFirst { def script = "python GenerateSources.py".execute() script.in.eachLine {line -> println

How to configure gradle to work “offline” (using cached dependencies)

白昼怎懂夜的黑 提交于 2019-12-17 02:31:21
问题 I have a command line apk generator which compiles a lot of APKs using the same source code, so these apps have the same dependencies. In the gradle documentation I can see this: The Gradle project needs network connectivity to download dependencies. I know that it is possible to configure gradle to work offline and not download the same dependencies that it has downloaded for other apks. How can this offline mode be activated? 回答1: Gradle does a good job of avoiding re-downloading artifacts,

Android application signing: Proguard returned with error code 1. see console

落爺英雄遲暮 提交于 2019-12-14 01:32:50
问题 I have built an application that uses JacksonJson as a library. I am trying to export it as a signed application and getting the proguard error. I have tried various solutions posted on the internet, but none seems to work. Any help will be appreciated. Console : Proguard returned with error code 1. See console Warning: com.fasterxml.jackson.jaxrs.base.JsonMappingExceptionMapper: can't find superclass or interface javax.ws.rs.ext.ExceptionMapper Warning: com.fasterxml.jackson.jaxrs.base

Vendor application build AOSP

雨燕双飞 提交于 2019-12-13 20:17:50
问题 I have to build an android application in AOSP source tree with vendor config. Which have some pre-build .so files, I have loaded the .so files by using the following configuration LOCAL_PATH := $(call my-dir) include $(CLEAR_VARS) LOCAL_MODULE_TAGS := optional LOCAL_PACKAGE_NAME := MySample LOCAL_CERTIFICATE := platform # SRC files #====================================== LOCAL_SRC_FILES := $(call all-java-files-under, src) \ $(call all-Iaidl-files-under, aidl) LOCAL_AIDL_INCLUDES := $(LOCAL

Proguard error with fresco

落花浮王杯 提交于 2019-12-13 14:28:14
问题 I am using ProGuard and when I am running the project in release configuration, I get the following error: Warning:com.facebook.imagepipeline.bitmaps.DalvikBitmapFactory: can't find referenced field 'android.graphics.Bitmap$Config BITMAP_CONFIG' in program class com.facebook.imagepipeline.nativecode.Bitmaps I searched everywhere but couldn't find any clue to solve it. I have updated my proguard-rules.pro with what is given in the fresco's docs page. Fresco dependency: compile 'com.facebook

Android Customize Workflow for Product Flavors

房东的猫 提交于 2019-12-11 12:38:34
问题 I have an app with a bunch of product flavors which are basically white labels of a single app. However, once in a while, there is some divergence from the main flow in some flavor because the client wants something slightly different. So far, we have been editing the code for those cases and using spaghetti code (lots of ifs and elses) to make sure the other apps don't break. Needless to say this isn't a very scalable (or even sane) way to do this. One option would be to write the activity

Android studio: preDexDebug failed

假装没事ソ 提交于 2019-12-11 09:35:49
问题 I got an error building android project, even a hello world project: Console output: FAILURE: Build failed with an exception. * What went wrong: Execution failed for task ':app:preDexDebug'. > com.android.ide.common.internal.LoggedErrorException: Failed to run command: /Applications/Android Studio.app/sdk/build-tools/19.1.0/dx --dex --output /Users/luyaochen/Documents/and/MyApplication3/app/build/intermediates/pre-dexed/debug/internal_impl-20.0.0-20e875ec0585f022fce03f5b07d31a0222ca3f58.jar

Failing to build Xamarin Android project: An outdated of 'Android SDK Build-tools' is in use

て烟熏妆下的殇ゞ 提交于 2019-12-11 05:38:36
问题 I'm trying to compile Android project of my Xamarin Form solution, and it fails with the following exception: An outdated of 'Android SDK Build-tools' is in use which this version of Android Support Library does not support. You must uninstall any 'Android SDK Build-tools' versions older than 23.0.0 from the 'Tools' section in your 'Android SDK Manager' You also need to install 'Android SDK Build-tools' version 23.0.0 or higher. Invoice.Android This happened after I updated some components