Cannot resolve symbol 'Theme' in styles.xml (Android Studio)

cannot resolve symbol c#
cannot resolve symbol r intellij
intellij cannot resolve symbol annotation
intellij cannot resolve symbol gradle
cannot resolve symbol scala
cannot resolve symbol view
cannot resolve symbol
cannot resolve symbol hudson

Since today, Android Studio can't find the AppCompat themes in styles.xml, but for example AppCompatActivity in code does get recognized. My Android Studio version is 2.2.2, Build #AI-145.3360264

I already tried upgrading to the latest build tools, compile sdk (25) version etc. but it didn't fix the problem.

At the moment I have installed the following (from sdk manager):

  • android api: 19 and 23
  • sdk platform tools: 25.0.1
  • sdk tools: 25.2.3
  • build-tools: 23.0.2 and 25.0.1
  • support repository: 40
  • google repository: 39

and a few others, that shouldn't be necessary to list here.

build.gradle of app:

apply plugin: 'com.android.application'

android {
    compileSdkVersion 23
    buildToolsVersion '25.0.1'
    defaultConfig {
        applicationId "xxx.xxxxxxxx.xxxxxxxxx" //not the real applicationId
        minSdkVersion 14
        targetSdkVersion 19
        versionCode 1
        versionName "1.0"
        testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
    }
    buildTypes {
        release {
            minifyEnabled true
            shrinkResources true
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
        debug {

        }
    }
}

dependencies {
    compile fileTree(include: ['*.jar'], dir: 'libs')
    compile files('libs/RootTools.jar')
    compile 'com.android.support:support-v4:23.+'
    compile 'com.android.support:support-v13:23.+'
    compile 'com.android.support:appcompat-v7:23.+'
    compile 'com.android.support:design:23.+'
    compile 'com.android.support:cardview-v7:23.+'
    compile 'com.android.support.constraint:constraint-layout:1.0.0-beta4'
    compile 'de.hdodenhof:circleimageview:2.1.0'
}

Another solution that worked for me with Android Studio 3.1.2:

delete these from build.gradle if you have them:

'com.android.support:appcompat-v7:27.1.1' 'com.android.support:design:27.1.1'

then sync, then undo delete, then sync again.

how to overcome Android Studio cannot resolve symbol for android , In the menu bar. Select tools>-android>-SDK manager. and download the SDK build tools, SDK platform and Google API's( the Google API  Cannot resolve symbol 'java'. And all the java packages aren't recognized ('java' is shown in red for import java.util). I have jdk 1.4.2, 1.5 and 1.6 installed, each one set up in intellij, and I get the same problem when I choose them for the project.

I encountered this after updating to Android Studio 3.1.

None of the other answers listed here worked for me, however when I switched my appcompat support lib version to the latest 28.0.0-alpha1 then back to 27.1.0 that it was on before, it worked.

Seems the new version of Android Studio lost connection to where the library was synced to and just needed to have it reset.

Cannot resolve symbol – IDEs Support (IntelliJ Platform), I've run into a bizarre problem where IDEA tells me that it cannot resolve symbol for classes within the same package as the class open It can be a problem of “cannot resolve symbol r android studio“, let try this also. File -> Invalidate caches and restart.

No need to change anything.

Just press small button on top "Sync Project with Gradle Files"

How to solve the error 'Cannot Resolve Symbol' in Android Studio , How do I solve the error "Cannot Resolve Symbol" in Android Studio? Ad by DuckDuckGo. Android Studio: Cannot resolve symbol 'raw'. I've a resource directory called "raw" in the "res" folder, but still can't access it through my code. The problem occurs when trying to declare the MediaPlayer variable.

How to Fix: cannot resolve symbol error in Android Studio, Ever since copying a Gradle project from one computer to another I have been getting 'cannot resolve symbol String' and similar messages in  When imported Android Studio gave me warnings and suggested to update the sdk version, so I followed the advice. After that something was not compatible anymore, so Android Studio suggested to change another version of something else. After following all these advices I had the same "cannot find symbol" issues.

That's because of feature called "build cache" that is enabled by default in build Android Plugin since 2.3.0. It creates files in build cache outside of project folder (in my case -- in \Users\%username%\.android\build-cache) Theese files are intended to be common between your projects.

And then Android Studio is unable to navigate in theese files. That's all.

If you want to disable Build Cache, add android.enableBuildCache=false to gradle.properties file. Then restart Android Studio.

more info here: https://developer.android.com/studio/build/build-cache.html#disable_build_cache

How to fix IntelliJ cannot resolve symbol, In the manifest (AndroidManifest.xml) file, if you hover over the application activities for Mobile Quality Assurance, the Cannot resolve symbol  When I tried to use new .NET Inspection feature (7.0 EAP build 20334) I got a lot of strange errors, like this, but my project works well.Why? CSharpErrors FileName.cs(5) 01: Cannot resolve symbol 'Linq'

"Cannot resolve symbol" errors occur when you include the Mobile , In Java, if you receive ”cannot resolve symbol” error, it simply mean that you have used a name that the compiler was not able to recognize. However most of the Features I want to use are working but I got confused after seeing lots of "Cannot resolve symbol" Messages after running "Find Code Issues". The code is working fine an most of the errors looks like ReSharper Bugs or I do not understand what ReSharper wants from me.

Solved, If your code uses this class, the exception on the IDE "Cannot resolve symbol '​Activity Manager'" will appear due to the absence of importing  IntelliJ 2020.1 "Cannot resolve symbol 'record'" I just updated IntelliJ Ultimate to 2020.1 which purports to support Java 14. I setup a new Java project with language level 14 set in both the project language settings and the pom.xml file but when I try to create a record the status bar says "Cannot resolve symbol 'record'".

How to resolve Android Studio Error: Cannot resolve symbol 'Activity , Since a few days ago, our projects that use ExoPlayer 2.6.1 no longer compile. Android Studio now gives a cannot resolve symbol: util error  In this video you'll learn how to fix "cannot resolve symbol" error in Android Studio. The process is very simple, but takes a long time. Liked content of th

Comments
  • Does the project compile or is only the IDE complaining? Invalidate caches/restart.
  • Invalidate caches/restart didn't change anything, only the IDE is complaining about it and compiling works fine. Sorry for possibly wasting your time with this, I was only concerned to make the error go away and didn't think that compiling still works normally ^^
  • Im having the same error, but compiles ok
  • stackoverflow.com/a/48734990/8311441 When Every other solution failed This helped me
  • Just came across this issue (in Android studio 3.1.3). The remove appcompat-v7 and sync before adding it again helped. Let's all upvote and hope for updates here issuetracker.google.com/issues/67790757
  • Worked, very strange :D
  • brilliant. i tried 5 or 6 other answers, but this is what finally worked. thanks!
  • If this was your solution like it was mine you can just clean and rebuild after doing this once and it will fix it again.
  • Well that was silly to have to do haha, but it worked. Gotta love buggy AS. Thanks for the tip.
  • It works, just comment and undo comment on gradle dependencies{
  • Thanks for this. Like you, none of the other answers worked for me after upgrading to AS 3.1, but this did the trick. You just have to be sure to sync after each change.
  • I was on 26.0.1 and updating to 27.1.1 (and compile version to from 26 to 27) made all the errors go away (literally nothing else would)
  • Going back to 26.0.1 and then to 27.1.1 works as well
  • It is not a good thing that this is the solution that works most reliably in my experience. AS shouldn't require these kinds of hacky solutions.