0

I'm using Intellij IDEA 13.1 on Windows. And one day I found my code in errors. Something like this:

enter image description here

It says "Cannot resolve symbol"

My Project Structure:

enter image description here

enter image description here

Can someone help me?

Duncan Jones
  • 67,400
  • 29
  • 193
  • 254
Sergius
  • 521
  • 8
  • 21

1 Answers1

3

It looks like you need to add:

import android.os.Bundle;

Your IDE ought to be doing this for you. I've not used IntelliJ for a while, but I suspect you need to press Ctrl+Alt+O to fix the issue (source).

Duncan Jones
  • 67,400
  • 29
  • 193
  • 254
  • Bundle is red and it sais "Cannot reslove symbol Bundle" – Sergius Jun 17 '14 at 11:14
  • @SergaRUS Much as I appreciate you repeating your question, did you try what I just said in my answer? – Duncan Jones Jun 17 '14 at 11:15
  • @SergaRUS Try rebuilding the project: http://www.jetbrains.com/idea/webhelp/rebuilding-project.html – Duncan Jones Jun 17 '14 at 11:16
  • Now it sais Error:Android Source Generator: [MyApp] Android SDK is not specified – Sergius Jun 17 '14 at 11:19
  • @SergaRUS Sounds like you have a lot of configuration issues, not something I can sensibly help your with through a comment discussion. I suggest finding an Android+IntelliJ tutorial and following it. – Duncan Jones Jun 17 '14 at 11:20
  • @DuncanJones I'm facing exactly the same issue as OP but when I build the project then it builds successfully and I'm even able to launch the app in emulator. How come it is possible that the IDE shows methods and classes in red but then builds successfully? Am I missing something? – RBT Aug 03 '18 at 00:21