build.gradle

Android linker: undefined reference to bsd_signal

大城市里の小女人 提交于 2019-11-30 07:25:05
I'm running gradlew to compile an Android app that has a static lib dependency. Somehow, I have an undefined reference to bsd_signal . I was able to compile this app with gradle 1.X, but I've been obliged to switch to gradle 2.10 and to drop my Android.mk file in favour of putting more build instruction into my gradle.build file, and this is where the trouble arises. Can anyone tell me whether there is a library that defines bsd_signal , which I should link to my project? Compiler output Starting process 'command '/home/myself/Android/Sdk/ndk-bundle/toolchains/arm-linux-androideabi-4.9

Android Gradle - load signing config from external file

一曲冷凌霜 提交于 2019-11-30 07:11:05
问题 In Gradle for Android it seems to be commons practice to define your signing config for release build like this: android { signingConfigs { debug { storeFile file("debug.keystore") } myConfig { storeFile file("other.keystore") storePassword "android" keyAlias "androiddebugkey" keyPassword "android" } } buildTypes { foo { debuggable true jniDebugBuild true signingConfig signingConfigs.myConfig } } } Thing is, I want to keep my build.gradle file in version control and don't have a good feeling

How to set my gradle for final release apk

我是研究僧i 提交于 2019-11-30 07:06:53
Earlier my gradle was like this: WHICH IS OFCOURSE INCORRECT apply plugin: 'android' android { compileSdkVersion 19 buildToolsVersion '19.0.3' defaultConfig { minSdkVersion 11 targetSdkVersion 19 versionCode 1 versionName "1.0" } buildTypes { release { runProguard false proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.txt' } } } dependencies { compile 'com.android.support:gridlayout-v7:19.0.1' compile 'com.android.support:appcompat-v7:+' compile fileTree(dir: 'libs', include: ['*.jar']) compile 'com.android.support:support-v4:+' compile 'com.google.android.gms:play

Multiple dex files define Landroid/support/design/widget/CoordinatorLayout$LayoutParams

邮差的信 提交于 2019-11-30 06:37:46
I'm getting Multiple dex files define error in my project. I'm using these two tags in build.gradle as well dexOptions { preDexLibraries = false } defaultConfig { multiDexEnabled true } but still getting this error. Information:Gradle tasks [:app:assembleDebug] Error:Error converting bytecode to dex: Cause: com.android.dex.DexException: Multiple dex files define Landroid/support/design/widget/CoordinatorLayout$LayoutParams; Error:com.android.dex.DexException: Multiple dex files define Landroid/support/design/widget/CoordinatorLayout$LayoutParams; Error: at com.android.dx.merge.DexMerger

Android studio, configure gradle project takes forever

安稳与你 提交于 2019-11-30 06:29:32
问题 After changing the gradle build file to use gradle build tool 0.8.+, classpath 'com.android.tools.build:gradle:0.8.+' my Android studio is stuck forever at "refreshing X Gradle project". I tried to restart AS, didn't work. I did even change gradle build tool back to 0.7.+, even downgrade my AS from 0.4.4 back to 0.4.2, still no hopes. Anyone experienced this before? pls help Tks. Update : now I tried deleting all old .iml files and .idea folder, and reimported, now it's stuck at "Building X

After update - Error:Failed to find: com.google.android.gms:play-services:5.2.8

假装没事ソ 提交于 2019-11-30 06:22:02
Gradle project sync failed. After update the android SDK i got this error: Error:Failed to find: com.google.android.gms:play-services:5.2.8 I have checked that the sdk location wich is updated is used by android studio I've got Google Repository installed and Android Support Repository too all up 2 date. Also i have a ANDROID_HOME local variable pointing to the sdk im actually using try using com.google.android.gms:play-services:5.2.08 instead of 5.2.8. you can also look for the right version number in your services directory: .. /android-studio/sdk/extras/google/m2repository/com/google

Getting Error: Execution failed for task app:transformClassesWithMultidexlistForDebug

|▌冷眼眸甩不掉的悲伤 提交于 2019-11-30 06:03:01
问题 i've tried nearly everything at other topics but i have the same problem in my rss reader app. How can i fix it? i'm getting this error: Error:Execution failed for task ':app:transformClassesWithMultidexlistForDebug'. com.android.build.api.transform.TransformException: com.android.ide.common.process.ProcessException: org.gradle.process.internal.ExecException: Process 'command 'C:\Program Files\Java\jdk1.7.0_79\bin\java.exe'' finished with non-zero exit value 1 i've updated AS to 2.12, java

Gradle 3.0.0 alpha variant output issue

耗尽温柔 提交于 2019-11-30 05:44:58
问题 I want to have a different versionCode for debug build type rather than the one in release build type. This used to work by using the configuration from below in Gradle Android plugin v2.3.2 (Gradle v3.3), but doesn't have any effect now in v3.0.0-alpha5 (Gradle v4.1-milestone-1). Any ideas as to what changed in the newest Gradle plugin that makes it ignore the variant.mergedFlavor.versionCode attribute? buildTypes { debug { applicationIdSuffix ".debug" versionNameSuffix "-" + buildTime()

Using Proguard to remove unused classes in Google Play Services library

旧街凉风 提交于 2019-11-30 05:17:32
问题 I'm trying to get rid of unused classes from Google Play Services library. I've created brand new android project with single empty activity. The project does not use anything from Google Play Services library. So I would expect, that when I build release (which includes running proguard in my configuration) I will see no difference in binary size comparing building with/without play-services dependency. But actually, I see ~700 KB difference in apk size. I've found relatively complex

Code Path per Flavor in Android Gradle

六眼飞鱼酱① 提交于 2019-11-30 05:02:17
I have 2 buildTypes (debug, release) and 2 productFlavors (product1, product2). I want to define a buildConfigField for each buildType and productFlavors. The buildConfigField is the url the app to download data from the server, and it changes for each productFlavor and buildTypes. Now, I have: buildTypes { debug { debuggable true } release { debuggable false } } productFlavors { product1 { buildConfigField STRING, "URL_BASE", '"https://api1.release.com"' } product2 { buildConfigField STRING, "URL_BASE", '"https://api2.release.com"' } } But I want something like this: buildTypes { debug {