我有了多个模块项目:如何建立一个模块中的Android
MyProject
module1
module2
我想生成的APK模块2.
模块2在其下面的说明的build.gradle:
android.applicationVariants.all { variant ->
variant.outputs.each { output ->
def file = output.outputFile
output.outputFile = new File("../module1/src/main/assets", "module2.apk")
}
}
正如你可以看到,我想打造的APK到Module的资产目录。
Android Studio中似乎并没有对此有一个按钮。如果有,请你指出我如何找到并使用它。另外一个好处是可以展示如何在终端上进行操作。我在Linux上(Kali Linux)
谢谢大家提前。
难道我在MyProject中的build.gradle添加此? –
见https://github.com/bmuschko/gradle-android-examples –