The module is an Android project without build variants, and cannot be built

Posted 新感觉

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了The module is an Android project without build variants, and cannot be built相关的知识,希望对你有一定的参考价值。

 

导入 安卓项目报错


Error:The module ‘app‘ is an android project without build variants, and cannot be built.
Please fix the module‘s configuration in the build.gradle file and sync the project again.

看不出来什么鬼问题?

百度一下

https://stackoverflow.com/questions/49834961/the-module-app-is-an-android-project-without-build-variants

参考,看了一下。

将 classpath grdle 版本改低一些。  之前是  3.2.0 是最新的版本了。估计最新版有兼容性问题吧。

将  classpath ‘com.android.tools.build:gradle:3.1.0‘ 

改低了之后, 这个问题解决了



以上是关于The module is an Android project without build variants, and cannot be built的主要内容,如果未能解决你的问题,请参考以下文章

Android Studio解决unspecified on project app resolves to an APK archive which is not supported

Android Studio解决unspecified on project app resolves to an APK archive which is not supported

(转)Android Studio解决unspecified on project app resolves to an APK archive which is not supported(示例代码

kotlin/java混合开发接入ARouter遇到的问题Compiler An exception is encountered, [These no module name, at ‘build.

Android Studio报错:The binary version of its metadata is 1.5.1, expected version is 1.1.15.

Android Studio报错:The binary version of its metadata is 1.5.1, expected version is 1.1.15.