studio版本低的报错解决办法

Error:This Gradle plugin requires Studio 3.0 minimum

这是studio3.0 以上写的代码需要配置gradle文件才可以运行
具体的方法

  • gradle.properties这个文件里面添加如下代码android.injected.build.model.only.versioned=3
  • 然后再添加如下代码android.injected.testOnly=false
  • 然后安装Apk的时候还会报错的解决不能安装
Installation failed with message Invalid File: E:\Users\imp_mac\Desktop\安卓工程\瑞涵\app\build\intermediates\split-apk\debug\slices\slice_6.apk.
It is possible that this issue is resolved by uninstalling an existing version of the apk if it is present, and then re-installing.

WARNING: Uninstalling will remove the application data!

Do you want to uninstall the existing application?

这个问题的解决
重新编译项目即可

你可能感兴趣的:(studio版本低的报错解决办法)