Android Gradle– 断言错误

Android Gradle– 断言错误,第1张

概述当我尝试执行GradleSync时,出现以下错误:21:24:11AssertionError:com.android.tools.idea.gradle.project.AndroidGradleProjectComponent@8e8dc0522:13:53AssertionError:null当我详细查看错误时,我得到了这个堆栈跟踪:nulljava.lang.AssertionErroratc

当我尝试执行Gradle Sync时,出现以下错误:

21:24:11 AssertionError:
com.android.tools.IDea.gradle.project.AndroidGradleProjectComponent@8e8dc05
22:13:53 AssertionError: null

当我详细查看错误时,我得到了这个堆栈跟踪:

null java.lang.AssertionError at
com.androID.tools.IDea.gradle.project.PreSyncChecks.attemptToUpdateGradLeversionInWrapper(PreSyncChecks.java:174)
at
com.androID.tools.IDea.gradle.project.PreSyncChecks.ensureCorrectGradleSettings(PreSyncChecks.java:72)
at
com.androID.tools.IDea.gradle.project.PreSyncChecks.canSync(PreSyncChecks.java:53)
at
com.androID.tools.IDea.gradle.project.GradleProjectimporter.doimport(GradleProjectimporter.java:430)
at
com.androID.tools.IDea.gradle.project.GradleProjectimporter.doRequestSync(GradleProjectimporter.java:219)
at
com.androID.tools.IDea.gradle.project.GradleProjectimporter.access$000(GradleProjectimporter.java:77)
at
com.androID.tools.IDea.gradle.project.GradleProjectimporter$2.run(GradleProjectimporter.java:184)
at
com.intellij.ui.AppUIUtil.invokelaterIfProjectAlive(AppUIUtil.java:77)
at
com.androID.tools.IDea.gradle.project.GradleProjectimporter.requestProjectSync(GradleProjectimporter.java:191)
at
com.androID.tools.IDea.gradle.project.GradleProjectimporter.requestProjectSync(GradleProjectimporter.java:166)
at
com.androID.tools.IDea.gradle.actions.SyncProjectAction.actionPerformed(SyncProjectAction.java:43)
at
com.intellij.openAPI.actionSystem.ex.ActionUtil.performActionDumbAware(ActionUtil.java:164)
at
com.intellij.openAPI.actionSystem.impl.Actionbutton.actionPerformed(Actionbutton.java:170)
at
com.intellij.openAPI.actionSystem.impl.Actionbutton.performAction(Actionbutton.java:133)
at
com.intellij.openAPI.actionSystem.impl.Actionbutton.processMouseEvent(Actionbutton.java:313)
at java.awt.Component.processEvent(Component.java:6179) at
java.awt.Container.processEvent(Container.java:2084) at
java.awt.Component.dispatchEventImpl(Component.java:4776) at
java.awt.Container.dispatchEventImpl(Container.java:2142) at
java.awt.Component.dispatchEvent(Component.java:4604) at
java.awt.lightweightdispatcher.retargetMouseEvent(Container.java:4618)
at
java.awt.lightweightdispatcher.processMouseEvent(Container.java:4279)
at java.awt.lightweightdispatcher.dispatchEvent(Container.java:4209)
at java.awt.Container.dispatchEventImpl(Container.java:2128) at
java.awt.Window.dispatchEventImpl(Window.java:2492) at
java.awt.Component.dispatchEvent(Component.java:4604) at
java.awt.EventQueue.dispatchEventImpl(EventQueue.java:717) at
java.awt.EventQueue.access$400(EventQueue.java:82) at
java.awt.EventQueue$2.run(EventQueue.java:676) at
java.awt.EventQueue$2.run(EventQueue.java:674) at
java.security.AccessController.doPrivileged(Native Method) at
java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:86)
at
java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:97)
at java.awt.EventQueue$3.run(EventQueue.java:690) at
java.awt.EventQueue$3.run(EventQueue.java:688) at
java.security.AccessController.doPrivileged(Native Method) at
java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:86)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:687) at
com.intellij.IDe.IDeEventQueue.defaultdispatchEvent(IDeEventQueue.java:697)
at
com.intellij.IDe.IDeEventQueue._dispatchEvent(IDeEventQueue.java:520)
at
com.intellij.IDe.IDeEventQueue.dispatchEvent(IDeEventQueue.java:335)
at
java.awt.EventdispatchThread.pumpOneEventForFilters(EventdispatchThread.java:296)
at
java.awt.EventdispatchThread.pumpEventsForFilter(EventdispatchThread.java:211)
at
java.awt.EventdispatchThread.pumpEventsForHIErarchy(EventdispatchThread.java:201)
at
java.awt.EventdispatchThread.pumpEvents(EventdispatchThread.java:196)
at
java.awt.EventdispatchThread.pumpEvents(EventdispatchThread.java:188)
at java.awt.EventdispatchThread.run(EventdispatchThread.java:122)

知道如何解决这个问题吗?

解决方法:

更改

classpath 'com.androID.tools.build:gradle:1.0.0'

classpath 'com.androID.tools.build:gradle:0.14.4'

在build.gradle文件中

总结

以上是内存溢出为你收集整理的Android Gradle – 断言错误全部内容,希望文章能够帮你解决Android Gradle – 断言错误所遇到的程序开发问题。

如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。

欢迎分享,转载请注明来源:内存溢出

原文地址: http://outofmemory.cn/web/1107652.html

(0)
打赏 微信扫一扫 微信扫一扫 支付宝扫一扫 支付宝扫一扫
上一篇 2022-05-28
下一篇 2022-05-28

发表评论

登录后才能评论

评论列表(0条)

保存