Skip to content

forexample/android-aar-simple

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

AAR Example

Example of creation AAR with C++ *.so library.

Instructions for creating AAR:

Create AAR

On first run open FooLibrary project in Android Studio to initialize all local settings, then close this project.

Run build script:

> cd android-aar-simple
[android-aar-simple]> ./create-aar.sh
[android-aar-simple]> ls foo-debug.aar
foo-debug.aar

Script will run builds with two toolchain:

  • android-ndk-r10e-api-21-arm64-v8a
  • android-ndk-r10e-api-19-armeabi-v7a-neon-clang-libcxx

Libraries will be installed to:

  • FooLibrary/foo/src/main/jniLibs/arm64-v8a
  • FooLibrary/foo/src/main/jniLibs/armeabi-v7a

Sources:

Use AAR

Open project android-aar-simple/UseFoo and follow instructions for adding AAR:

  • File -> New -> New Module ... -> Import .JAR/.AAR Package find foo-debug.aar and load it
  • In file android-aar-simple/UseFoo/app/build.gradle add line:
dependencies {
  compile project(":foo-debug")
}
  • Sync project
  • Build -> Make Project
  • Run example on device

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published