build.gradle

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"

Gradle version 1.10 is required. Current version is 2.0

*爱你&永不变心* 提交于 2019-11-26 22:19:49
问题 I am trying to use latest Gradle version (2.0), however I keep getting this message when hitting gradle build in terminal. Why is it asking for 1.10 version? I am new to Gradle, so I'm trying to get my head around it. Gradle version 1.10 is required. Current version is 2.0 Here are my dependencies (module build.gradle file): dependencies { classpath 'com.android.tools.build:gradle:0.12.+' classpath fileTree(dir: 'build-libs', include: '*.jar') } ...and wrapper task: task wrapper(type: Wrapper

AAPT2 error: check logs for details: unknown element <action> found

痴心易碎 提交于 2019-11-26 21:58:31
问题 Here's my debug\AndroidManifest.xml Getting so many errors like Element action is not allowed here. Element category is not allowed here. Attribute android:versionCode is not allowed here. Attribute android:versionName is not allowed here. Attribute android:theme is not allowed here. and so many. <?xml version="1.0" encoding="utf-8"?> <manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.company.sqh.adio" android:versionCode="1" android:versionName="1.0" > <uses

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

允我心安 提交于 2019-11-26 21:35:59
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 project 'actionbarsherlock'] Evaluating root project 'actionbarsherlock' using build file 'D:\Projects\Android

Gradle and Multi-Project structure

江枫思渺然 提交于 2019-11-26 21:19:44
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 duplicated between modules. Fact is that I would like the same logic in most of them, ' Pure Java Modules '

How to disable lint abortOnError in Android Gradle Plugin from top level of multi project directory

可紊 提交于 2019-11-26 20:57:11
问题 I have a top level Android Gradle project. There are multiple subprojects nested below this projects (sometimes they are 2 level deep) i.e: top level project | project1 vendor libraries | lib1 lib2 lint is aborting my build in some of the libraries projects. I can edit each individual library project's build.gradle to fix the problem with android { lintOptions { abortOnError false } } However, I would prefer the following code in the top level build.gradle script: subprojects { afterEvaluate

Execution failed for task ':app:processDebugResources' even with latest build tools

我的梦境 提交于 2019-11-26 20:36:58
问题 I am getting this error when I try to run my project. I have installed the latest build tools- 23.0.3 but still the error persists. How do I fix this? Executing tasks: [:app:generateDebugSources, :app:generateDebugAndroidTestSources] Configuration on demand is an incubating feature. :app:preBuild UP-TO-DATE :app:preDebugBuild UP-TO-DATE :app:checkDebugManifest :app:preReleaseBuild UP-TO-DATE :app:prepareComAndroidSupportAnimatedVectorDrawable2321Library UP-TO-DATE :app

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

假装没事ソ 提交于 2019-11-26 20:19:07
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 } } allprojects { repositories { jcenter() } } task clean(type: Delete) { delete rootProject.buildDir } and second

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

此生再无相见时 提交于 2019-11-26 20:17:11
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.google.android.gms:play-services:8.3.0' compile 'com.google.android.gms:play-services-ads:8.3.0' compile 'com.google

What's the difference between “minifyEnabled” and “useProguard” in the Android Plugin for Gradle?

江枫思渺然 提交于 2019-11-26 19:58:28
问题 I see that the Android Plugin for Gradle has a minifyEnabled property as well as a useProguard property, as follows: android { buildTypes { debug { minifyEnabled true useProguard false } release { minifyEnabled true useProguard true } } } What's the difference between these two properties? Or, rather, what's the meaning of each? 回答1: Quoting from tools.android.com: Built-in shrinker Version 2.0 of Android Plugin for Gradle ships with an experimental built-in code shrinker, which can be used