Tag: gradle

Build Android project on command line on OSX: Task 'assembleDebug' not found in root project

I’m trying to build Android projects on the OSX (Mavericks 10.9.5) command line using this how-to: http://developer.android.com/tools/building/building-cmdline.html. This How-To explains the use of assembleDebug/assembleRelease to build an Android project. Unfortunately gradle doesn’t create the assembleDebug or assembleRelease targets. Executing ./gradlew assembleDebug returns this: FAILURE: Build failed with an exception. * What went wrong: Task ‘assembleDebug’ […]

Migrating from eclipse + SVN to Android Studio

We currently use Eclipse for Android development , and our projects are synchronized to an SVN . Current structure : Android Application 1 Android Application 2 Android library 1 Android library 2 It is therefore independent projects on SVN. Details : Android Android app 1 need library 1 Android Android app 2 need library 1 […]

Why does Gradle only include classes from my library with project dependency

I’m building an Android app that has a dependency on a custom library, and Gradle is only willing to include my custom library when I use a project dependency, not when I use a files dependency to include the library’s jar file. I’m building both my app and the library with the API levee 19 […]

crash with NoSuchMethodError after proguard with method references

the source code before compile&proguard : public class IntentSession extends BaseIntentSession { @Override public void onResume() { super.onResume(); mExecutor.exec(getIntent(), this::finish); } } the decompiled code after compile&proguard : (Decompiled with CFR 0_118) public class a extends superA { public void e() { super.e(); this.c.a(this.j(), b.a((a)this)); // the problematic code here } } now is the […]

Android Gradle task to copy files after build

I am trying to copy a couple of files from the source tree to the directory where Gradle finally generates the apk files. The build seems to go fine but I do not seem to see the copy working. I added the following task in my modules build.gradle task copySupportFiles(type: Copy){ from ‘src/main/support’ into ‘build/outputs/apk’ […]

Roboelectric and Android Studio

I’ve been trying to do it for a few days, with no result. I need to set up Robolectric in Android Studio (0.8.9, latest version). I followed different tutorials Android Unit and Integration testing, Roboelectric installation for Unit testing, Android Gradle app with Roboelectric, How to run Roboelectric JUnit tests but always got some kind […]

ADT error exporting with Gradle

I’m trying to export my android project from ADT using Gradle so that I can import into Android Studio. I select Generate Gradle build files and select my project in the Export menu, but when I click Finish it flashes the Creating Gradle build progress bar for a millisecond then stays on the Export menu […]

Can't add gdx-tools to libgdx gradle project

I’m new in Gradle. I’m trying to add gdx-tools to my project: project(“:desktop”) { apply plugin: “java” dependencies { compile project(“:core”) compile “com.badlogicgames.gdx:gdx-backend-lwjgl:$gdxVersion” compile “com.badlogicgames.gdx:gdx-platform:$gdxVersion:natives-desktop” compile “com.badlogicgames.gdx:gdx-box2d-platform:$gdxVersion:natives-desktop” compile “com.badlogicgames.gdx:gdx-tools:$gdxVersion” } } I open my Desktop project, folder “Gradle Dependecies” and see “gdx-tools-1.0.1.jar”. As I try to open it – nothing shows. So, when I try […]

How to run unit test on a android module?

I have a android project that has multiple library modules and I am trying to test a specific package that contains all modules. I tried this command: ./gradlew -Dtest.single=com.moduleone* testProductionDebug And it does not work: it doesn’t execute the tests inside this module, but instead executes all the unit tests in the main project package […]

Gradle Could not find method compile() for arguments

i have a hello world full screen android studio 1.5.1 app that i added a gradle/eclipse-mars subproject to. no other files were modified except for adding include ‘:javalib’ to settings.gradle. adding a project lib dependency: project(‘:app’) { dependencies { compile project(‘:javalib’) // line 23 } } to the root build build file and running gradle […]

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