Cordova plugin development – adding aar

Here’s what I’ve done to use a gradle reference with a Cordova plugin, I think this might help you. Global structure : pluginFolder/ build-extras.gradle plugin.xml yourDirContainingYourAAR/ src/ android/ yourFile.gradle myPlugin.java Put your library, say foo.aar, in the yourDirContainingYourAAR directory (create it if needed) In the plugin.xml file : <platform name=”android”> <!– your configuration elements, references, … Read more

Issues were found when checking AAR metadata: androidx.core:core:1.12.0-alpha01 and androidx.core:core-ktx:1.12.0-alpha01

I had the same error today, and this is what fixed it for me: check in all your library modules for this import in the build.gradle files (you can search in Android Studio in the Edit → Find → Find in Files… menu option): implementation ‘androidx.core:core-ktx:+’ Replace it with the latest stable version to avoid … Read more

Android Library Gradle release JAR

While I haven’t tried uploading the artifacts with a deployment to Sonatype (or even a local repo), here’s what I managed to come up with a few weeks ago when trying to tackle the same problem. android.libraryVariants.all { variant -> def name = variant.buildType.name if (name.equals(com.android.builder.core.BuilderConstants.DEBUG)) { return; // Skip debug builds. } def task … Read more

Adding local .aar files to my gradle build

You put your flatDir block in the wrong repostories block. The repositories block inside buildscript tells Gradle where to find the Android-Gradle plugin, but not the rest of the dependencies. You need to have another top-level repositories block like this: repositories { mavenCentral() flatDir { dirs ‘aars’ } } I tested this and it works … Read more