1. 修改被导入的项目的build.gradle
apply plugin: 'com.android.library'

删掉applicationId 

修改为 libraryVariants
//配置自定义打包名称
    libraryVariants.all { variant ->
        variant.outputs.all {
            def fileName
            ...
        }
    }


  1. 打开要导入的项目
    1. 选择New Model
      Android Studio导入model

    2. 选择Import Gradle project
      Android Studio导入model

    3. 点击next

    4. 选择项目目录
      Android Studio导入model

  2. 在项目的build.gradle中添加implementation project(':demo'),demo是被引入的项目的名字

相关文章:

  • 2021-07-15
  • 2021-07-06
  • 2022-12-23
  • 2022-01-07
  • 2021-05-20
  • 2021-09-25
  • 2021-12-23
  • 2021-03-31
猜你喜欢
  • 2021-12-15
  • 2021-05-13
  • 2021-04-07
  • 2021-12-03
  • 2021-07-16
  • 2021-06-07
  • 2021-08-10
相关资源
相似解决方案