不支持的方法:AndroidProject.getPluginGeneration()

时间:2017-01-23 02:17:11

标签: android

我尝试使用1.0.2 ide,因为我接管了应用程序的旧程序,并且我更新到2.3.3,导致错误,我不想使用1.0.2 IDE。

android {
    compileSdkVersion 20
    buildToolsVersion '20.0.0'
    defaultConfig {
        applicationId 'xxxxx'
        minSdkVersion 10
        targetSdkVersion 20
        versionCode 8
        versionName '1.7'
    }

我尝试将buildToolsVersion更改为21.0.0,问题解决了! 最后,你应该检查你的buildtool版本downdoad到21.0.0,你必须检查gradle app buildtoolsversion!

我延迟问题因为我曾经使用过eclispe并且罐子不同,所以也许仔细检查你的complesdkversion并构建toolversion,你必须仔细检查。

  

不支持的方法:AndroidProject.getPluginGeneration()。版本   您连接的Gradle不支持该方法。解决了   您可以更改/升级Gradle的目标版本的问题   连接至。或者,您可以忽略此异常并阅读   来自模型的其他信息。   org.gradle.tooling.model.UnsupportedMethodException:不支持   方法:AndroidProject.getPluginGeneration()。 Gradle的版本   你连接到不支持该方法。解决问题   您可以更改/升级您连接的Gradle的目标版本。   或者,您可以忽略此异常并阅读其他异常   来自模型的信息。在   org.gradle.tooling.model.internal.Exceptions.unsupportedMethod(Exceptions.java:34)     在   org.gradle.tooling.internal.adapter.ProtocolToModelAdapter $ InvocationHandlerImpl.invoke(ProtocolToModelAdapter.java:342)     在com.sun.proxy。$ Proxy145.getPluginGeneration(未知来源)at   com.android.tools.idea.fd.gradle.InstantRunGradleUtils.getIrSupportStatus(InstantRunGradleUtils.java:49)     在   com.android.tools.idea.run.AndroidRunConfigurationBase.canInstantRun(AndroidRunConfigurationBase.java:686)     在   com.android.tools.idea.run.AndroidRunConfigurationBase.getState(AndroidRunConfigurationBase.java:420)     在   com.intellij.execution.runners.ExecutionEnvironment.getState(ExecutionEnvironment.java:158)     在   com.intellij.execution.runners.BaseProgramRunner.execute(BaseProgramRunner.java:55)     在   com.intellij.execution.runners.GenericProgramRunner.execute(GenericProgramRunner.java:31)     在   com.intellij.execution.runners.BaseProgramRunner.execute(BaseProgramRunner.java:50)     在   com.intellij.execution.runners.GenericProgramRunner.execute(GenericProgramRunner.java:31)     在   com.intellij.execution.ProgramRunnerUtil.executeConfiguration(ProgramRunnerUtil.java:121)     在   com.intellij.execution.impl.ExecutionManagerImpl.start(ExecutionManagerImpl.java:116)     在   com.intellij.execution.impl.ExecutionManagerImpl.access $ 400(ExecutionManagerImpl.java:67)     在   com.intellij.execution.impl.ExecutionManagerImpl $ 7.run(ExecutionManagerImpl.java:516)     在   com.intellij.util.concurrency.QueueProcessor.runSafely(QueueProcessor.java:238)     在com.intellij.util.Alarm $ Request $ 1.run(Alarm.java:378)at   com.intellij.util.Alarm $ Request.run(Alarm.java:398)at   java.util.concurrent.Executors $ RunnableAdapter.call(Executors.java:511)     在java.util.concurrent.FutureTask.run(FutureTask.java:266)at   com.intellij.util.concurrency.SchedulingWrapper $ MyScheduledFutureTask.run(SchedulingWrapper.java:227)     at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:311)     在java.awt.EventQueue.dispatchEventImpl(EventQueue.java:756)at   java.awt.EventQueue.access $ 500(EventQueue.java:97)at   java.awt.EventQueue $ 3.run(EventQueue.java:709)at   java.awt.EventQueue $ 3.run(EventQueue.java:703)at   java.security.AccessController.doPrivileged(Native Method)at   java.security.ProtectionDomain $ JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:80)     在java.awt.EventQueue.dispatchEvent(EventQueue.java:726)at   com.intellij.ide.IdeEventQueue.defaultDispatchEvent(IdeEventQueue.java:857)     在   com.intellij.ide.IdeEventQueue._dispatchEvent(IdeEventQueue.java:658)     在   com.intellij.ide.IdeEventQueue.dispatchEvent(IdeEventQueue.java:386)     在   java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:201)     在   java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:116)     在   java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:105)     在   java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)     在   java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:93)     在java.awt.EventDispatchThread.run(EventDispatchThread.java:82)

1 个答案:

答案 0 :(得分:-1)

可能会发生这种情况,因为AS正在检查“即时运行”功能的可用性。修复是禁用即时运行:

Windows& Linux操作系统:

档案 - >设置 - >构建,执行,部署 - >即时运行。 MAC:

Android Studio - >偏好 - >构建,执行,部署 - >即时跑步。