cannot resolve android symbol - android app - intelliJ

后端 未结 3 1965
故里飘歌
故里飘歌 2021-01-18 02:46

I am using intellij-idea to develop android app. I created a project with an android module, but none of these :

import android.app.Activity;
import android         


        
相关标签:
3条回答
  • 2021-01-18 03:26

    i have the answer guys
    1- press ctrl+alt+shift+s
    2-in the Modules bar click on your project name
    3-change the compile sdk version to the newest one
    4-click apply and ok then sync your project
    5-done , i hope the best for you

    0 讨论(0)
  • 2021-01-18 03:28

    What you should do is,

    1.  Select your android project
    2.  press ctrl +alt + shift + S
    3.  Select SDK from the project settings
    4.  Check the files under the class path tab
    5.  There must be android.jar ,res ,annotations.jar
    Probably there should be missed one or several files in step 5.
    Then,
    6.  Go to Android SDK home path field and add your SDK folder again
    files  even though  you have all the jars and still  you are getting the error ,then remove all the jars from the class path and add them again ( like in step 6).
    7.  Build menu -Rebuild  your  project.
    

    Now your errors should disappear.

    0 讨论(0)
  • 2021-01-18 03:31

    Basically, this is because you didn't add Android SDK. So you need to add android SDK.

    • go to Files and select project structure.
    • go to project and select the project SDK
    • click New and select Android SDK version
    0 讨论(0)
提交回复
热议问题