webdevqa.jp.net

Android新しいアクティビティの作成時にStudioの「IDEエラーが発生しました」

(下部の更新を参照)

Android Studioがv3.0に更新されたため、新しいアクティビティを作成できません。このエラーレポートダイアログに2つのエラーが表示されます。別のプロジェクトで試しましたが、プロジェクトのクリーンアップを試みました、gradleの再同期、コンピューターの再起動、アンインストール/再インストールAndroid Studio、Googleの project Gradle移行ビデオ を試してみたが、何も変更されず、もう動作しない...何か案は?

私は「プラグインを無効にする」をクリックせずAndroidサポート知らないものを壊したくありません。

最初のエラーメッセージの詳細:

null
Java.lang.NullPointerException
    at com.Android.tools.idea.templates.TemplateManager$2.actionPerformed(TemplateManager.Java:481)
    at com.intellij.openapi.actionSystem.ex.ActionUtil$1.run(ActionUtil.Java:215)
    at com.intellij.openapi.actionSystem.ex.ActionUtil.performActionDumbAware(ActionUtil.Java:232)
    at com.intellij.openapi.actionSystem.impl.ActionMenuItem$ActionTransmitter.lambda$actionPerformed$0(ActionMenuItem.Java:309)
    at com.intellij.openapi.wm.impl.FocusManagerImpl.runOnOwnContext(FocusManagerImpl.Java:929)
    at com.intellij.openapi.wm.impl.IdeFocusManagerImpl.runOnOwnContext(IdeFocusManagerImpl.Java:136)
    at com.intellij.openapi.actionSystem.impl.ActionMenuItem$ActionTransmitter.actionPerformed(ActionMenuItem.Java:299)
    at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.Java:2022)
    at com.intellij.openapi.actionSystem.impl.ActionMenuItem.lambda$fireActionPerformed$0(ActionMenuItem.Java:116)
    at com.intellij.openapi.application.TransactionGuardImpl.runSyncTransaction(TransactionGuardImpl.Java:86)
    at com.intellij.openapi.application.TransactionGuardImpl.lambda$submitTransaction$1(TransactionGuardImpl.Java:109)
    at com.intellij.openapi.application.TransactionGuardImpl.submitTransaction(TransactionGuardImpl.Java:118)
    at com.intellij.openapi.application.TransactionGuard.submitTransaction(TransactionGuard.Java:122)
    at com.intellij.openapi.actionSystem.impl.ActionMenuItem.fireActionPerformed(ActionMenuItem.Java:116)
    at com.intellij.ui.plaf.beg.BegMenuItemUI.doClick(BegMenuItemUI.Java:513)
    at com.intellij.ui.plaf.beg.BegMenuItemUI.access$300(BegMenuItemUI.Java:45)
    at com.intellij.ui.plaf.beg.BegMenuItemUI$MyMouseInputHandler.mouseReleased(BegMenuItemUI.Java:533)
    at Java.awt.Component.processMouseEvent(Component.Java:6541)
    at javax.swing.JComponent.processMouseEvent(JComponent.Java:3324)
    at Java.awt.Component.processEvent(Component.Java:6306)
    at Java.awt.Container.processEvent(Container.Java:2237)
    at Java.awt.Component.dispatchEventImpl(Component.Java:4897)
    at Java.awt.Container.dispatchEventImpl(Container.Java:2295)
    at Java.awt.Component.dispatchEvent(Component.Java:4719)
    at Java.awt.LightweightDispatcher.retargetMouseEvent(Container.Java:4889)
    at Java.awt.LightweightDispatcher.processMouseEvent(Container.Java:4526)
    at Java.awt.LightweightDispatcher.dispatchEvent(Container.Java:4467)
    at Java.awt.Container.dispatchEventImpl(Container.Java:2281)
    at Java.awt.Window.dispatchEventImpl(Window.Java:2746)
    at Java.awt.Component.dispatchEvent(Component.Java:4719)
    at Java.awt.EventQueue.dispatchEventImpl(EventQueue.Java:764)
    at Java.awt.EventQueue.access$500(EventQueue.Java:98)
    at Java.awt.EventQueue$3.run(EventQueue.Java:715)
    at Java.awt.EventQueue$3.run(EventQueue.Java:709)
    at Java.security.AccessController.doPrivileged(Native Method)
    at Java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.Java:80)
    at Java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.Java:90)
    at Java.awt.EventQueue$4.run(EventQueue.Java:737)
    at Java.awt.EventQueue$4.run(EventQueue.Java:735)
    at Java.security.AccessController.doPrivileged(Native Method)
    at Java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.Java:80)
    at Java.awt.EventQueue.dispatchEvent(EventQueue.Java:734)
    at com.intellij.ide.IdeEventQueue.defaultDispatchEvent(IdeEventQueue.Java:827)
    at com.intellij.ide.IdeEventQueue._dispatchEvent(IdeEventQueue.Java:651)
    at com.intellij.ide.IdeEventQueue.dispatchEvent(IdeEventQueue.Java:365)
    at Java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.Java:201)
    at Java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.Java:116)
    at Java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.Java:105)
    at Java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.Java:101)
    at Java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.Java:93)
    at Java.awt.EventDispatchThread.run(EventDispatchThread.Java:82)

