developer

Android Gradle plugin 0.7.0: “duplicate files during packaging of APK”

Question: ❓❓❓ Using Android Gradle plugin 0.7.0 with the following build.gradle: buildscript { repositories { mavenCentral() } dependencies { classpath 'com.android.tools.build:gradle:0.7.0' } } apply plugin: 'android' repositories { maven { url "https://android-rome-feed-reader.googlecode.com/svn/maven2/releases" } maven { url "http://dl.bintray.com/populov/maven" } mavenCentral() } android { compileSdkVersion 19 buildToolsVersion '18.1.1' defaultConfig { minSdkVersion 9 Read more…

By admin, ago
developer

Gradle build without tests

Question: ❓❓❓ I want to execute gradle build without executing the unit tests. I tried: $ gradle -Dskip.tests build That doesn’t seem to do anything. Is there some other command I could use? Good Answer: 👌👌👌 You should use the -x command line argument which excludes any task. Try: gradle Read more…

By admin, ago
developer

appcompat-v7:21.0.0′: No resource found that matches the given name: attr ‘android:actionModeShareDrawable’

Question: ❓❓❓ When attempting to use the latest appcompat-v7 support library in my project, I get the following error: /Users/greg/dev/mobile/android_project/app/build/intermediates/exploded-aar/com.android.support/appcompat-v7/21.0.0/res/values-v11/values.xml Error:(36, 21) No resource found that matches the given name: attr 'android:actionModeShareDrawable'. Error:(36, 21) No resource found that matches the given name: attr 'android:actionModeShareDrawable'. Error:(36, 21) No resource found that Read more…

By admin, ago
developer

How can I force gradle to redownload dependencies?

Question: ❓❓❓ How can I tell gradle to redownload dependencies from repositories? Good Answer: 👌👌👌 Generally, you can refresh dependencies in your cache with the command line option –refresh-dependencies. You can also delete the cached files under ~/.gradle/caches. With the next build Gradle would attempt to download them again. What Read more…

By admin, ago
developer

Gradle DSL method not found: ‘runProguard’

Question: ❓❓❓ I get an error after updating from my last project. Not a problem in my code but I’m having trouble with build.gradle. How can I fix it? build.gradle code here: apply plugin: 'android' android { compileSdkVersion 21 buildToolsVersion '20.0.0' packagingOptions { exclude 'META-INF/DEPENDENCIES' exclude 'META-INF/LICENSE' exclude 'META-INF/LICENSE.txt' exclude Read more…

By admin, ago