build.gradle

build.gradle and project libs

雨燕双飞 提交于 2019-11-26 11:27:17
问题 I have a project in android studio that uses a project library. My problem is the configuartion of the gradle files. I really tried a lot of solution that were posted here (define modul in project lib in settings as modul, sherlock example, setting right sourcesets ...), but I always get the same error (as soon as I add the lib debendency to my apps build.gradle file): A problem occurred configuring project \':MyApp\'. > Failed to notify project evaluation listener. > Configuration with name

Gradle failed to sync with 'unable to find optional library'

◇◆丶佛笑我妖孽 提交于 2019-11-26 11:26:28
问题 I had to reinstall my system and today I get this error in Android Studio when I try to sync with gradle: Warning: Unable to find optional library: org.apache.http.legacy My project gradle is: buildscript { repositories { mavenCentral() } dependencies { classpath \'com.android.tools.build:gradle:1.3.0\' } } allprojects { repositories { mavenCentral() } } And my module gradle: apply plugin: \'android\' android { useLibrary \'org.apache.http.legacy\' compileSdkVersion 23 buildToolsVersion \'23

Error: Gradle: execution failed for task ':app:preDexDebug'

陌路散爱 提交于 2019-11-26 11:22:21
问题 I had a self created jar from another projected imported as a library into my other project. When I changed code in that project and exported a new jar to replaced the old one I cannot run my app anymore. I only get the following error: I have tried removing and adding and adding as dependency, adding as library. Nothing seems to work. I have also done clean build and a rebuild. 回答1: We've seen this problem in the past when our project was compiling with a version of Java different from the

Gradle: Execution failed for task ':processDebugManifest'

∥☆過路亽.° 提交于 2019-11-26 11:12:46
I'm getting a gradle error at building since yesterday - it just came randomly.... Full stacktrace here: My project depends on multiple libraries and it built without any problems until yesterday (even with the librarys) compile 'com.google.android.gms:play-services:3.1.36' compile 'com.android.support:support-v4:13.0.0' compile project(":libs:DatabaseCreationHelper") compile project(":libs:actionbarsherlock") Anyone has an idea how to fix it? it just randomly came... Full stacktrace here: * Exception is: org.gradle.api.tasks.TaskExecutionException: Execution failed for task ':ItchyFeet

Error:Execution failed for task ':ProjectName:mergeDebugResources'. > Crunching Cruncher *some file* failed, see logs

风格不统一 提交于 2019-11-26 09:47:04
问题 I have this error when trying to make a module of a project apply plugin: \'com.android.library\' android { compileSdkVersion 17 buildToolsVersion \"19.1.0\" defaultConfig { minSdkVersion 8 targetSdkVersion 8 } buildTypes { release { minifyEnabled false proguardFiles getDefaultProguardFile(\'proguard-android.txt\'), \'proguard-rules.txt\' } } } dependencies { compile files(\'libs/sdk.jar\') compile files(\'libs/ads-lib.jar\') compile project(\':google-play-services_lib\') compile files(\'libs

Error:Failed to resolve: android.arch.core:common:1.1.0

守給你的承諾、 提交于 2019-11-26 09:34:49
问题 My system suddenly went off and I switched it on and I got Error:Failed to resolve: android.arch.core:common:1.1.0 error in my android studio. I have tried clean and rebuild project but it did not work. I have researched on the internet but none could solve my problem. build. gradle(project) // Top-level build file where you can add configuration options common to all sub-projects/modules. buildscript { repositories { jcenter() } dependencies { classpath \'com.android.tools.build:gradle:2.2.0

Program type already present: android.support.v4.app.BackStackRecord

心已入冬 提交于 2019-11-26 09:17:36
问题 I have upgraded my Android Studio and I found many problems in the latest version. Although many similar questions exist, I checked the answers to all and none of them worked for me! Here is the error I\'m facing while compiling the code: Program type already present: android.support.v4.app.BackStackRecord$Op Message{kind=ERROR, text=Program type already present: android.support.v4.app.BackStackRecord$Op, sources=[Unknown source file], tool name=Optional.of(D8)} Here is my gradle file:

Gradle error: Minimum supported Gradle version is 3.3. Current version is 3.2

不问归期 提交于 2019-11-26 09:00:32
问题 When I today update Android Studio it write: Minimum supported Gradle version is 3.3. Current version is 3.2 how can I solve this problem? Here is my build.gradle // Top-level build file where you can add configuration options common to all sub-projects/modules. buildscript { repositories { jcenter() } dependencies { classpath \'com.android.tools.build:gradle:2.3.0\' // NOTE: Do not place your application dependencies here; they belong // in the individual module build.gradle files } }

DELETE_FAILED_INTERNAL_ERROR Error while Installing APK

拟墨画扇 提交于 2019-11-26 08:44:53
问题 I am using Android Studio 2.2 Preview. I am facing the issue Failure: Install failed invalid apk Error: While installing apk, I have made changes in build.gradle but could not retrack it, please suggest me solution??? 回答1: Android studio mac/windows/linux: Steps in together (mac): Android Studio > Preferences > Build, Execution, Deployment > Instant Run > Uncheck : Enable Instant Run Steps in together (windows & linux): File > Settings > Build, Execution, Deployment > Instant Run > Uncheck :

Autoincrement VersionCode with gradle extra properties

别来无恙 提交于 2019-11-26 08:39:31
问题 I\'m building an Android app with gradle. Until now I used the Manifest file to increase the versionCode, but I would like to read the versionCode from an external file and depending if it is the release flavor or the debug flavor increase the versionCode. I tried the extra properties, but you can\'t save them, which means that next time I build it I\'m getting the same versionCode. Any help would be very much appreciated! project.ext{ devVersionCode = 13 releaseVersionCode = 1 } buildscript