2番目のエラーメッセージの詳細:

Error executing FreeMarker template: The following has evaluated to null or missing:
==> manifestDir  [in template "root://activities/common/common_globals.xml.ftl" at line 36, column 39]

Tip: If the failing expression is known to be legally null/missing, either specify a default value with myOptionalVar!myDefault, or use <#if myOptionalVar??>when-present<#else>when-missing</#if>. (These only cover the last step of the expression; to cover the whole expression, use parenthessis: (myOptionVar.foo)!myDefault, (myOptionVar.foo)??

The failing instruction (print stack trace for 1 more):
==> ${manifestDir}  [in template "root://activities/common/common_globals.xml.ftl" at line 36, column 37]
FreeMarker template error:
The following has evaluated to null or missing:
==> manifestDir  [in template "root://activities/common/common_globals.xml.ftl" at line 36, column 39]

Tip: If the failing expression is known to be legally null/missing, either specify a default value with myOptionalVar!myDefault, or use <#if myOptionalVar??>when-present<#else>when-missing</#if>. (These only cover the last step of the expression; to cover the whole expression, use parenthessis: (myOptionVar.foo)!myDefault, (myOptionVar.foo)??

The failing instruction (FTL stack trace):
----------
==> ${manifestDir}  [in template "root://activities/common/common_globals.xml.ftl" at line 36, column 37]
    #include "../common/common_globals.xm...  [in template "root://activities/EmptyActivity/globals.xml.ftl" at line 8, column 5]
----------

