Questions tagged [android-gradle-3.0]

1

votes
1

answer
432

Views

Android Gradle 3 facebook-login:4.29.0 dex merge error Program type already present

Hey I am trying to add the newest version of facebook-login:4.29.0 to my app. In doing so I updated to Gradle 3. I cannot resolve this dex merge. It only happens if I include the facebook-login library. Maybe I did something with the gradle 3 migration wrong? I have a few other facebook libraries th...
StarWind0
1

votes
0

answer
423

Views

Getting unresolved reference error in Kotlin Android Library Project

I am getting unresolved reference error in Kotlin Android Library project. 1.) standard_kotlin_lib.jar --> contains: Kotlin classes, META-INF/standard_kotlin_lib.kotlin_module 2.) A.aar --> compiles only standard_kotlin_lib.jar file. After compilation, inside generated A.aar file’s classes.jar: ME...
user3066038
1

votes
2

answer
1.5k

Views

Unable to resolve dependency for ':[email protected]/compileClasspath': Could not resolve com.android.support:design:26.1.0

I am getting this error while sync gradle project. Unable to resolve dependency for ':[email protected]/compileClasspath': Could not resolve com.android.support:design:26.1.0 can anyone help me? apply plugin: 'com.android.application' android { compileSdkVersion 26 defaultConfig { applicationId...
1

votes
1

answer
82

Views

Android Manifest Merge issue - Removing google ads gradle dependency doesn't remove its AndroidManifest.xml nodes

I am having two product flavors in the project (1) free (2) pro I am including google ads library only to the free product flavor as below freeCompile 'com.google.android.gms:play-services-ads:11.4.2' Now I want to replace it with another ad library. I am trying to remove this dependency but it does...
Harsh4789
1

votes
0

answer
115

Views

uploadArchives configuration resolution fails with Android Plugin 3.1.2

I am attempting to create and Android Library project with the latest Android Gradle plugin and am having a hard time understanding the error it is giving me. My setup is a java module, android library module and a second android library module. They are all within the same project. Module A (built...
Jared
1

votes
0

answer
44

Views

Android / Gradle - Artifacts (aar) with dependencies

I have deployed an artifact (aar) with dagger dependency to my local artifactory. When I use the artifact in a project, it crashes at run-time due to the following exception. Caused by: java.lang.ClassNotFoundException: Didn't find class 'dagger.internal.Preconditions' on path: DexPathList[[zip file...
gopalanrc
1

votes
0

answer
57

Views

How to modify the apk name use java in android gradle plugin 3.+

We know that Android Gradle Plugin 3.0 modifies the Api https://developer.android.com/studio/build/gradle-plugin-3-0-0-migration, we need to modify the apk name with the following code in build.gradle: // If you use each() to iterate through the variant objects, // you need to start using all(). Tha...
littlegnal
1

votes
0

answer
51

Views

Process 'command './node_modules/expokit/detach-scripts/run-exp.sh'' finished with non-zero exit value 127

When I build my Android app using AppCenter I get the following error message. Has anyone seen this and if so how did they solve the issue? What went wrong: Execution failed for task ':app:bundleDevMinSdkDevKernelReleaseExpoAssets'. Process 'command './node_modules/expokit/detach-scripts/run-exp.sh'...
user3284707
1

votes
1

answer
448

Views

Unable to build project with upgrade to android gradle 3.0

I am trying to update android JavaVersion.VERSION_1_7 to JavaVersion.VERSION_1_8. I am using Android Studio 3.0 Beta 2 from canary branch. It looks like I did things by the book , but I am unable to compile my project with the new setup. I have provided a brief description of of my gradle file below...
ABS
1

votes
1

answer
98

Views

using ig-json-parser with annotationProcessor from android studio 3.0

In the new version of gradle, the 'android-apt'-pligin is no longer compatible. now you have to user 'annotationProcessor' instatof 'apt' so far so good. I do the folowing: Remove the class path for the apt from the build.gradle (Project: MyApplication) classpath 'com.neenbedankt.gradle.plugins:andr...
André Bäuml
1

votes
1

answer
87

Views

Gradle Error when try to add dependency for Zxing scanner

I tried to add a dependency 'me.dm7.barcodescanner:zxing:1.9.8' for the barcode scanner functionality. It populates Gradle error as given in image click
S Mugunthankumar
1

votes
1

answer
1.3k

Views

How to publish all flavor variants to maven with Android Gradle plugin 3.0.0?

Earlier I have used android gradle plugin v2.2.2, now I am migrating to 3.0. The below code publishes(uploadArchives task) all my variants to maven without any issues with 2.14.1. But as soon I upgrade to 3.0 nothing is been published. If I remove the prodcutFlavors, it publishes the release version...
1

votes
1

answer
614

Views

Android NDK build

While trying to build my android ndk project getting following error. Android studio version 3.1.3 FAILURE: Build failed with an exception. What went wrong: Execution failed for task ':app:ndkBuild'. Process 'command '/Users/bnaskar/Library/Android/sdk/ndk-bundle/ndk-build'' finished with non-zero e...
lizard
17

votes
3

answer
7k

Views

The CompileOptions.bootClasspath property has been deprecated

After upgrading to Gradle 4.x, I get the warning The CompileOptions.bootClasspath property has been deprecated and is scheduled to be removed in Gradle 5.0. Please use the CompileOptions.bootstrapClasspath property instead. in one of my projects. I don't see anything called bootClasspath or similar...
Simon Warta
3

votes
4

answer
15.9k

Views

AAPT2 error: this error happened as soon as i updated my android studio to the latest version

I tried 'multiDexEnabled true' as well as 'android.enableAapt2=false' but the error continues to come.... There seems to be some build problem.... I can't figure out what it is org.gradle.api.tasks.TaskExecutionException: Execution failed for task ':app:processDebugResources'. at org.gradle.api.inte...
Reevanth Lama
21

votes
2

answer
5.4k

Views

Android Gradle Implementation vs CompileOnly Performance

The docs mention that implementation provides significant build time improvements over compile/api. What about compileOnly? My use case is a multi-module (sorry I don't like Gradle's multi-project terminology) project, where I have an Android app, and multiple libraries that the app depends on (impl...
Eliezer
21

votes
4

answer
3.2k

Views

java.lang.UnsupportedOperationException: Can't convert value at index 5 to color: type=0x5

My app is crashing after updating to Android Studio 3 RC1 (Gradle 4, Android Gradle plugin 3 RC2). This is the error I am having: java.lang.RuntimeException: Unable to start activity ComponentInfo{*****}: android.view.InflateException: Binary XML file line #0: Binary XML file line #0: Error inflatin...
Zhanbolat Raimbekov
3

votes
3

answer
2.9k

Views

Android gradle 3.0.0 - Unexpected end of ZLIB input stream

After updating android studio to 3.0 and switching to gradle plugin 3.0.0 I am getting this error: Gradle '...' project refresh failed Error:Unexpected end of ZLIB input stream The problems appears both in all my old projects but brand new ones as well. Any Idea on what is causing this? Gradle 2.3....
Albin.E
4

votes
1

answer
2.7k

Views

Android Gradle 3.0 and “Unresolved reference R” for a local library

I'm struggling to update my project to compile with Android Gradle Plugin 3.0.1. Facts: app project depends on a local library: lib ./gradlew assembleDebug for app fails at compiling lib with error Unresolved reference: R Building lib as a standalone project succeeds package in AndroidManifest of ei...
kar
5

votes
5

answer
6.1k

Views

Android Studio 3.0 Unsigned Apk Not Installing

After upgrading to android studio 3.0 the debug apk is saying App not istalled. The package appears to be corrupted
Anirban
12

votes
3

answer
803

Views

Android: Firebase remoteConfig getString() method is removing quotes from string inside default.xml

i have the following remote config_default.xml file LOCAL_JSON [{'title':'TitleA','path':'pathA','image_url':' Some URL A'},{'title':'TitleB','path':'pathB','image_url':' Some URL B'}] Now when i try to access it using Firebase remote config getString() method, i always get the string without quotes...
Sheraz Ahmad Khilji
3

votes
0

answer
134

Views

Building a project with library dependency prevents cleaning

Windows 10, gradle 4.1, build tools 27.0.2, gradle plugin 3.0.1. I have an application app, with a dependency to android-faq-bot. If i do ./gradlew.bat clean after a successful build, i get the following error: $ gradlew.bat clean app:compileJenkinsDebugSources app: 'annotationProcessor' dependencie...
Raul
36

votes
7

answer
10.6k

Views

commons-logging defines classes that conflict with classes now provided by Android after Android Studio Update

I have updated Android Studio to version 3 and now seems unable to compile my project previously compiled without errors. The error message is the follow Error:Error: commons-logging defines classes that conflict with classes now provided by Android. Solutions include finding newer versions or alter...
AndreaF
3

votes
1

answer
469

Views

Android Gradle 3.0: Multiple dex files define Lorg/jetbrains/annotations/TestOnly

Seems like a run of a mill unable to merge dex problem, however, I can't find where the duplicated dependency comes from. The app:dependencies printout is pasted below. As you can see, org.jetbrains:annotations:13.0 exists only once in here. Am I reading it wrong? What other commands I can use to hu...
kar
3

votes
2

answer
64

Views

Avoid api and always use implementation?

Building a multi module Android app using Gradle plugin 3, instead of declaring a dependency with compile one should use implementation or api. The latter basically works like compile. Using implementation, the dependency is hidden from any module depending on this module. So, let's say I have three...
Oderik
3

votes
2

answer
322

Views

AAR libs no longer created in the output folder with Android Studio 3.0

I have some lib modules in my Android project. Before updating Android Studio to the new 3.0 version and so the Gradle plugin to the 3.0.0 one, I was able to find the AAR file of my libs into the builder/output folder after building the project. It seems that the AAR libs are no longer produced in t...
Roberto Martucci
1

votes
1

answer
364

Views

How to override versionCode for ABI filters with gradle plugin 3.0.0-beta1?

I have the following defined in my build.gradle for overriding the versionCode based on the ABI. import com.android.build.OutputFile android.applicationVariants.all { variant -> variant.outputs.each { output -> def defaultCode = android.defaultConfig.versionCode def filter = output.getFilter(OutputF...
Mark
7

votes
2

answer
128

Views

Random test failure with native crash

I am running espresso test suite against my application on emulator. I see random crashes with following logcat output: 06-26 08:58:51.129 info WebViewFactory Loading com.android.webview version 44.0.2403.119 (code 246011960) 06-26 08:58:51.136 warn System ClassLoader referenced unknown pa...
Maddy
2

votes
4

answer
3.1k

Views

Android Studio 3.0 dependency error

I'm trying out Android Studio 3.0 Canary 9 with an existing project, and I'm getting this error trying to sync the build files: Error:Failed to resolve: commons-logging:commons-logging:1.1.1 I am not adding commons-logging as a dependency, so it must be used by some other dependency but I don't know...
nasch
5

votes
0

answer
289

Views

Adding test sourceSets has stopped working in Android Gradle Plugin 3.1.1

I have a project split up into many modules. One module called ':testcore' contains some common classes used by tests. The project is in this structure: :app :libraryone :testcore :librarytwo :testcore ... To make these files useable for the other modules I added them one by one to the other module'...
Matt Carron
7

votes
1

answer
987

Views

New error after update to gradle-tool to 3.1.0-beta3 or 3.2.0-alpha03

Just a normal project with 'prod' and 'mock' flavors in app/build.gradle: sourceSets { main.java.srcDirs += 'blabla bla' test.java.srcDirs += 'blabla bla' androidTest.java.srcDirs += 'blabla bla' prodDebug.java.srcDirs += 'blabla bla' mockDebug.java.srcDirs += 'blabla bla' prod.java.srcDirs += 'blab...
TeeTracker
2

votes
2

answer
200

Views

Execution failed for task ':app:compileDebugJavaWithJavac' MD5 hash for the file

this error causes after moved project from one system to another I do not about what was happening wrong with my project I've also Clean our project but nothing is happens. I've also removed the dependencies from my libs folder This is my buil.gradle apply plugin: 'com.android.application' android...
Vishal Yadav
56

votes
14

answer
42.6k

Views

java.lang.NoSuchMethodError: No static method getFont(Landroid/content/Context;ILandroid/util/TypedValue;ILandroid/widget/TextView;)

After I updated my Android Studio to 3.0 I am getting No static method getFont() error. The project on which I am working is on github, https://github.com/ik024/GithubBrowser // Top-level build file where you can add configuration options common to all sub-projects/modules. buildscript { repositori...
ik024
8

votes
2

answer
559

Views

isMinifyEnabled() is deprecated. What is the alternative?

I use the below code to automatically generate pro guard mapping file apparently according to product flavors. buildTypes { release { minifyEnabled true shrinkResources true proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' applicationVariants.all { variant -> if (va...
Sai Kiran
8

votes
2

answer
746

Views

Variant debug has no output with type INSTANT_RUN_MERGED_MANIFESTS

What I want to do & the problem I updated my Android Studio and Android Gradle Plugin to 3.0.0 and my Gradle Wrapper to 4.2.1 and want to build & deploy my Android Gradle project on a device via IDE. Building succeeds When I try to deploy my :app module to a connected device, I receive the error:...
hb0
2

votes
2

answer
92

Views

Gradle Building Schema dynamically from combined flavor dimensions

We have two different flavor dimensions like in this example and we want to dynamically generate applicationId like com.company.apple instead this script will generate an applicationId of null.company.apple I believe this is because the function at the bottom iterates over the full productFlavor li...
Ankhwatcher
2

votes
2

answer
742

Views

How to set .apk file name and package in build.gradle? Android Gradle plugin 3.0

According to my CI requirements I'm trying to achieve two things: set apk file name in format: .apk set folder for generated .apk file: app/build/outputs/apk/myBuild.apk I used android gradle plugin 2.3 and got following script to manage task above (it worked correctly for gradle plugin 2.3): applic...
Slava Sotone
7

votes
2

answer
1.9k

Views

android.support.v4.animation missing in API 26

I am facing an issue: android.support.v4.animation.* is missing and I cannot find any solution. Android Plugin upgrade to 3.0 requires buildToolsVersion and compileSDKVersion to 26+ and this package is missing.
Akshay Mahajan
2

votes
0

answer
64

Views

How can I list which dependencies count against the dex limit for an androidTest apk in AGP 3.0?

I upgraded to AGP 3.0, but then got a com.android.dex.DexIndexOverflowException for the androidTest apk. I didn't have this issue with gradle 2.3.3. How can I get a dependency report for exactly which dependencies are being added only to an androidTestApk (aka dependencies which count against the 65...
ZakTaccardi
2

votes
0

answer
715

Views

Using Precondition.checkNotNull() in Android Studio 3.0 gives lint error

I have recently updated my Android Studio to 3.0. I tried using Preconditions.checkNotNull() but it shows an error with following message. Preconditions.checkNotNull() can only be called from within the same library group (groupId=com.android.support). I searched some other links and found somethi...
Sahil Patel

View additional questions