Skip to content

allenou/flutter-android-aar

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Flutter with Android AAR File

This project demonstrates how to use Flutter to build Android project within an AAR file.

References

Configure Android AAR File

Auto configuration with Android Studio

  1. Import android folder to Android Studio.
  2. Click File > New > New Module and choose Import .JAR/.AAR Package.
  3. Press F4 to open Project Structure, and then add the dependent module.

Manual configuration

  1. Create a new folder android/DynamsoftBarcodeReader. Create android/DynamsoftBarcodeReader/build.gradle:

    configurations.maybeCreate("default")
    artifacts.add("default", file('DynamsoftBarcodeReader.aar')) 
    

    Copy DynamsoftBarcodeReader.aar to this folder:

    flutter aar

  2. Edit android/settings.gradle:

    include ':app', ':DynamsoftBarcodeReader'
    
  3. Add the dependency to android\app\build.gradle:

    dependencies {
     androidTestCompile 'com.android.support:support-annotations:22.0.0'
     androidTestCompile 'com.android.support.test:runner:0.5'
     androidTestCompile 'com.android.support.test:rules:0.5'
     compile project(':DynamsoftBarcodeReader')
    }
    

Build the project

Import the project to Intellij IDEA and then select an Android device to run. flutter app with Android AAR

Blog

Flutter Programming with Android AAR File

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Java 38.5%
  • Groovy 29.0%
  • Dart 18.1%
  • Objective-C 14.4%