Java stack trace (for programmers):
----------
freemarker.core.InvalidReferenceException: [... Exception message was already printed; see it above ...]
    at freemarker.core.InvalidReferenceException.getInstance(InvalidReferenceException.Java:98)
    at freemarker.core.EvalUtil.coerceModelToString(EvalUtil.Java:382)
    at freemarker.core.Expression.evalAndCoerceToString(Expression.Java:115)
    at freemarker.core.DollarVariable.accept(DollarVariable.Java:76)
    at freemarker.core.Environment.visit(Environment.Java:265)
    at freemarker.core.MixedContent.accept(MixedContent.Java:93)
    at freemarker.core.Environment.visit(Environment.Java:265)
    at freemarker.core.Environment.include(Environment.Java:1712)
    at freemarker.core.Include.accept(Include.Java:172)
    at freemarker.core.Environment.visit(Environment.Java:265)
    at freemarker.core.MixedContent.accept(MixedContent.Java:93)
    at freemarker.core.Environment.visit(Environment.Java:265)
    at freemarker.core.Environment.process(Environment.Java:243)
    at freemarker.template.Template.process(Template.Java:277)
    at com.Android.tools.idea.templates.FreemarkerUtils.processFreemarkerTemplate(FreemarkerUtils.Java:96)
    at com.Android.tools.idea.templates.Template.processFile(Template.Java:471)
    at com.Android.tools.idea.templates.Template.access$100(Template.Java:73)
    at com.Android.tools.idea.templates.Template$3.startElement(Template.Java:513)
    at org.Apache.xerces.parsers.AbstractSAXParser.startElement(Unknown Source)
    at org.Apache.xerces.parsers.AbstractXMLDocumentParser.emptyElement(Unknown Source)
    at org.Apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanStartElement(Unknown Source)
    at org.Apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown Source)
    at org.Apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)
    at org.Apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
    at org.Apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
    at org.Apache.xerces.parsers.XMLParser.parse(Unknown Source)
    at org.Apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
    at org.Apache.xerces.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown Source)
    at org.Apache.xerces.jaxp.SAXParserImpl.parse(Unknown Source)
    at com.Android.tools.idea.templates.Template.processXml(Template.Java:484)
    at com.Android.tools.idea.templates.Template.processFile(Template.Java:468)
    at com.Android.tools.idea.templates.Template.lambda$doRender$2(Template.Java:368)
    at com.Android.tools.idea.templates.Template$1.run(Template.Java:347)
    at com.intellij.openapi.application.RunResult.run(RunResult.Java:35)
    at com.intellij.openapi.command.WriteCommandAction.lambda$null$1(WriteCommandAction.Java:171)
    at com.intellij.openapi.application.impl.ApplicationImpl.runWriteAction(ApplicationImpl.Java:1023)
    at com.intellij.openapi.command.WriteCommandAction.lambda$performWriteCommandAction$2(WriteCommandAction.Java:170)
    at com.intellij.openapi.command.WriteCommandAction.lambda$doExecuteCommand$4(WriteCommandAction.Java:210)
    at com.intellij.openapi.command.impl.CoreCommandProcessor.executeCommand(CoreCommandProcessor.Java:149)
    at com.intellij.openapi.command.impl.CoreCommandProcessor.executeCommand(CoreCommandProcessor.Java:119)
    at com.intellij.openapi.command.WriteCommandAction.doExecuteCommand(WriteCommandAction.Java:212)
    at com.intellij.openapi.command.WriteCommandAction.performWriteCommandAction(WriteCommandAction.Java:168)
    at com.intellij.openapi.command.WriteCommandAction.execute(WriteCommandAction.Java:151)
    at com.Android.tools.idea.templates.Template.runWriteCommandAction(Template.Java:349)
    at com.Android.tools.idea.templates.Template.doRender(Template.Java:367)
    at com.Android.tools.idea.templates.Template.render(Template.Java:232)
    at com.Android.tools.idea.npw.template.RenderTemplateModel$FreeMarkerTemplateRenderer.renderTemplate(RenderTemplateModel.Java:267)
    at com.Android.tools.idea.npw.template.RenderTemplateModel$FreeMarkerTemplateRenderer.doDryRun(RenderTemplateModel.Java:196)
    at com.Android.tools.idea.npw.template.MultiTemplateRenderer.countDown(MultiTemplateRenderer.Java:58)
    at com.Android.tools.idea.npw.template.MultiTemplateRenderer.requestRender(MultiTemplateRenderer.Java:77)
    at com.Android.tools.idea.npw.template.RenderTemplateModel.handleFinished(RenderTemplateModel.Java:176)
    at com.Android.tools.idea.wizard.model.ModelWizard.handleFinished(ModelWizard.Java:393)
    at com.Android.tools.idea.wizard.model.ModelWizard.goForward(ModelWizard.Java:324)
    at com.Android.tools.idea.wizard.model.ModelWizardDialog$FinishAction.doAction(ModelWizardDialog.Java:307)
    at com.intellij.openapi.ui.DialogWrapper$DialogWrapperAction.actionPerformed(DialogWrapper.Java:1838)
    at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.Java:2022)
    at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.Java:2348)
    at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.Java:402)
    at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.Java:259)
    at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.Java:252)
    at Java.awt.Component.processMouseEvent(Component.Java:6541)
    at javax.swing.JComponent.processMouseEvent(JComponent.Java:3324)
    at Java.awt.Component.processEvent(Component.Java:6306)
    at Java.awt.Container.processEvent(Container.Java:2237)
    at Java.awt.Component.dispatchEventImpl(Component.Java:4897)
    at Java.awt.Container.dispatchEventImpl(Container.Java:2295)
    at Java.awt.Component.dispatchEvent(Component.Java:4719)
    at Java.awt.LightweightDispatcher.retargetMouseEvent(Container.Java:4889)
    at Java.awt.LightweightDispatcher.processMouseEvent(Container.Java:4526)
    at Java.awt.LightweightDispatcher.dispatchEvent(Container.Java:4467)
    at Java.awt.Container.dispatchEventImpl(Container.Java:2281)
    at Java.awt.Window.dispatchEventImpl(Window.Java:2746)
    at Java.awt.Component.dispatchEvent(Component.Java:4719)
    at Java.awt.EventQueue.dispatchEventImpl(EventQueue.Java:764)
    at Java.awt.EventQueue.access$500(EventQueue.Java:98)
    at Java.awt.EventQueue$3.run(EventQueue.Java:715)
    at Java.awt.EventQueue$3.run(EventQueue.Java:709)
    at Java.security.AccessController.doPrivileged(Native Method)
    at Java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.Java:80)
    at Java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.Java:90)
    at Java.awt.EventQueue$4.run(EventQueue.Java:737)
    at Java.awt.EventQueue$4.run(EventQueue.Java:735)
    at Java.security.AccessController.doPrivileged(Native Method)
    at Java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.Java:80)
    at Java.awt.EventQueue.dispatchEvent(EventQueue.Java:734)
    at com.intellij.ide.IdeEventQueue.defaultDispatchEvent(IdeEventQueue.Java:827)
    at com.intellij.ide.IdeEventQueue._dispatchEvent(IdeEventQueue.Java:651)
    at com.intellij.ide.IdeEventQueue.dispatchEvent(IdeEventQueue.Java:365)
    at Java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.Java:201)
    at Java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.Java:116)
    at Java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.Java:109)
    at Java.awt.WaitDispatchSupport$2.run(WaitDispatchSupport.Java:190)
    at Java.awt.WaitDispatchSupport$4.run(WaitDispatchSupport.Java:235)
    at Java.awt.WaitDispatchSupport$4.run(WaitDispatchSupport.Java:233)
    at Java.security.AccessController.doPrivileged(Native Method)
    at Java.awt.WaitDispatchSupport.enter(WaitDispatchSupport.Java:233)
    at Java.awt.Dialog.show(Dialog.Java:1084)
    at com.intellij.openapi.ui.impl.DialogWrapperPeerImpl$MyDialog.show(DialogWrapperPeerImpl.Java:736)
    at com.intellij.openapi.ui.impl.DialogWrapperPeerImpl.show(DialogWrapperPeerImpl.Java:458)
    at com.intellij.openapi.ui.DialogWrapper.invokeShow(DialogWrapper.Java:1696)
    at com.intellij.openapi.ui.DialogWrapper.show(DialogWrapper.Java:1645)
    at com.Android.tools.idea.actions.NewAndroidComponentAction.actionPerformed(NewAndroidComponentAction.Java:140)
    at com.intellij.openapi.actionSystem.ex.ActionUtil$1.run(ActionUtil.Java:215)
    at com.intellij.openapi.actionSystem.ex.ActionUtil.performActionDumbAware(ActionUtil.Java:232)
    at com.intellij.openapi.actionSystem.impl.ActionMenuItem$ActionTransmitter.lambda$actionPerformed$0(ActionMenuItem.Java:309)
    at com.intellij.openapi.wm.impl.FocusManagerImpl.runOnOwnContext(FocusManagerImpl.Java:929)
    at com.intellij.openapi.wm.impl.IdeFocusManagerImpl.runOnOwnContext(IdeFocusManagerImpl.Java:136)
    at com.intellij.openapi.actionSystem.impl.ActionMenuItem$ActionTransmitter.actionPerformed(ActionMenuItem.Java:299)
    at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.Java:2022)
    at com.intellij.openapi.actionSystem.impl.ActionMenuItem.lambda$fireActionPerformed$0(ActionMenuItem.Java:116)
    at com.intellij.openapi.application.TransactionGuardImpl.runSyncTransaction(TransactionGuardImpl.Java:86)
    at com.intellij.openapi.application.TransactionGuardImpl.lambda$submitTransaction$1(TransactionGuardImpl.Java:109)
    at com.intellij.openapi.application.TransactionGuardImpl.submitTransaction(TransactionGuardImpl.Java:118)
    at com.intellij.openapi.application.TransactionGuard.submitTransaction(TransactionGuard.Java:122)
    at com.intellij.openapi.actionSystem.impl.ActionMenuItem.fireActionPerformed(ActionMenuItem.Java:116)
    at com.intellij.ui.plaf.beg.BegMenuItemUI.doClick(BegMenuItemUI.Java:513)
    at com.intellij.ui.plaf.beg.BegMenuItemUI.access$300(BegMenuItemUI.Java:45)
    at com.intellij.ui.plaf.beg.BegMenuItemUI$MyMouseInputHandler.mouseReleased(BegMenuItemUI.Java:533)
    at Java.awt.Component.processMouseEvent(Component.Java:6541)
    at javax.swing.JComponent.processMouseEvent(JComponent.Java:3324)
    at Java.awt.Component.processEvent(Component.Java:6306)
    at Java.awt.Container.processEvent(Container.Java:2237)
    at Java.awt.Component.dispatchEventImpl(Component.Java:4897)
    at Java.awt.Container.dispatchEventImpl(Container.Java:2295)
    at Java.awt.Component.dispatchEvent(Component.Java:4719)
    at Java.awt.LightweightDispatcher.retargetMouseEvent(Container.Java:4889)
    at Java.awt.LightweightDispatcher.processMouseEvent(Container.Java:4526)
    at Java.awt.LightweightDispatcher.dispatchEvent(Container.Java:4467)
    at Java.awt.Container.dispatchEventImpl(Container.Java:2281)
    at Java.awt.Window.dispatchEventImpl(Window.Java:2746)
    at Java.awt.Component.dispatchEvent(Component.Java:4719)
    at Java.awt.EventQueue.dispatchEventImpl(EventQueue.Java:764)
    at Java.awt.EventQueue.access$500(EventQueue.Java:98)
    at Java.awt.EventQueue$3.run(EventQueue.Java:715)
    at Java.awt.EventQueue$3.run(EventQueue.Java:709)
    at Java.security.AccessController.doPrivileged(Native Method)
    at Java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.Java:80)
    at Java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.Java:90)
    at Java.awt.EventQueue$4.run(EventQueue.Java:737)
    at Java.awt.EventQueue$4.run(EventQueue.Java:735)
    at Java.security.AccessController.doPrivileged(Native Method)
    at Java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.Java:80)
    at Java.awt.EventQueue.dispatchEvent(EventQueue.Java:734)
    at com.intellij.ide.IdeEventQueue.defaultDispatchEvent(IdeEventQueue.Java:827)
    at com.intellij.ide.IdeEventQueue._dispatchEvent(IdeEventQueue.Java:651)
    at com.intellij.ide.IdeEventQueue.dispatchEvent(IdeEventQueue.Java:365)
    at Java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.Java:201)
    at Java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.Java:116)
    at Java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.Java:105)
    at Java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.Java:101)
    at Java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.Java:93)
    at Java.awt.EventDispatchThread.run(EventDispatchThread.Java:82)

