Tag: android-gradle

Define a string in gradle and also use a flavor-specific applicationId

I’ve seen scripts that manipulate the build tasks of gradle and am now wondering if it’s possible to set a string outside the `defaultConfig but treat it as default for all flavors. Basically I’ve multiple flavors and all of them have a specific ApplicationId. I want to use that id to set a string resource […]

Can't add ViewPagerIndicator to app with Gradle

i am trying to add Jack Whartons ViewPagerIndicator library https://github.com/JakeWharton/ViewPagerIndicator to my app as i want to use the circle indicator for the viewpager i have. However i am having trouble adding it to my app. i have followed this tutorial – Using ViewPagerIndicator library with Android Studio and Gradle However i am getting this […]

Provided dependencies can only be jars

I have an android projct in Android Studio, was all previously working the last time I used it, however, I’ve upgraded Android Studio and now I am getting a weird problem. In the error output in Android Studio I have the following: Warning: Project MyApp: provided dependencies can only be jars. com.google.android.gms:play-services.6.5.87 is an Android […]

Unable to add AndEngine to Android Studio

I am trying to almost 2 days to add AndEngine to Android Studio but unable to do so. I tried the following two methods, neither worked. 1st Try I download the AndEngine code from GitHub Link — this is NOT a Gradle Project and tried to add it to my Android Studio build.gradle and settings.gradle, […]

Add pre-built .so files in project using Android Gradle plugin 0.7.3

Well after a long time the support to add pre-built .so files in an Android project has been added in Android Gradle plugin 0.7.3. But unlike me a lot of people are still using the hack/workaround to add pre-built .so files, i.e zip the files using a certain hierarchy and then re-name into a .jar. […]

Android Studio: Switching a URL depending on buildtype? (used for testing in debug /release)

I have been reading something about variants and buildtypes and I don’t know if I am understanding it right but I would like to store a URL for locahost (testing) and one for production (live site on the internet). And I need to switch them depending on which buildtype. Is this the right way to […]

Android support multidex library implementation

I have hit the magic dex limit because my application uses a lot of jars (drive api, greendao, text to pdf, support.. ). My current solution was that I literally created a second apk just for google drive wich I called from the main apk. But now I found out that android finally supports this […]

Why “This app has been built with an incorrect configuration” error occured in some phones?

I Have build my app in android 6 without any error, but when I build my app in android 4.4.2 I get this error This app has been built with an incorrect configuration. Please configure your build for VectorDrawableCompat. and this is my gradle: android { compileSdkVersion 24 buildToolsVersion “23.0.0” defaultConfig { applicationId “com.faranegar.channel” minSdkVersion […]

Android Studio: Re-download dependencies and sync project

I downloaded an open source game “ChaseWhisplyProject” source code from Github. I imported the project in my Android Studio (Version 1.5.1). It shows following error message: Error:Failed to open zip file. Gradle’s dependency cache may be corrupt (this sometimes occurs after a network connection timeout.) Re-download dependencies and sync project (requires network) Re-download dependencies and […]

Android product flavors are not considered when using CPU ABI split in build.gradle

I want to make APK split based on CPU ABI according to http://tools.android.com/tech-docs/new-build-system/user-guide/apk-splits, however I want to split the APK only for a certain product flavor. So my build.gradle file has the following product flavors plain and market. Actually I want the APK split to be performed when building market flavor. android { productFlavors { […]

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