Use an aar library cause missing dependencies using api in Gradle 4.x

I was able to solve it. The main issue was Android O with Gradle 4.x using api dependencies { api ‘com.squareup.okhttp3:logging-interceptor:3.4.1’ api “io.reactivex.rxjava2:rxandroid:$versions.libs.rxAndroid” Most answers are concerning something like this publishing { publications { mipartner(MavenPublication) { groupId ‘…’ artifactId ‘..’ version 1.0 artifact “$buildDir/outputs/aar/myLib-release.aar” //generate pom nodes for dependencies pom.withXml { def dependenciesNode = asNode().appendNode(‘dependencies’) … Read more

My NDK project fails to compile with a CPU architecture-related issue

Most likely, you have NDK r17 installed, which does not support armeabi anymore. Your gradle plugin is not aware of this recent change. You must upgrade: in build.gradle, you should have buildscript { dependencies { classpath ‘com.android.tools.build:gradle:3.1.2’ } } and in gradle/wrapper/gradle-wrapper.properties distributionUrl=https\://services.gradle.org/distributions/gradle-4.4-all.zip But even after upgrade, your build.gradle most likely lacks the abiFilters statement, … Read more

Create an AAR with multiple AARs/JARs

I haven’t seen a definitive response that enables me to create an AAR that includes 1 or more AARs or JARs. Yes, I think because this topic is not limited to AAR or JAR, but how Maven manage dependency. https://maven.apache.org/guides/introduction/introduction-to-dependency-mechanism.html while I was able to generate one AAR file that I can use in my … Read more

How to exclude res folder from gradle build flavours?

I finally solved this problem! I have found this link. And did this: add an xml file to res/raw folder. I named it resources_discard.xml, here is it: <?xml version=”1.0″ encoding=”utf-8″?> <resources xmlns:tools=”http://schemas.android.com/tools” tools:discard=”@raw/hd/*” /> this file is placed in the correct directory structure for my flavor called lite (“src/lite/res/raw”) This way, contents of res/hd folder … Read more

Android Studio: Re-download dependencies and sync project

While importing a libGDX project I got the same message from Android Studio 2.2. Went to File->Project Structure then selected Project and set Gradle version and Android Plugin Version to values identical to another project I had recently created with Android Studio 2.2 and updated SDK. Could then sync gradle. Did Build->Build Clean with no … Read more