Android Studio 3.1.1. New module -> Import gradle project, after I select project to import and confirm, IDE crashes with exception:
Element: class org.jetbrains.plugins.groovy.lang.psi.impl.GroovyFileImpl because: different providers: SingleRootFileViewProvider{myVirtualFile=file:///home/michal/AndroidStudioProjects/FirebaseJobTest/settings.gradle, content=VirtualFileContent{size=26}}(1416c50); SingleRootFileViewProvider{myVirtualFile=file:///home/michal/AndroidStudioProjects/FirebaseJobTest/settings.gradle, content=VirtualFileContent{size=26}}(665cfacf) invalidated at: see attachment com.intellij.psi.PsiInvalidElementAccessException: Element: class org.jetbrains.plugins.groovy.lang.psi.impl.GroovyFileImpl because: different providers: SingleRootFileViewProvider{myVirtualFile=file:///home/michal/AndroidStudioProjects/FirebaseJobTest/settings.gradle, content=VirtualFileContent{size=26}}(1416c50); SingleRootFileViewProvider{myVirtualFile=file:///home/michal/AndroidStudioProjects/FirebaseJobTest/settings.gradle, content=VirtualFileContent{size=26}}(665cfacf) invalidated at: see attachment at com.intellij.psi.util.PsiUtilCore.ensureValid(PsiUtilCore.java:502)
Do you know any workaround?
Project structure -> Modules -> "+" -> Import module. Save this answer.
Go to buildscript > repositories and configure the Maven repository address for the HMS Core SDK. If the agconnect-services. json file has been added to the app, go to buildscript > dependencies and add the AppGallery Connect plugin configuration and Android Gradle plugin configuration.
I was facing the same issue, seems like IDE issue, try manually adding
include ':app', ':your_module_name'
in settings.gradle and sync gradle, hope it helps.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With