First exception

Second exception

[〜#〜] update [〜#〜]:遊んでいるときに、新しいプロジェクトを作成しても問題は発生しないことに気付きました。既存のプロジェクトでのみ発生します。

6

私はそこで古いバージョンを2.3.3にダウングレードしてしまいました: https://developer.Android.com/studio/archive.html

UPDATE:
ここに投稿されたソリューションでテストした後、問題はproject Gradleファイルのその行だけになりました

buildDir = "C:/tmp/${rootProject.name}/${project.name}"

その行を削除すると、すべてが機能します。他のソリューションには追加の変更が含まれていますが、問題を修正するためにそれらは必要ありません。

5

ダウングレードする必要はありません。ちょうどあなたを確認してください:

(a)gradleプラグイン3.0.0を適用し、(b)「google()」へのレポ参照を追加し、(c)プロジェクトのGradleファイルからbuildDirコードを削除します。

allprojects {
    //String osName = System.getProperty("os.name").toLowerCase();
    //if (osName.contains("windows")) {
    //    buildDir = "C:/tmp/${rootProject.name}/${project.name}"
    //}
    repositories {
        google()
        jcenter()
    }
}

これらの手順の後で、既存のプロジェクトに新しいアクティビティを追加できます。

2
CoastalB

私は自分のプロジェクトのJDKを変更して自分の問題を修正しました。

WINDOWS 10:インストール時にAndroid Studio(AS)の場合、デフォルトのJDKは組み込みJDKはASパッケージに付属しています。JDKをシステムにインストールされているものに変更するだけです。

手順:

  1. 「app」フォルダを右クリック
  2. 「モジュール設定を開く」を選択します
  3. 「SDKの場所」
  4. [Use embedded JDK]のチェックを外します
  5. システム内のJDKのインストールフォルダーを選択しますEX:C:\ Program Files\Java\jdk1.8.0_144

組み込みJDK

インストールされているJDK

それが役に立てば幸いです:)

