Tag: gradle

SDK location not found. ANDROID_HOME – building a gradle project in eclipse on a MAC

I’m in the process of running through a tutorial on getting Libgdx working with eclipse on my MAC. I am currently building one of the example projects using gradle in eclipse so I can run through the tutorials and learn a bit more. When I import and build the example code project (I’m using a […]

Gradle execution error in Android Studio (Ubuntu)

I have a fresh install of Ubuntu and Android Studio. I have installed open jdk7 (for some reason it ended up in directories suffixed “amd64” even though I am running an Intel CPU, but I guess that’s just a name?) as well as some SDK files. I then created an empty project and now I […]

Android gradle build: duplicate files during packaging of APK LICENSE.txt

I am trying to build an Android test using the following gradle build file buildscript { repositories { mavenCentral() } dependencies { classpath ‘com.android.tools.build:gradle:0.4.2’ } apply plugin: ‘android-library’ repositories { mavenCentral() } dependencies { instrumentTestCompile “junit:junit:4.+” } android { compileSdkVersion 17 buildToolsVersion “17.0.0” instrumentTest.setRoot(‘tests’) instrumentTest { java.srcDirs = [‘tests/src’] res.srcDirs = [‘tests/res’] assets.srcDirs = [‘tests/assets’] […]

How do you adjust jvm args for dex memory in gradle?

I have an Android project which is currently running out of heap space during the dex step: :app:dexXXXXX Exception in thread “pool-1-thread-4” java.lang.OutOfMemoryError: Java heap space I would like to bump up the jvm min/max settings in gradle like we used to do with the Maven plugin: <groupId>com.jayway.maven.plugins.android.generation2</groupId> <artifactId>android-maven-plugin</artifactId> <version>3.6.0</version> <extensions>true</extensions> <configuration> <sdk> <platform>${android.platform}</platform> </sdk> […]

Importing gradle project, android error

I am trying to import a libgdx project (desktop, ios and android) to eclipse on my mac, which I have in my local git repository. When I try to import my project to eclipse ( Import >> Gradle >> Gradle Project, and then add my Root Folder for the whole libgdx project), I try to […]

Gradle build failed to resolve aar library dependency (trnql sdk)

When I attempt to build my project using gradle, I get the following error: Failed to resolve: com.trnql:lib-release 1.0.0 It seems it cannot find the android archive file (aar) that is in the libs folder. The dependencies section of the build.gradle file looks like this: And the project structure looks like this: The aar file […]

Custom fields for a build type in gradle

I am trying to embed a few server addresses in my build.gradle file but I am unsure about how to do this. I know that in maven, you can write <content.host>http://test.mysite.com</content.host> and I can use content.host in my Android application. In gradle, I know you can create a build type by buildTypes { testBuild.initWith(buildTypes.debug) testBuild{ […]

Android Twitter Fabric SDK conflict with Google GSON

I’m having difficulties integrating Twitter Fabric SDK to my app. I followed the steps of the Twitter tutorial and everyhting went fine but when I try to build my project with gradle, I get this error : Error:Execution failed for task ‘:app:dexDebug’. > com.android.ide.common.internal.LoggedErrorException: Failed to run command: D:\Android\android-studio\sdk\build-tools\android-4.4W\dx.bat –dex –output … Error Code: 2 […]

How can I import a new module (android library project) using Android studio 0.3.0

The android tools team made a huge step when introducing android studio 0.3.0 with the new user interface for modifying the build.grade file using the project structure. But how can I import an android library project into my general project? When I press the ‘+’ button in the Project structore -> Modules section I can […]

Android Gradle – load signing config from external file

In Gradle for Android it seems to be commons practice to define your signing config for release build like this: android { signingConfigs { debug { storeFile file(“debug.keystore”) } myConfig { storeFile file(“other.keystore”) storePassword “android” keyAlias “androiddebugkey” keyPassword “android” } } buildTypes { foo { debuggable true jniDebugBuild true signingConfig signingConfigs.myConfig } } } Thing […]

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