Tag: gradle

AndroidAnnotations Nothing Generated, Empty Activity

I am trying to create a project using AndroidAnnotations in Android Studio. When I build and run the project, everything seems to compile fine, yet I get nothing but a blank activity for the app. In addition, it does not appear that anything is generated by AndroidAnnotations. I have added androidannotations-api-2.7.1.jar as a dependency for […]

Can't find “Sync Project with Gradle Files” button in IntelliJ IDEA

I just added the google-play-services-lib library to my project and am stuck where I need to “sync the project with gradle files”, but this button does not exist on IntelliJ 13.0.1. Is there an alternative to this function?

transformClassesAndResourcesWithProguardForRelease FAILED

I am trying to Build my Android application with Gradle in console. But getting below error about task ‘:app:transformClassesAndResourcesWithProguardForRelease’: build.gradle: buildscript { repositories { jcenter() maven { url “https://jitpack.io” } } dependencies { classpath ‘com.android.tools.build:gradle:2.2.3’ classpath ‘com.google.gms:google-services:3.0.0’ } } allprojects { repositories { jcenter() maven { url “https://jitpack.io” } } } task clean(type: Delete) { […]

Android GCM with product flavors

I have GCM sample android gradle project. Its worked well, when I add 2 flavors a push notification stopped to work. My compilation manifest (it’s taken from app\build\intermediates\manifests\ex\debug) file is below: <manifest xmlns:android=”http://schemas.android.com/apk/res/android” package=”com.flavor.app” <uses-permission android:name=”com.flavor.app.permission.C2D_MESSAGE” /> <permission android:name=”com.flavor.app.permission.C2D_MESSAGE” android:protectionLevel=”signature” /> <receiver android:name=”com.google.android.gcm.GCMBroadcastReceiver” android:permission=”com.google.android.c2dm.permission.SEND” > <intent-filter> <action android:name=”com.google.android.c2dm.intent.RECEIVE” /> <action android:name=”com.google.android.c2dm.intent.REGISTRATION” /> <category android:name=”com.flavor.app” /> […]

How to check what is the latest version of a dependency to use in gradle

I’ve always added dependencies like this: dependencies { compile ‘com.android.support:mediarouter-v7:19.+’ } but in the recent versions of Android Studio, they recommend not to use the + as it can lead to errors. How to know what’s the latest version? I can try every combination of 19.y.x until gradle complains, but what’s the real way do […]

Gradle ADT 0.4 error: android.buildToolsVersion is missing

Attempting to build my Android project using the latest ADT tools release of Gradle, I get the following error: Execution failed for task ‘:compileDebugAidl’. > android.buildToolsVersion is missing! Using Gradle 1.6, Android plugin 0.4.

Error: Gradle: execution failed for task ':app:preDexDebug'

I had a self created jar from another projected imported as a library into my other project. When I changed code in that project and exported a new jar to replaced the old one I cannot run my app anymore. I only get the following error: I have tried removing and adding and adding as […]

Multi-flavor compile dependencies in gradle

Is there a way to have compile dependencies by multiple flavors in Android Studio (build.gradle)? I have 2 flavorGroups, and in each 2 variants. Out of the 4 possible combinations I would like to be able to depend on a lib only if I’m both in latest and in free flavor. latestCompile or freeCompile works, […]

Using Jenkins to build an android gradle project fails

I’m trying to setup Jenkins on a computer running OSX and I’m running into a problem. When I’m trying to build the project with my default user account everything works fine, but as soon as im trying to build via Jenkins the build fails with the following output: FAILURE: Build failed with an exception. * […]

Android Studio does not compile when using deprecated API

I am having issues compiling and running my application on Android Studio. The problem: It doesn’t like that I am using deprecated APIs. (from gradlew compileDebug –stacktrace. Full stacktrace here Note: Some input files use or override a deprecated API. Note: Recompile with -Xlint:deprecation for details. The Background: I am using a PreferenceActivity which uses […]

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