简体   繁体   English

Internal Error occurred while analysing this expression error in Android 海豚工作室 2021.3.1

[英]Internal Error occurred while analyzing this expression error in Android Studio Dolphin 2021.3.1

After updating Android Studio all lines that get resources like String, Drawbles,... show this error:更新 Android Studio 后,所有获取 String、Drawbles 等资源的行都显示此错误:

Internal Error occurred while analyzing this expression分析此表达式时发生内部错误

What is wrong?怎么了?

Solution 1:解决方案 1:

You can try File -> Invalidate Caches .您可以尝试File -> Invalidate Caches

Solution 2:解决方案 2:

If this happened after update to Dolphin 2021.3.1 than better to upgrade Android Gradle Plugin .如果这发生在更新到Dolphin 2021.3.1之后,最好升级Android Gradle 插件 It can be done by click on Upgrade in message Project update recommended.可以通过在消息项目更新建议中单击升级来完成。 Android Gradle Plugin can be upgraded. Android Gradle 插件可以升级。 which can appear in right bottom corner after project opening.项目打开后会出现在右下角。 In Upgrade assistant window check the variant Upgrade and click Run selected steps .Upgrade assistant window 中选中变体Upgrade并单击Run selected steps Also you can open assistant manually: Tools -> AGP Upgrade Assistant .您也可以手动打开助手:工具-> AGP 升级助手

After migration finished also some of your libraries versions will be updated.迁移完成后,您的一些库版本也会更新。 For me the version of androidx.navigation:navigation-fragment-ktx changed to 2.4.1 .对我来说, androidx.navigation:navigation-fragment-ktx的版本更改为2.4.1

The version of com.android.tools.build.gradle can be updated to 7.3.0 . com.android.tools.build.gradle版本可以更新到7.3.0

   dependencies {
      classpath 'com.android.tools.build:gradle:7.3.0'
   }

Gradle wrapper can be updated to version 7.4 . Gradle wrapper 可以更新到7.4版。

distributionBase=GRADLE_USER_HOME
distributionUrl=https\://services.gradle.org/distributions/gradle-7.4-bin.zip
distributionPath=wrapper/dists
zipStorePath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME

I also manually updated the version of com.android.tools:desugar_jdk_libs to 1.1.5 because I was facing error Didn't find class "java.lang.Math8" on path: DexPathList while launching my apps.我还手动将com.android.tools:desugar_jdk_libs的版本更新为1.1.5 ,因为我在启动应用程序时遇到错误Didn't find class "java.lang.Math8" on path: DexPathList

coreLibraryDesugaring 'com.android.tools:desugar_jdk_libs:1.1.5'

Update your android gradle plugin to version 7.3.0.将您的 android gradle 插件更新到版本 7.3.0。 It helped in my case, I had the same issue on 7.0.3 version它对我有帮助,我在 7.0.3 版本上遇到了同样的问题

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 Android Studio Dolphin 2021.3.1:构建项目时出错 - Android Studio Dolphin 2021.3.1: Error while building project Android XML 布局预览在 Android Studio Dolphin 2021.3.1 补丁 1 中不起作用 - Android XML layout preview not working in Android Studio Dolphin 2021.3.1 Patch 1 Android Studio (海豚 | 2021.3.1) & (电鳗 | 2022.1.1) 不显示布局预览 - Android Studio (Dolphin | 2021.3.1) & (Electric Eel | 2022.1.1) does not show layout preview Android Studio 海豚 | 2021.3.1 补丁 1 设备管理器模拟器损坏和失真 - Android Studio Dolphin | 2021.3.1 Patch 1 device manager emulator is broken and distorted 如何在 Dolphin 中启用 android studio new logcat | 2021.3.1 金丝雀 6? - How to enable android studio new logcat in Dolphin | 2021.3.1 Canary 6? 使用外部系统时出现异常:Android Studio Dolphin 中的 java.lang.AssertionError | 2021.3.1 - Exception during working with external system: java.lang.AssertionError in Android Studio Dolphin | 2021.3.1 在编辑配置中找不到调试器选项卡(Android Studio Dolphin | 2021.3.1 补丁 1) - cannot find Debugger tab in Edit Configurations (Android Studio Dolphin | 2021.3.1 Patch 1) 启动android studio时出现内部错误 - internal error while starting android studio Dolphin Android Studio created problem on importing Project in Kotlin 异常错误 - Dolphin Android Studio created problem on importing Project in Kotlin with an exception Error Android Studio 错误:尝试计算所需的包时发生错误 - Android studio error: An error occurred while trying to compute required packages
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM