build.gradle

Android Studio: Plugin with id 'android-library' not found

蹲街弑〆低调 提交于 2019-11-26 07:58:15
问题 I\'ve been trying to get ActionBarSherlock to work and having some issue. One issue I\'ve come across is the following message when trying to build it: Plugin with id \'android-library\' not found Specifically: D:\\Projects\\Android\\actionbarsherlock>D:\\Projects\\Android\\gradlew --info build Starting Build Settings evaluated using empty settings script. Projects loaded. Root project using build file \'D:\\Projects\\Android\\actionbarsherlock\\build.gradle\'. Included projects: [root

Gradle and Multi-Project structure

放肆的年华 提交于 2019-11-26 07:55:21
问题 I\'m trying to understand how should I approach the following project setup: ┌Top Android Project │ ├── Project 1 - (Pure Java Modules) │ │ │ ├── Module A1 │ ├── Module B1 │ : │ └── Module Z1 │ ├── Project 2 - (Android Libraries Modules) │ │ │ ├── Module A2 │ ├── Module B2 │ : │ └── Module Z2 │ └── Module - Actual Android Project In the current setup I have there is a build.gradle in each of the Modules, what I really hate about this setup is that all the content of the build.gradle is

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

故事扮演 提交于 2019-11-26 07:39:48
问题 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

Android Studio Gradle issue upgrading to version 0.5.0 - Gradle Migrating From 0.8 to 0.9 - Also Android Studio upgrade to 0.8.1

会有一股神秘感。 提交于 2019-11-26 07:26:33
问题 After upgrade message states: Failed to refresh Gradle project \'XXX\' The project is using an unsupported version of the Android Gradle plug-in (0.8.3). Version 0.9.0 introduced incompatible changes in the build language. Please read the migration guide to learn how to update your project. Same kind of issue after upgrade to Android Studio to version >= 0.8.0 回答1: Android Studio 0.5.0 requires gradle-plugin 0.9.0 The gradle-plugin 0.9.0 works with Gradle 1.10 or Gradle 1.11 Modify your build

Error : Please fix the version conflict either by updating the version of the google-services plugin

折月煮酒 提交于 2019-11-26 06:49:43
问题 I\'m having a problem with Google Services plugin. I updated google services to the latest version. I got a dependency from this site: https://bintray.com/android/android-tools/com.google.gms.google-services/ Error:Execution failed for task \':app:processDebugGoogleServices\'. > Please fix the version conflict either by updating the version of the google-services plugin (information about the latest version is available at https://bintray.com/android/android-tools/com.google.gms.google

variantOutput.getPackageApplication() is obsolete

試著忘記壹切 提交于 2019-11-26 06:39:39
问题 with Gradle 4.10.1 and the Android Gradle plugin updated to 3.3.0 , I get the following warning: WARNING: API \' variantOutput.getPackageApplication() \' is obsolete and has been replaced with \' variant.getPackageApplicationProvider() \'. the line, with the surrounding context (which is assigning output file-names by build variant): applicationVariants.all { variant -> variant.outputs.all { output -> if (variant.getBuildType().getName() in rootProject.archiveBuildTypes) { def buildType =

libpng error: Not a PNG file Error Showing In Android Studio

。_饼干妹妹 提交于 2019-11-26 06:37:45
问题 I just Imported a project from Eclipe to Android Studio . Just a plain and simple project. But the project folder is showing one error . May I know what is the correct way to achieve my objective? I am new in Android-studio .Does any guys meet this issue?Any help would be greatly appreciated. Here is Logcat : Execution failed for task \':app:mergeDebugResources\'. > Error: Failed to run command: /home/amiya/android-studio/sdk/build-tools/android-4.4.2/aapt s -i /home/amiya/vola/app/src/main

Error:Execution failed for task ':app:transformResourcesWithMergeJavaResForDebug'

让人想犯罪 __ 提交于 2019-11-26 06:36:35
问题 So I\'m continuously receiving a gradle build error upon trying to run my project. I have searched for other solutions and some say that adding: packagingOptions { exclude \'META-INF/NOTICE\' } to my app\'s gradle.build would fix the issue, however, it doesn\'t. Here is what my app\'s gradle.build currently looks like. apply plugin: \'com.android.application\' apply plugin: \'com.google.gms.google-services\' dependencies { compile fileTree(include: [\'*.jar\'], dir: \'libs\') compile \'com

How to get current flavor in gradle

你。 提交于 2019-11-26 05:31:11
问题 I have two product flavors for my app: productFlavors { europe { buildConfigField(\"Boolean\", \"BEACON_ENABLED\", \"false\") } usa { buildConfigField(\"Boolean\", \"BEACON_ENABLED\", \"true\") } } Now I want to get the current flavor name (which one I selected in Android Studio) inside a task to change the path: task copyJar(type: Copy) { from(\'build/intermediates/bundles/\' + FLAVOR_NAME + \'/release/\') } How can I obtain FLAVOR_NAME in Gradle? Thanks 回答1: How to get current flavor name I

Dex error On Android Studio 3.0 Beta4

蹲街弑〆低调 提交于 2019-11-26 04:51:07
问题 Error:java.lang.RuntimeException: java.lang.RuntimeException: com.android.builder.dexing.DexArchiveMergerException: Unable to merge dex Error:java.lang.RuntimeException: com.android.builder.dexing.DexArchiveMergerException: Unable to merge dex Error:com.android.builder.dexing.DexArchiveMergerException: Unable to merge dex Error:com.android.dex.DexException: Multiple dex files define Lcom/google/zxing/integration/android/IntentResult; 回答1: I have same problem with Android Studio 3.0 beta 4. I