1

「既存のプロジェクトを開く」からではなく、ようこそ画面からクローンプロジェクトを開いたため、同じ問題が発生していました。

したがって、プロジェクトを閉じてメニューから[既存のプロジェクトを開く]を選択し、プロジェクトを開くだけで問題が解決します。

0
ANUJ GUPTA
  1. C:\Users\Fateh Hayat\AppData\Local\Android\SdkからSDKを探す
  2. フォルダplatform-toolsを検索
  3. このフォルダの名前をplatform-tools oldに変更します
  4. ここからファイルをダウンロード
  5. このダウンロードの後、7.16MBを含むWindows用の最初のリンクファイル
  6. このファイルをコピーしてSDKフォルダーに貼り付けた後
  7. 次に、Android Studioに移動し、[ツール]> [sdkマネージャー]> [sdkツール]> [Android sdkプラットフォームツール]を選択します。
  8. Applyをクリックします
  9. 再起動Android Studio ...
0

Kotlinを使用している場合は、build.gradle内のext.kotlin_versionがプラグインのバージョンと一致していることを確認してください。私にとっては、gradle出力でそれらが異なるという警告も出されたので、Iを維持してください!

0
Zonico

私のために行くことによって問題を解決しました: File >> Invalidate Caches/Restart... そして選択 Invalidate and Restart

0
Saeed

このファイル>キャッシュの無効化/再起動>無効化して再起動してみてください。

0
MakeBugsNotWar