Tag: android-gradle

Gradle Error – Could not call IncrementalTask.taskAction() on task ':project:mergeDebugResources'

I updated Android Studio and started getting this error. I have no experience with gradle and as such can’t seem to figure out what could be going wrong. Here’s the full error. Gradle: Execution failed for task ‘:project:mergeDebugResources’. Could not call IncrementalTask.taskAction() on task ‘:project:mergeDebugResources’

No such property: sonatypeRepo for class in android studio while importing project

i have downloaded image cropper example from following link https://github.com/edmodo/cropper and when i try to import it in a android studio i am getting following error. here is the error , i am quite new to this so m not aware how i resolve. Have tried by importing project as gradle but same error inside […]

Proper way to use System environment variables in gradle using Android Studio

I am using Android Studio to build my project on an Ubuntu 14.04 system. I wrote the following in my build.gradle files to avoid hardcoding storeFile, storePassword, keyAlias and keyPassword in my git repo: signingConfigs { debug { storeFile file(System.getenv(“KEYSTORE”)) storePassword System.getenv(“KEYSTORE_PASSWORD”) keyAlias System.getenv(“KEY_ALIAS”) keyPassword System.getenv(“KEY_PASSWORD”) } But gradle sync errors out with the following: […]

Exclude assets for release build type

I’m importing an android library in an application built with gradle, like that: dependencies { compile ‘com.example:great-lib:0.1-SNAPSHOT’ } This library contains only assets, js, css and images to be used in a webview, with a layout like that: assets/ |-> great.css |-> great.min.js |-> great.min.js.map |-> js/ | |-> plop.js | |-> foo.js | … […]

Android test-only permissions with gradle

I run ./gradlew connectedAndroidTest and I need my test APK to have a permission which should not be in any non-testing APK (debug, release). I have created a manifest with permission: <manifest xmlns:android=”http://schemas.android.com/apk/res/android” package=”com.mypackage”> <uses-permission android:name=”android.permission.SET_ANIMATION_SCALE”/> </manifest> Then I have copied this manifest to src/androidTest directory, as release notes from gradle android plugin suggest: 0.13.0 […]

Gradle gets stuck at either 'build' or 'assembleDebug' when using the 64bit or 32bit version of Android Studio

The issue I’ve had over the past few months is that Android Studio would often get stuck on Gradle: build, as seen here. Android Studio itself would stay responsive but the build simply wouldn’t progress. It also never generates any kind of error, so I can’t really post any useful information. Once in a blue […]

gradle: Android Studio inherit buildtype

I have in gradle (Android Studio) 4 build types android { buildTypes { release { … } debug { … } kindle { … } kindle_debug { … } } } And I know, that my src folder can have for each build type one folder. So it ends up into src/ — debug — kindle […]

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

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:prepareComAndroidSupportSupportV42301Library UP-TO-DATE :app:prepareComGoogleAndroidGmsPlayServicesAds810Library UP-TO-DATE :app:prepareComGoogleAndroidGmsPlayServicesAnalytics810Library UP-TO-DATE :app:prepareComGoogleAndroidGmsPlayServicesAppindexing810Library UP-TO-DATE :app:prepareComGoogleAndroidGmsPlayServicesBase810Library UP-TO-DATE :app:prepareComGoogleAndroidGmsPlayServicesBasement810Library UP-TO-DATE :app:prepareComGoogleAndroidGmsPlayServicesIdentity810Library […]

Why Android Studio rebuilds project so slow even when no changes in sources?

When I make some changes in source code, Android Studio (actually gradle) has to rebuild the project. It’s clear. Why the second build takes almost the same amount of time like the first build, even if I didn’t make any changes in the project? When I look into GradleConsole it waits on “assembleDubug” task. I […]

How to configure gradle to work “offline” (using cached dependencies)

I have a command line apk generator which compiles a lot of APKs using the same source code, so these apps have the same dependences. In gradle documentation i can see this: The Gradle project needs network connectivity to download dependencies. I know that it is possible to configure gradle to work offline and to […]

Android Babe is a Google Android Fan, All about Android Phones, Android Wear, Android Dev and Android Games Apps and so on.