Tag: gradle

Using Jenkins to build an android gradle project fails

I’m trying to setup Jenkins on a computer running OSX and I’m running into a problem. When I’m trying to build the project with my default user account everything works fine, but as soon as im trying to build via Jenkins the build fails with the following output: FAILURE: Build failed with an exception. * […]

Android Studio does not compile when using deprecated API

I am having issues compiling and running my application on Android Studio. The problem: It doesn’t like that I am using deprecated APIs. (from gradlew compileDebug –stacktrace. Full stacktrace here Note: Some input files use or override a deprecated API. Note: Recompile with -Xlint:deprecation for details. The Background: I am using a PreferenceActivity which uses […]

Android Studio: Integrating Butterknife?

I am trying to implement Butterknife into my android studio project. However when I do so I get an error on @InjectView “cannot resolve symbol InjectView”. Have I not implemented Butterknife sucsessfully? Activity code: package com.example.rodf.testapp; import android.support.v7.app.ActionBarActivity; import android.os.Bundle; import android.view.Menu; import android.view.MenuItem; public class MainActivity extends ActionBarActivity { @InjectView(R.id.tvHelloWorld) TextView tv1; @Override protected […]

Android studio gradle duplicate files dagger compiler

having strange problem after updating android studio to 0.4.0 and gradle plugin to 0.7.1 and gradle version to 1.9 with dagger compiler build.gradle android { packagingOptions { exclude ‘META-INF/DEPENDENCIES.txt’ exclude ‘META-INF/LICENSE.txt’ exclude ‘META-INF/NOTICE.txt’ } } dependencies { compile ‘com.android.support:support-v4:+’ compile ‘com.android.support:support-v13:19.0.+’ compile ‘com.google.code.gson:gson:2.2.4’ compile ‘com.squareup.dagger:dagger:1.2.0’ compile ‘com.squareup.dagger:dagger-compiler:1.2.0’ } on build getting this error Execution failed […]

Why can't I use gradle task connectedDebugAndroidTest in my build script?

I can refer to connectedCheck task (which came from android plugin) from my build script: connectedCheck.finalizedBy AndroidShowTestResults But trying to use connectedDebugAndroidTest (which came from android plugin too) connectedDebugAndroidTest.finalizedBy AndroidShowTestResults gives me Error:(48, 0) Could not find property ‘connectedDebugAndroidTest’ on project ‘:app’. And if I try task connectedDebugAndroidTest << {print ‘123’} it curses me with […]

How to find gradle lintOptions document for android?

I got “…is not translated in … [MissingTranslation]”error in my android project. I searched by google find something works as abortOnError false and a document about lintOptions. But I do not want to ignore all lint errors, so I copied xml created by Eclipse as lintConfig file(“default-lint.xml”), and it works. I want to know where […]

Separating integration tests from unit tests in Android Studio

I’m trying to separate out integration tests in Android Studio 0.9. I have added the following to the build file: sourceSets { integrationTest { java.srcDir file(‘src/integrationTest/java’) } } task integrationTest(type: Test) { testClassesDir = sourceSets.integrationTest.output.classesDir classpath = sourceSets.integrationTest.runtimeClasspath } I’ve run into a couple of issues: The task will run but it doesn’t have the […]

file:///android_res/drawable not working when using flavor with other package name

My problem is that after I added flavors to my project the flavor with a package name different from the actual source seems to have problems with accessing the files in android_res/drawable. More specifically I have a html-view that calls the following image. <img src=”file:///android_res/drawable/image.png”> The image shows up in the production flavor that has […]

Can Android Libraries in Gradle have other Android Libraries as dependencies?

Is this structure allowed? MyProject/ | settings.gradle + app/ | build.gradle + libraries/ + lib1/ | settings.gradle | build.gradle + libraries/ + sublib1/ | build.gradle + sublib2/ | build.gradle + lib2/ | build.gradle I had this working with Ant but with Gradle my project can’t find sublib1 or sublib2. When I run gradle I get […]

Gradle – build sass per productflavor (multi folder)

We created an Android app with a webview which shows a local website from the assets folder. The project has different Product Flavors to generate diffent apps with different styles and content but with the same codebas (native Java and HTML / JS). For each flavor we want to define a diffent sass file with […]

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