android-gradle

Android gradle: buildtoolsVersion vs compileSdkVersion

╄→尐↘猪︶ㄣ 提交于 2019-11-26 23:48:58
What's the difference between buildtoolsVersion vs compileSdkVersion in the build.gradle for an Android project? EDIT: Specifically, I'd like clarification on what the build tool is? compileSdkVersion is the API version of Android that you compile against. buildToolsVersion is the version of the compilers (aapt, dx, renderscript compiler, etc...) that you want to use. For each API level (starting with 18), there is a matching .0.0 version. At IO 2014, we release API 20 and build-tools 20.0.0 to go with it. Between Android releases we will release updates of the compilers, and so we'll release

How to configure NDK with Android Gradle plugin 0.7

馋奶兔 提交于 2019-11-26 23:40:45
The new Android gradle plugin (0.7) seems to include new support for the NDK, but in the documentation there is little to no mention of it (the only reference I found is a test called ndkSanAngeles ). It looks like gradle is looking for the NDK, which I have included in my PATH. However, building the project fails with What went wrong: Execution failed for task ':OGLTests:compileDefaultFlavorDebugNdk'. NDK not configured How can I configure the NDK in gradle? My current build.gradle looks like this: task nativeLibsToJar(type: Zip, description: 'create a jar with native libs') { destinationDir

Android buildscript repositories: jcenter VS mavencentral

爷,独闯天下 提交于 2019-11-26 23:28:28
The last time I used Android Studio, it generated .gradle files with mavencentral() buildscript repositories whereas now there's jcenter() . Could anyone explain the issues connected with this. Are there any other repos? When should we switch them? What impact do they have on projects, modules, libs? Any other essentials for Android developers? Who's responsible for maintaining those repos? At Bintray I just rebloged a very detailed blog post describing the reasons why Google made this change. Here are the most important points: JCenter is a Java repository in Bintray , which is the largest

react-native-fbsdk error: No resource found that matches the given name: attr 'android:keyboardNavigationCluster'

岁酱吖の 提交于 2019-11-26 23:01:14
In my react-native project in android/app/build.gradle i have ... compileSdkVersion 26 buildToolsVersion "26.0.1" defaultConfig { applicationId "..." minSdkVersion 16 targetSdkVersion 26 versionCode 1 versionName "1.0" ndk { abiFilters "armeabi-v7a", "x86" } } ... dependencies { compile project(':react-native-fbsdk') compile project(':react-native-vector-icons') compile project(':react-native-splash-screen') compile project(':react-native-spinkit') compile project(':react-native-orientation') compile project(':react-native-maps') compile project(':react-native-android-sms-listener') compile

Execution failed for task ':app:transformClassesWithDexForDebug' while implementing Google sign in for Android

*爱你&永不变心* 提交于 2019-11-26 22:51:47
I'm trying to implement Google sign in for Android and I'm following the instructoins via https://developers.google.com/identity/sign-in/android/start-integrating But while building the application I'm receiving the following error. Information:Gradle tasks [:app:generateDebugSources, :app:generateDebugAndroidTestSources, :app:assembleDebug] :app:preBuild UP-TO-DATE :app:preDebugBuild UP-TO-DATE :app:checkDebugManifest :app:preReleaseBuild UP-TO-DATE :app:prepareComAndroidSupportAppcompatV72301Library UP-TO-DATE :app:prepareComAndroidSupportDesign2301Library UP-TO-DATE :app

:app:dexDebug ExecException finished with non-zero exit value 2

ぃ、小莉子 提交于 2019-11-26 22:50:18
Could anyone help me out with the following error. When i clean the project, it doesn't show any error but every time i try to run i get this message. Error:Execution failed for task ':app:dexDebug'. com.android.ide.common.process.ProcessException: org.gradle.process.internal.ExecException: Process 'command 'C:\Program Files\Java\jdk1.8.0_45\bin\java.exe'' finished with non-zero exit value 2 The application was running with no errors but as my system crashed and restarted android studio i had few updates for Android API 22. After the update the application keep giving me this error message. I

TransformException duplicate entry for common.annotations.Beta

邮差的信 提交于 2019-11-26 22:39:07
This started when I added google-api-services-calendar . I am getting this error when trying to build: Error:Execution failed for task ':app:transformClassesWithJarMergingForDebug'. com.android.build.transform.api.TransformException: java.util.zip.ZipException: duplicate entry: com/google/common/annotations/Beta.class This is part of the output when running ./gradlew app:dependencies : compile - Classpath for compiling the main sources. +--- com.google.android.gms:play-services-measurement:8.1.0 | +--- com.google.android.gms:play-services-base:8.1.0 | | \--- com.google.android.gms:play

Unable to Merge Dex - Android Studio 3.0

China☆狼群 提交于 2019-11-26 22:37:48
When I updated my Android Studio to 3.0 in the stable channel and ran the project, I started getting the below error. Error:Execution failed for task ':app:transformDexArchiveWithExternalLibsDexMergerForDebug'. com.android.builder.dexing.DexArchiveMergerException: Unable to merge dex I tried cleaning and rebuilding the project, but it didn't work. Any help will be appreciated. Project level build.gradle buildscript { repositories { jcenter() google() } dependencies { classpath 'com.android.tools.build:gradle:3.0.0' classpath 'com.google.gms:google-services:3.1.0' // NOTE: Do not place your

Error:Execution failed for task ':app:packageRelease'. > Unable to compute hash of /../AndroidStudioProjects/../classes.jar

扶醉桌前 提交于 2019-11-26 22:27:00
I'm trying to do a 'release' build on an Android app and I keep on getting this error of: Unable to compute hash of /../AndroidStudioProjects/../classes.jar And then when I look into that directory for 'classes.jar' the file isn't there. Do I have to create this file myself with a gradle task? There's something going on with proguard here but it's not giving much useful information other than 'Unable to compute hash...." Here's my gradle.build file: apply plugin: 'com.android.application' apply plugin: 'com.google.gms.google-services' android { compileSdkVersion 22 buildToolsVersion "22.0.1"

Why does Gradle build my module in Release mode when the app is in Debug

懵懂的女人 提交于 2019-11-26 21:53:49
I'm making a new Android project, with the standard 'app' module, as well as a library project (let's call it 'custom_lib' ). In the app 's build.gradle file, I link the module as such : dependencies { compile project(':custom_lib') } When I trigger the build process (Menu Build > Make Project ), I get the following output in the Gradle console Executing tasks: [clean, :app:compileDebugSources, :custom_lib:compileDebugSources] Configuration on demand is an incubating feature. :app:clean :custom_lib:clean :app:preBuild :app:preDebugBuild :app:checkDebugManifest :app:preReleaseBuild :custom_lib