Questions tagged [aar]

AAR (Android Library Archive) is a package file format, similar to APK (Android package) file format, that you can use as a dependency for an Android app module

AAR (Android Library Archive) is the binary distribution of an Android library project. AAR file is variant of file similar to . AAR files can contain Android resources and a manifest file, which allows you to bundle in shared resources like layouts and drawables in addition to Java classes and methods.

AAR file is used to share resources between multiple Android applications or between multiple versions (for example free and paid) of same Android application.

1001 questions
13
votes
3 answers

Gradle: how to include dependencies from repositories to output aar file

I am trying to build an arr package in Android Studio. This package contains dependecies for Zendesk: allprojects { repositories { maven { url 'https://zendesk.artifactoryonline.com/zendesk/repo' } } } compile (group: 'com.zendesk',…
Konstantin Gindemit
  • 382
  • 1
  • 4
  • 10
13
votes
5 answers

How to include aar files used in library projects in main project in Android

My project is including some library project. Library is using some aar files and its dependecny is already defined in the module: gradle file. I am facing problem in including this library in my project. If I keep duplicate aar files in app->lib…
Manish
  • 983
  • 1
  • 9
  • 27
13
votes
2 answers

How to publish Android .aar sources to make Android Studio automatically find them?

I'm publishing libraries to an internal Sonatype Nexus repository. Android Studio has a feature that automatically finds the correct source for a library that is referenced through gradle. I publish the sources for our aar as a separate jar to the…
Janusz
  • 187,060
  • 113
  • 301
  • 369
12
votes
3 answers

Proguard not keeping classes when building aar

From this reference: https://github.com/codepath/android_guides/wiki/Building-your-own-Android-library I have the following gradle file: android { compileSdkVersion 25 buildToolsVersion "26.0.2" buildTypes { release { …
lostintranslation
  • 23,756
  • 50
  • 159
  • 262
12
votes
1 answer

Class not found in aar

I'm getting class not found exception in my Android library (aar) when GoogleApiAvailability is called. Caused by: java.lang.ClassNotFoundException: Didn't find class "com.google.android.gms.common.GoogleApiAvailability" on path:…
12
votes
1 answer

Gradle: download Dependencies of included aar-library

I wrote a library-project cameraBarcodeScanner that is built into an aar file. This library has the following dependencies defined in its build.gradle: dependencies { compile fileTree(dir: 'libs', include: ['*.jar']) testCompile…
12
votes
3 answers

Create an AAR with multiple AARs/JARs

I have seen questions (Android Studio combine 2 .aar into one and others) posted by various developers but I haven't seen a definitive response that enables me to create an AAR that includes 1 or more AARs or JARs (I can do with JARs since I don't…
Anil Gorthy
  • 869
  • 3
  • 13
  • 30
12
votes
2 answers

How do I package .so files into my .aar archive?

I was wondering if it's possible to package my native .so files into my .aar file? If so, where would the .so files go and are there any references that I can read in regards to this?
Kamilski81
  • 14,409
  • 33
  • 108
  • 161
12
votes
2 answers

Android load modules dynamically

I wanna write an android application which can be extended with modules (android libraries). The modules shall be loaded at runtime. Therefore they'll be downloaded from an url and stored in a directory. The modules are aar files. Is there a way to…
boeserwolf91
  • 166
  • 1
  • 7
11
votes
2 answers

How to build Flutter project with Android aar file?

I want to use Flutter to create an Android app which depends on a third-party SDK that wrapped in an aar file. So far, I have only found the article Accessing Platform and Third-Party Services in Flutter. It seems that I have to build the Flutter…
yushulx
  • 11,695
  • 8
  • 37
  • 64
11
votes
2 answers

Android Studio Create AAR using another AAR file and jar inside

I am creating AAR file using another aar and jar file dependency. I have successfully created the .aar release file. Then, I have imported my new AAR file into the sample Project. the project is running fine. when going to access that aar and jar…
harikrishnan
  • 1,985
  • 4
  • 32
  • 63
11
votes
1 answer

android: allow creation of an activity-alias whose targetActivity is in an aar/sdk

I'm writing an SDK and would like developers to be able to create an activity-alias whose targetActivity is set to an activity inside my SDK. I'm doing this because I'd like them to be able to customize the intent filter on a specific activity in…
lf215
  • 1,185
  • 7
  • 41
  • 83
11
votes
2 answers

How to include dependencies into .aar library?

I'm using Android Studio 1.4 I have a module in my project that's having next dependencies in build.gradle: dependencies { provided fileTree(dir: 'libs', include: ['*.jar']) provided 'junit:junit:4.12' apply plugin:…
Vassily
  • 5,263
  • 4
  • 33
  • 63
11
votes
2 answers

How do I use JNI with AAR library?

I am creating an Android library (.aar file) and I need to use JNI. (I am very well aware of Google's discouragement of using JNI/NDK if possible, but in this case, it's not possible). I started with a standalone hello-jni example APP (to first…
baekacaek
  • 1,527
  • 3
  • 22
  • 45
11
votes
3 answers

aar support in Android.mk

I am doing android custom ROM development now. the build system of aosp is based on Android.mk, But I want to include some aar libraries, is it possible to include aar libaries in Android.mk ?
Juude
  • 1,207
  • 2
  • 13
  • 22