• 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
Feb 2, 2016
26
3
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)
 
Upvote 0
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.
 
Upvote 0

BEST TECH IN 2023

We've been tracking upcoming products and ranking the best tech since 2007. Thanks for trusting our opinion: we get rewarded through affiliate links that earn us a commission and we invite you to learn more about us.

Smartphones