Cannot resolve symbol ‘Theme’ in styles.xml (Android Studio)
Failed to load AppCompat ActionBar with unknown error.
Cannot resolve symbol ‘OkhttpUtils’
Sometimes the code will report Cannot resolve symbol 'xxx' for no reason, but the actual compilation will not report an error and it can run.
Solution:
1. Comment out the configuration of which Jar package has problems, such as the following:
dependencies {
// implementation 'pub.devrel:easypermissions:2.0.1'
// implementation 'com.sensorsdata.analytics.android:SensorsAnalyticsSDK:6.2.1'
}
2. Click Sync Now
3. Then unpack the annotation
dependencies {
implementation 'pub.devrel:easypermissions:2.0.1'
implementation 'com.sensorsdata.analytics.android:SensorsAnalyticsSDK:6.2.1'
}
4. Click Sync Now again