Tag: android-gradle

How do I set an environment variable in Android Studio before it runs my gradle build

My Gradle build looks at an environment variable called BUILD_NUMBER to determine the version to allocate to my android application as follows: def buildNumber = System.getenv(“BUILD_NUMBER”) ?: “local” So as long as that environment variable is set, the build number is used in defaultConfig as follows: versionName “1.4.0.”+buildNumber Usually, Jenkins will call this Gradle build […]

Android Manifest Duplicate Permissions

We have an app that consists of a third party library (altbeacon), a locally built Android library and an app component. All three components have an AndroidManifest.xml which are merged during the build. The app is built using gradle. THis app has been long published on the Google Play Store. In the last iteration we […]

Getting error “Gradle version 1.10 is required. Current version is 1.12.” when executing “gradle wrapper”?

I’m trying to execute gradle wrapper for an Android project, and this error is raised: A problem occurred evaluating root project ‘myapp’. > Gradle version 1.10 is required. Current version is 1.12. If using the gradle wrapper, try editing the distributionUrl in /Users/dude/myapp/gradle/wrapper/gradle-wrapper.properties to gradle-1.10-all.zip My wrapper task in build.gradle looks like this: task wrapper(type: […]

Receiving a build error when upgrading to gradle 3.3 and android build tools 2.3.0

I just updated my build files Gradle from 2.14.1 to 3.3 Android Plugin from 2.2.3 to 2.3.0 I am receiving the following error. Seems like some thirdparty plugin issue. Can anyone shed light to it? I cant find anything in change logs related to this change. A problem occurred configuring project ‘:apis’. Failed to notify […]

Android Studio 3.0 Beta 1: Failed to resolve: com.android.support:multidex:1.0.2

After migrating from Android Studio 3.0 (Canary 5) to Android Studio 3.0 (Beta 1), and moving to latest gradle , i.e. ‘com.android.tools.build:gradle:3.0.0-beta1′ When I try to gradle sync, it error stating below. Failed to resolve: com.android.support:multidex:1.0.2 Failed to resolve: com.android.support:multidex-instrumentation:1.0.2 I check on Android Studio 3.0 Canary 9 – Failed to resolve packages, it doesn’t […]

Upgrading project to Android Studio 1.0 (Gradle problems)

Just to start I’m very new to android development/android studio/gradle so forgive me if I’m asking a stupid question. My team has been working on a project with the beta version of android studio, I’ve just installed the new version (1.0) and i’ve imported our project from the github remote repo. When trying to sync […]

Access to environment variables from Android Studio gradle build

In my Android Gradle build I need to get access to environment variables I set from .bash.profile. It works fine when I build from command line – Gradle script can see all the variables. However, when I try to run my build from Android Studio – I don’t have my environment variables anymore. Here is […]

Android Studio 0.5.2 Gradle Refresh Project failed

UPDATED WITH MY EVENT LOG LAST EDIT After trying out every possible solution i could find i’ve come to a fresh install of Windows. Doing this i noticed that this was indeeed a firewall issue, my antivirus was blocking the studio64.exe process. I have freshly installed Android Studio 0.4.2 then immediately updated to 0.5.2 without […]

Android release APK crash with java.lang.AssertionError: impossible in java.lang.Enum

I’ve just built an APK using Gradle for release (ProGuard 4.9 and signed). When I launch the app it crash on this error : E/AndroidRuntime( 8662): java.lang.AssertionError: impossible E/AndroidRuntime( 8662): at java.lang.Enum$1.create(Enum.java:44) E/AndroidRuntime( 8662): at java.lang.Enum$1.create(Enum.java:35) E/AndroidRuntime( 8662): at libcore.util.BasicLruCache.get(BasicLruCache.java:54) E/AndroidRuntime( 8662): at java.lang.Enum.getSharedConstants(Enum.java:210) E/AndroidRuntime( 8662): at java.lang.Enum.valueOf(Enum.java:190) E/AndroidRuntime( 8662): at kr.infli.s.Z(Inflikr.java:390) E/AndroidRuntime( 8662): at […]

How to avoid 65k method limit while using Google Play Services

If you find yourself writing a big Android application that depends on many different libraries (which I would recommend instead of reinventing the wheel) it is very likely that you have already come across the 65k method limit of the Dalvik executable file classes.dex. Furthermore, if you depend on large libraries like the Google Play […]

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