gpt4 book ai didi

android - 不支持的方法 : InstantRun. getRestartDexFile() - Android Studio

转载 作者:塔克拉玛干 更新时间:2023-11-02 08:25:39 25 4
gpt4 key购买 nike

我有 Android Studio 2.0 Beta 6
build.gradle 中的 Gradle 版本是 classpath 'com.android.tools.build:gradle:2.1.0-beta1'
(我今天才更新,之前我在gradle:2.0.0-alpha9)。
现在,当我尝试运行我的应用程序时,我不断收到此消息。

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.
Alternatively, you can ignore this exception and read other information from the model.

升级前一切正常(包括 Instant Run)。
请帮忙。

最佳答案

我将此作为答案发布,因为这为我解决了问题。
我将 build.gradle 中的类路径更改为

classpath 'com.android.tools.build:gradle:2.1.0-alpha3

我根本没有更改任何其他内容/任何设置,也没有更新我的 Android Studio。

Link to the page where I found it.
不得不搜索很多。 :)

编辑:
或者正如其他人所指出的,
1. 您可以尝试将您的 Android Studio 升级到 2.1.0(或)
2. 你可以试试把build.gradle中的classpath改成

classpath 'com.android.tools.build:gradle:2.1.0

关于android - 不支持的方法 : InstantRun. getRestartDexFile() - Android Studio,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/36662251/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com