import android packages cannot be resolved

前端 未结 9 1582
时光说笑
时光说笑 2020-12-14 15:12

My android application, built inside Eclipse, suddenly fails to build with dozens of errors. The most obvious are errors indicating that all the android imports cannot be r

相关标签:
9条回答
  • 2020-12-14 15:52
    RightClick on the Project > Properties > Android > Fix project properties
    

    This solved it for me. easy.

    0 讨论(0)
  • 2020-12-14 15:56

    This import android packages cannot be resolved is also occurs when your using some library and that library is not in the same path where your application is there, or if you are importing the library and not coping library to the workspace

    0 讨论(0)
  • 2020-12-14 16:02

    It seems that your eclipse-workspace (or at least your Project) is broken somehow.

    Have you moved your android-sdk/Project recently? If it's not an Android Project anymore, try to look at Preferences->Android for a valid android sdk-location.

    If this is correct, try to open a complete new Workspace, and import your sources with File->import->Android Project from existing Source.

    If this still doesn't help, make a new android Project and copy the sources manually inside your Project from outside Eclipse. Re-open Eclipse after that, and make a Project->clean

    0 讨论(0)
  • 2020-12-14 16:02

    try this in eclipse: Window - Preferences - Android - SDK Location and setup SDK path

    0 讨论(0)
  • 2020-12-14 16:03

    I just had the same problem after accepting a Java update--scores of build errors and android import not recognized. On checking the build path in Project=>Properties, I found that the check box for Android 4.3 had somehow gotten cleared. Checking it resolved all the import errors without my even having to restart the IDE or run a project clean.

    0 讨论(0)
  • 2020-12-14 16:04

    To import android packages, ADT plugin of eclipse is required, only after this you can add it in the java build path.

    Go to your eclipse market and download the Android AD extension.

    0 讨论(0)
提交回复
热议问题