Androidstudio imports Project as aar package into the project

1. Import project new->new module in module form

2. Change the module to library builder.gradle

apply plugin: 'com.android.application'
change to
apply plugin: 'com.android.library'

  

defaultConfig {
    applicationId "com.example.administrator.m3demo"
remove this line

3. Compile, find the generated aar in builder->outputs->aar

4. Remove the module just introduced and put the generated aar in libs

dependencies {
    .....
    compile (name:'m3demo-release',ext:'aar')
}
//repositories{
//    flatDir{
//        dirs 'libs'
//    }
//}

 

Guess you like

Origin http://10.200.1.11:23101/article/api/json?id=326778797&siteId=291194637