Search code examples
javaandroidr.java-file

"Cannot resolve symbol 'R'" after changing Min Sdk Version?


I recently changed the Min Sdk Version from kitkat to lollipop via the project structure settings, now with every reference to an XML resource within a java file, I get the error "Cannot resolve symbol 'R'".

I'm not sure what other relevant info I can give as that literally the only change I've made.

The error I get in the gradle build is:

Error:Execution failed for task ':app:processDebugResources'. com.android.ide.common.process.ProcessException: org.gradle.process.internal.ExecException: Process 'command 'F:\Android\sdk\build-tools\24.0.1\aapt.exe'' finished with non-zero exit value 1

Clean/Rebuild is not solving the issue.

Any help would be greatly appreciated!


Solution

  • A solution for these problem is to :

    Click on Build -> Rebuild Project and then click Tools -> Android -> Sync Project with Gradle Files.