Tag: gradle

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 RecyclerView Error

today I was trying to use the new android RecyclerView. I have created a new Project with a blank activity and added the following to its layout: <android.support.v7.widget.RecyclerView android:id=”@+id/my_recycler_view” android:scrollbars=”vertical” android:layout_width=”match_parent” android:layout_height=”match_parent”/> In gradle build dependencies I have added: compile ‘com.android.support:support-v4:21.0.0’ compile ‘com.android.support:recyclerview-v7:21.+’ compile ‘com.android.support:cardview-v7:21.+’ But the activity_main.xml rendering still shows me the following error: […]

How to avoid stripping for native code symbols for android app

I’m getting sigsegv 11 in native code and i need to avoid stripping to understand what’s wrong. The app uses library (aar) and i was able to avoid stripping for the aar with ‘cmd-strip’ hack. But in the apk stripped version of .so is used anyway so the app strips the symbols, probably while transformNative_libsWithStripDebugSymbolForDebug […]

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