-
Notifications
You must be signed in to change notification settings - Fork 0
Cannot resolve symbol or Cannot resolve method
Snoy-Kuo edited this page Mar 17, 2022
·
2 revisions
Cannot resolve symbol 'somePackage'
Cannot resolve method 'getResources' in 'SomeActivity'
The Android Studio project can build and run, but got error of that symbol or method.
- macOS 11.6 (Big Sur) x64
- Android Studio Bumblebee Patch 1
- Android SDK version 27
- buildTool: 28.0.3
- Android Gradle Plugin: 3.2.1
- Gradle: 4.10.1
- Gradle JDK: corretto-1.8
- Kotlin: 1.3.72
-
Java project with Gradle in IntelliJ IDEA: cannot resolve symbol 'google' but project compiles
- sync proj with gradle files.
=> not work for me.
- sync proj with gradle files.
-
Android Studio 出现“Cannot resolve symbol” 解决办法
- Invalidate caches / restart
- sync proj with gradle files.
- comment out dependencies libs -> sync -> uncomment -> sync
- modify dependencies libs version -> sync
- delete /username/.gradle folder
=> none of the above approaches works for me.
-
Cannot resolve symbol 'File' in settings.gradle
- modify jdk version
=> not work for me.
- modify jdk version
- Update Gradle version
- update from 4.10.1 to 4.10.3
=> not work for me.
- update from 4.10.1 to 4.10.3
- Update Android Gradle Plugin version
- update from 3.2.1 to 3.3.3
=> It works!
- update from 3.2.1 to 3.3.3
- Update Android Gradle Plugin version
- update from 3.2.1 to 3.3.3
=> It works!
- update from 3.2.1 to 3.3.3