This Gradle plugin requires a newer IDE able to request IDE model level 3

需求:AndroidStudio2.2.X版本跑通Androidstudio3.0版本的demo;一直使用Androidstudio 2.2.3版本,最近想要跑一个demo,才发现该demo是用Androidstudio3.0编写的,并且其中的一个activity还是用kotlin写的

解决方案:修改三处

  1. 需要在2.2.X版本中安装kotlin插件,因为使用编辑器跑起来的时候,会报不支持kotlin language
  2. 需要在gradle.properties文件下添加两行代码
android.injected.build.model.only.versioned = 3//不添加这句话编辑器会说需要3.0+的Androidstudio
android.injected.testOnly=false//不添加这句话,运行会无法安装

猜你喜欢

转载自blog.csdn.net/shuijianbaozi/article/details/80577524
IDE
今日推荐