android-build

Gradle build slow on transformClassesWithDexForDebug

不羁的心 提交于 2019-12-03 01:53:55
问题 Building my Android app takes about 90 seconds ( "fast" ), up to 3 minutes for each update to my code. It's a complete waste of time as it really and I assume a solution must be within reach. I tried investigating the issue and found different blog-posts and SO answers with suggestions, most of which I've tried. I have the gradle.properties file with org.gradle.deamon=true I run on Android Studio with Gradle Prefence to do offline work (improved, but still slow) I run on command line (which

Building separate Android modules with dexpreopt disabled

守給你的承諾、 提交于 2019-12-02 23:52:05
For my thesis, I'm modifying the android framework and building the source (4.1.1 Jelly Bean). I can do a full build, but because this is very time consuming (I'm developing on a ubuntu 12.04 64bit virtual machine) I'd like to build separate modules. For example: When doing changes to the location modules, it should be possible to just build the changed module, and make a new system image: mmm frameworks/base make snod But this doesn't work. Every time I try to boot, the new system image won't boot because of: I/dalvikvm( 1696): DexOpt: mismatch dep signature for '/system/framework/framework

How to build my own Android SDK

寵の児 提交于 2019-12-02 21:10:37
I work on my own android device which has many new APIs (but @hide decorated). My goal is to provide an android sdk to develop on it and use these new APIs. So my questions is : How to build my own android sdk with these new APIs ? If the @hide decorated is a problem, i can remove them (I don't have to respect the CDD ) You can use this command make -j8 PRODUCT-sdk-sdk showcommands dist here, you can a discussion about it : https://groups.google.com/forum/?fromgroups=#!topic/android-building/Y0xduZPWtUs I think the concept of SDK is being misunderstood here. If you want to release a set of

Change apk output folder in Gradle 4.1

梦想的初衷 提交于 2019-12-02 20:35:06
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: " + filePath) outputFileName = filePath } } However, it didn't work in Gradle 4.1 (Android studio 3.0 preview). Instead of generating the folder as the path above, it generated the above path inside old debug folder like image below: Does anyone have a solution for this? Thanks. This is a workaround to keep the output path same after upgrade to gradle 4.x.

Slow SDK download through Android SDK manager

╄→гoц情女王★ 提交于 2019-12-02 17:22:31
When I run Android SDK manager to download SDK platform, the download speed is 8 KiB/s. It would take more than 2 hours to download one platform like Android 2.2, API 8. There is no problem with download stuff through browser. Does anyone know how to fix this problem? I have not experienced this issue. Force or unforce HTTPS (there is an option for this under Settings), and see if this improves the quality of your connection. StudioArena I also have this problems and found a solution online and it looks like it working for now. I tried with forcing HTTP AND HTTPS and nothing really work. So

Gradle build slow on transformClassesWithDexForDebug

此生再无相见时 提交于 2019-12-02 14:02:51
Building my Android app takes about 90 seconds ( "fast" ), up to 3 minutes for each update to my code. It's a complete waste of time as it really and I assume a solution must be within reach. I tried investigating the issue and found different blog-posts and SO answers with suggestions, most of which I've tried. I have the gradle.properties file with org.gradle.deamon=true I run on Android Studio with Gradle Prefence to do offline work (improved, but still slow) I run on command line (which is faster, but still slow) In build.gradle, defaultConfig, I have multiDexEnabled set to false In build

Getting Transform Exception while building the project [duplicate]

試著忘記壹切 提交于 2019-12-01 20:50:49
This question already has an answer here: com.android.build.transform.api.TransformException 24 answers I am getting the following error when I try to run my app: Error:Execution failed for task ':app:transformClassesWithDexForDebug'. > com.android.build.transform.api.TransformException: com.android.ide.common.process.ProcessException: org.gradle.process.internal.ExecException: Process 'command '/usr/lib/jvm/java-7-openjdk-amd64/bin/java'' finished with non-zero exit value 3 Here is my app level build.gradle : buildscript { repositories { maven { url 'https://maven.fabric.io/public' } }

How are .java files in android_stubs_current_intermediates directory generated?

≡放荡痞女 提交于 2019-12-01 17:44:33
问题 The Android build process generates(?) Java stubs for each of the classes in the android.jar, and stores them in the following directory: ./out/target/common/obj/JAVA_LIBRARIES/android_stubs_current_intermediates/src/ For example, the subdirectory java/lang/ of the above directory contains .java files corresponding to java.lang.* classes, and the subdirectory `android/app/' contains .java files corresponding to android.app.* classes. These .java files dont contain actual code, but just

Prevent ndk-build from automatically cleaning module

主宰稳场 提交于 2019-12-01 04:33:32
On my current setup (ndk r8c) ndk-build performs a clean step ( V=1 shows rm in action) without issuing clean explicitly. I'd like to change this behavior - I'm currently having linking problems and (re-)compilation takes more than 5 minutes. How can I do this? I suppose you are fasing a bug of NDK r8c. See this thread: http://code.google.com/p/android/issues/detail?id=39810 . You can downgrade to a previous NDK release or apply the suggested patch. The patch is to change a single line 289 in build/core/definitions.mk from $1: $$(__ndk_file_dir) to $1: | $$(__ndk_file_dir) 来源: https:/

Prevent ndk-build from automatically cleaning module

寵の児 提交于 2019-12-01 02:09:29
问题 On my current setup (ndk r8c) ndk-build performs a clean step ( V=1 shows rm in action) without issuing clean explicitly. I'd like to change this behavior - I'm currently having linking problems and (re-)compilation takes more than 5 minutes. How can I do this? 回答1: I suppose you are fasing a bug of NDK r8c. See this thread: http://code.google.com/p/android/issues/detail?id=39810. You can downgrade to a previous NDK release or apply the suggested patch. The patch is to change a single line