Reputation: 4446
After updating Android Studio all lines that get resources like String, Drawbles,... show this error:
Internal Error occurred while analyzing this expression
What is wrong?
Upvotes: 8
Views: 2232
Reputation: 1709
Solution 1:
You can try File -> Invalidate Caches.
Solution 2:
If this happened after update to Dolphin 2021.3.1
than better to upgrade Android Gradle Plugin. It can be done by click on Upgrade in message Project update recommended. Android Gradle Plugin can be upgraded. which can appear in right bottom corner after project opening. In Upgrade assistant window check the variant Upgrade and click Run selected steps. Also you can open assistant manually: Tools -> AGP Upgrade Assistant.
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
.
The version of com.android.tools.build:gradle
can be updated to 7.3.0
.
dependencies {
classpath 'com.android.tools.build:gradle:7.3.0'
}
Gradle wrapper can be updated to version 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.
coreLibraryDesugaring 'com.android.tools:desugar_jdk_libs:1.1.5'
Upvotes: 3
Reputation: 21
Update your android gradle plugin to version 7.3.0. It helped in my case, I had the same issue on 7.0.3 version
Upvotes: 2