Tag: gradle

Where is the build.gradle file located for my android project?

Where is the build.gradle file located for my android project? I’m trying to follow along with this tutorial but can’t make necessary changes to my build.gradle file to use the support library.

Breakpoints not getting hit in Android Studio

I’m using Windows 7 and have recently switched from Eclipse to Android Studio. I am now having trouble debugging. Running Android Studio 0.8.6, I set up a completely default install, I create a default empty project, targeting the ICS SDK, using the new project wizard. I then put a breakpoint in onCreate, click on the […]

Override Java version when building a Cordova project with gradle

I am trying to build a Cordova project using gradle as a build tool. In the Cordova project I have my own plugin that requires Java 1.7. In the build.gradle that comes with Cordova the java version is 1.6. build.gradle: android { compileOptions { sourceCompatibility JavaVersion.VERSION_1_6 targetCompatibility JavaVersion.VERSION_1_6 } } The build.gradle comes with a […]

How to access files from assets folder during tests execution?

How to access files from assets folder during unit tests execution? My project is build using Gradle, I use Robolectric to run tests. It seems like gradle is being recognizing the assets: This is how I’m struggling to read the file: public String readFileFromAssets(String fileName) throws IOException { InputStream stream = getClass().getClassLoader().getResourceAsStream(“assets/” + fileName); Preconditions.checkNotNull(stream, […]

Gradle error with Android project added as a library (SlidingMenu)

I’ve never used Gradle before so I’m completely lost! I’ve added SlidingMenu as a library and I have access from my project to all the SlindingMenu stuff, but trying to compile will give me this error: Gradle: package com.jeremyfeinstein.slidingmenu.lib does not exist I’m using Android Studio (so IntelliJ) and this is my gradle.build buildscript { […]

“The signing configuration should be specified in Gradle build scripts”… I did it

I have a big issue when I come to sign my application: I have set the signing configuration in accordance with the doc: signingConfigs { release { storeFile file(“lomapnew.keystore”) storePassword “myPassword” keyAlias “myAlias” keyPassword “Something….” } } But I still get this error message: “The signing configuration should be specified in Gradle build scripts”

How to set android app version by number of build in Jenkins?

Application is automatically building by jenkins after successful push, but version is always 1.0. Instead of “0” I want to insert number of corresponding build in jenkins: 1.119, 1.120, 1.121… That is my build.gradle file // Top-level build file where you can add configuration options common to all sub-projects/modules. buildscript { repositories { mavenCentral() } […]

Add dependencies via gradle to eclipse in android project

i have a problem adding dependencies automatically to eclipse android project via gradle. I have only a little bit experience with gradle. Till now I have build two java projects with gradle. One jar and an executable-jar. This works without problems. I have used the eclipse plugin to generate the eclipse project and add the […]

Android, Gradle. How to build application and run tests from test application

I have android project and android test project inside it, located under folder tests. Structure of these project is eclipse like +-src | – res | – libs | – tests |….. I use gradle. All i want is to build app, run unit tests and get reports of them. But i don’t understand how […]

Getting the error “duplicate entry: com/google/android/gms/internal/zzble.class” when trying to add a package

I’m trying to add the react-native-firestack package to my app. But it keeps giving the following error : :app:mergeDebugResources UP-TO-DATE :app:recordFilesBeforeBundleCommandDebug :app:bundleDebugJsAndAssets SKIPPED :app:generateBundledResourcesHashDebug 4f53cda18c2baa0c0354bb5f9a3ecbe5ed12ab4d8e11ba873c2f11161202b945 :app:processDebugManifest UP-TO-DATE :app:processDebugResources UP-TO-DATE :app:generateDebugSources UP-TO-DATE :app:incrementalDebugJavaCompilationSafeguard UP-TO-DATE :app:compileDebugJavaWithJavac UP-TO-DATE :app:compileDebugNdk UP-TO-DATE :app:compileDebugSources UP-TO-DATE :app:transformClassesWithJarMergingForDebug FAILED FAILURE: Build failed with an exception. * What went wrong: Execution failed for task […]

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