AndroidStudio UnsupportedMethodException Unsupported method: InstantRun.getRestartDexFile().

来源:互联网 发布:开根号的算法 编辑:程序博客网 时间:2024/06/08 04:39

AndroidSudio导入 项目发现

10:22:01 UnsupportedMethodException

         Unsupported method: InstantRun.getRestartDexFile().
         The version of Gradle you connect to does not support that method.
         To resolve the problem you can change/upgrade the target version of Gradle you connect to.

         Alternatively, you can ignore this exception and read other information from the model.


如图





修改方式替换你的 

classpath 'com.android.tools.build:gradle:2.1.0' 改为 你最近运行成功 的Gradle 版本
我的是改为 
classpath 'com.android.tools.build:gradle:2.0.0'
然后 Rebuild Project一下

我认为是开两个 AndroidStudio窗口 两个不同的项目 导致,新开的项目 用之前 运行成功的Gradle版本 就解决了

2 0