Tag: gradle

Gradle NDK to specify an 'include' directive in generated Android.mk

When you have android { defaultConfig { ndk { moduleName “yourlib” stl “stlport_static” ldLibs “log”, “z”, “m” cFlags “-I/some/include/dir/” } … } … } in your build.gradle then Gradle will compile the files in src/main/jni/ and it will generate an Android.mk in build/ndk/debug/Android.mk. However, in my case, I’m trying to compile some C++ files compiled […]

How to build v4 support library from source

I’m trying to build the v4 support library from source sice I modified a portion of the library. I’m trying to do this on ubuntu 13.10 with gradle. I followed the instructions in this answer, but now I’m stuck. I used gradle 1.10 with ubuntu since when I tried to build it on windows, it […]

How does Android Studio gradle plugin manage resource files (AndroidManifest.xml)?

I have my project’s build.gradle located in myApp/app/ directory. AndroidManifest.xml is in myApp/app/src/main directory, at the same level as java/ and res/ directories. When synchronizing the project, I receive notification about missing manifest file. No wonder, actually, when the path is really incorrect. Source file is set as: sourceSets { main { manifest.srcFile ‘src/main/AndroidManifest.xml’ } […]

Android Studio Could not call IncrementalTask.taskAction() on task ':project:dexDebug'

I recently decided to switch from Eclipse to Android Studio. I imported a project I was working on and am now getting this error when I try to run the project. Gradle: Execution failed for task ‘:project:dexDebug’. > Could not call IncrementalTask.taskAction() on task ‘:project:dexDebug’ I’ve been cruising this site for 2 days now and […]

'./gradlew -Dtest.single=SimpleTest test' runs all tests I have

My project is normal Android project created on Android Studio. I googled a lot to run a single test(tests in SimpleTest, 1 test in this case), everyone say that I should do like ./gradlew -Dtest.single=SimpleTest test in my root folder. or I did in my inner project folder ../gradlew -Dtest.single=SimpleTest test I tried so many […]

play_licensing throws AIDL error with downloader_library for APK Expansion with Gradle

I tried to use the APK Expansion libs zip_file and downloader_library (which requires play_licensing). zip_file worked fine since it has no dependencies, but play_licensing throws an error when I try a Gradle sync. Android Studio spits out this error log: Information:Gradle tasks [:app:generateGoogleDebugSources, :app:libs:downloader_library:generateDebugSources, :app:libs:play_licensing:generateDebugSources, :app:libs:zip_file:generateDebugSources] Information:/Users/faiz/Projects/Android/TogetherTime/app/libs/play_licensing/aidl/ILicenseResultListener.aidl:21 interface ILicenseResultListener should be declared in a file […]

Android with Gradle (Java finished with non-zero exit value 2)

This is my .gradle file: apply plugin: ‘com.android.application’ android { compileSdkVersion 21 buildToolsVersion “21.1.2” defaultConfig { applicationId “com.test.test” minSdkVersion 15 targetSdkVersion 21 versionCode 1 versionName “1.0” } buildTypes { release { minifyEnabled false proguardFiles getDefaultProguardFile(‘proguard-android.txt’), ‘proguard-rules.pro’ } } packagingOptions { exclude ‘META-INF/license.txt’ exclude ‘META-INF/LICENSE’ exclude ‘META-INF/notice.txt’ exclude ‘META-INF/NOTICE’ } } dependencies { compile fileTree(dir: ‘libs’, […]

Unable to generate signed APK with proguard enabled when Joda Time is used

I tried to build a signed APK. I am also using proguard. In my application I used JodaTime for some purposes. I used joda-time-2.7.jar in there. First I could get a signed APK without enabling proguard, there were no errors. Then I enabled proguard and tried to generate the APK but I it generated errors. […]

Android Studio – gradle task to execute after SYNC

Is there a way to execute gradle task once after project Sync with Gradle files is complete? I’ve tried to set task dependency to preBuild, as I’ve seen gradle:build is triggered when Sync is executing. But the problem is that dependency doesn’t seem to work, task is not executed and I have to manually start […]

Gradle Build gets stuck at Executing tasks:

I am running Android Studio 1.3.2 on Ubuntu 14.04, with build-tools version 23.0.0. Whenever I load any project, after the indexing is complete, Gradle shows Gradle Build Running and no matter how long I leave it, it shows no progress or errors. I have tried these solutions: How to fix Android Studio getting stuck executing […]

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