• After 15+ years, we've made a big change: Android Forums is now Early Bird Club. Learn more here.

Apps Cant not resolve symbol AppCompatActivity

robothito

Newbie
Hello

I have tried to create an Empty Activity and I got the following error on my windows machine

"Cant not resolve symbol AppCompatActivity"

On my Mac, this seems not to happen. But on both I also got

Cant not resolve symbol 'R'

How can you solve something like this and why does it happen?

(I searched the net and there are some resources -actually only one repeated everywhere- for this problem but

1) They dont work

2) They are cryptic -like "run gradle" -yeah but how do you "run gradle"?

I am already months learning -theoretically- about android but can not run a error free "hello world" app (on my Mac I could do some but on the windows machine, impossible)

Please help
 
Thanks for the answer
The Android Support Repository was already installed. Right now I am updating it

(Notice that all these problems started when I used "Empty Activity" to create projects.
With "Blank Activity" (which uses other base class I think) this does not happen as far as I remember)
 
You have to add the support library to your project's build dependencies. Read the page link.
 
Update: I updated :
Android SDK Build Tools 23.0.3
Android Support Repository 30.0.0
Google Repository 25
Android SDK Tools 25.1.3

And now it works (on my mac)
The only thing is that now rendering problems appear -no effect on results though)
android.support.v7.app.WindowDecorActionBar could not be instantiated

I ll read what you told me.
EDIT. I verified.
In my build.gradle I got

Code:
dependencies {
    compile fileTree(dir: 'libs', include: ['*.jar'])
    testCompile 'junit:junit:4.12'
    compile 'com.android.support:appcompat-v7:23.3.0'
}

I dont think I can afford to spend more time working on the window machine- which is the one that fails worst- but well at least I got something in the mac.
 
Back
Top Bottom