Questions tagged [android-gradle-3.0]

Use this tag for questions specifically related to the version 3 of the Android Gradle Plugin, for generic questions use the android-gradle tag.

Version 3 of the Android Gradle Plugin is Android's standard build system. It is used as backing-build-system by Android Studio.

123 questions
3
votes
2 answers

Android Studio 4.4.2. Direct local .aar file dependencies are not supported when building an AAR

Everything was fine, but after the next build I got some errors. Direct local .aar file dependencies are not supported when building an AAR. The resulting AAR would be broken because the classes and Android resources from any local .aar file…
3
votes
0 answers

Flavour wise source set management in android

In android project, we are currently having two different flavours Ex : USA and Canada. We are maintaining common "res" in main folder. Now, we want to add one more flavour. Ex : Australia. The problem arrived here. The Australia country flavour is…
3
votes
2 answers

Issue with BuildConfig.FLAVOR after Android Studio 3.6 update

Anyone experiencing issues with BuildConfig.FLAVOR parameter? After Android Studio 3.6 update all of my BuildConfig usages in code were red (as if the import was removed) and I can't override it from app config, only from Crashlytics and other…
3
votes
1 answer

Can't find lib via transitive use of sub module

Android Studio 3.4.2 I has main project (app) that use module mytransport like this: app/build.gradle dependencies { annotationProcessor "org.androidannotations:androidannotations:$AAVersion" implementation fileTree(dir: 'libs', include:…
Alex
  • 1,857
  • 4
  • 17
  • 34
3
votes
0 answers

com.android.builder.internal.aapt.v2.Aapt2Exception: Android resource linking failed

After updating Android studio 3.2.1. i am facing above issue i had go through com.android.builder.internal.aapt.v2.Aapt2Exception: Android resource compilation failed after updating android studio but no useful. Previously i have faced Build errors…
3
votes
5 answers

error: inner element must either be a resource reference or empty?

Recently I've upgraded my project to Android Studio 3.2.1, Gradel 4.6, Gradle Plugin 4.6 and tagetSDKVersion 28. However I'm getting below error in the merged values.xml file - error: inner element must either be a resource reference or…
Amrut
  • 2,655
  • 3
  • 24
  • 44
3
votes
1 answer

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…
3
votes
1 answer

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…
kar
  • 741
  • 6
  • 16
3
votes
2 answers

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…
3
votes
0 answers

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…
3
votes
2 answers

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…
3
votes
2 answers

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…
Roberto Martucci
  • 1,237
  • 1
  • 13
  • 21
3
votes
5 answers

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…
3
votes
2 answers

Application's onCreate not being called for production builds

Ever since I upgraded to gradle 3.0 our main Application's onCreate is not firing from a production-flavour app. When building for our staging flavour however, the Application's onCreate is called just fine. Since the Application's onCreate is…
simen-andresen
  • 2,217
  • 4
  • 25
  • 39
3
votes
1 answer

What's the correct way of exposing a support library dependency in an Android library using android-gradle 3?

I develop an android library. The library depends on appcompat-v7. My consumers also depend on appcompat-v7. How do I most correctly expose my appcompat dependency from the libray when publishing to a maven repository? What I'm doing now Listing…
Nilzor
  • 18,082
  • 22
  • 100
  • 167
1 2
3
8 9