[英]Including an APK in another project
如何在Android Studio中的项目中添加APK作为依赖项?
You can't do that. 你不能那样做。 Acceptable types are
.jar
and .aar
and internal library project module. 可接受的类型为
.jar
和.aar
以及内部库项目模块。
Best you can do is to change the app-module to library module and then include it as depenancy. 最好的办法是将应用程序模块更改为库模块,然后将其作为依赖项。
You can achieve it as follows: 您可以通过以下方式实现它:
build.gradle
file. build.gradle
文件。 applicationId
. applicationId
的行。 Only an Android app module can define this. At the top of the file, you should see the following: 在文件的顶部,您应该看到以下内容:
apply plugin: 'com.android.application'
Change it to the following: 将其更改为以下内容:
apply plugin: 'com.android.library'
Save the file and click File > Sync Project with Gradle Files. 保存文件,然后单击文件>与Gradle文件同步项目。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.