rriggs
rriggs

Reputation: 31

Android Studio Setup Issues

I am trying to get started with Android Studio I have installed it on several PCs and have used fresh downloads and I keep getting the same issues: - Cannot resolve symbol 'fun' or Cannot resolve symbol 'view'. I guess this may be all symbols but these at the only ones I am trying to use now - Objects do not show up on screen when I am trying to design apps As I said, I have done this on several PCs now and have tried many steps suggested on SO and other forums (such as Cleanup, Invalidate Cache, adding SDKs, etc) and still get the same results. Each time these have been clean installs with default settings so I think I must be missing a step or something. Any advice? Ta

Upvotes: 3

Views: 1035

Answers (2)

Sarah
Sarah

Reputation: 11

If you are getting "Cannot resolve symbol 'fun'", you might be trying to use Kotlin code in an Android Studio setup expecting Java. You could either change your setup to accept Kotlin or switch to using Java in your project.

The other unresolved symbol "view" probably just needs to be added as an import, you can do this by hovering over it and pressing Alt+Enter to automatically add the class to your imports.

Upvotes: 1

Anbarasu Chinna
Anbarasu Chinna

Reputation: 1005

Make sure your project level build.gradle contain the gradle version same as android studio version

buildscript {
    repositories {
        jcenter()
        google()
    }
    dependencies {
        classpath 'com.android.tools.build:gradle:3.1.3' //3.1.3 is the android studio version
    }
}

Upvotes: 2

Related Questions