1

I recently created a bug-free, fulling functioning android project. I even tested it on an android device, it worked fine.

I then closed eclipse and installed a few things from the SDK manager intended to speed up my emulator (intel x86 atom system image). After the downloads finished I opened eclipse and had errors on almost every line of my previously fine code.

It didn't recognize any of the android imports (hence the title). I couldn't open the android SDK manager because of:

"Location of the Android SDK Manager has not been set up in the preferences."

Then, after a bit more poking around a window popped up saying:

"Multiple errors have occurred. java.lang.NullPointerException".

The XML doesn't have any error warnings, but the graphical display window is blank and at the bottom it says:

"Eclipse is loading the SDK. new_page.xml will refresh automatically once the process is finished."

(its not loading anything, it has been that way for about an hour). I tried cleaning and rebuilding the project to no avail. I can't post pictures for some reason, my apologies. Some advice would be greatly appreciated! TLDR: I updated with the android SDKmanager and now nothing works!

user3453211
  • 13
  • 1
  • 4

2 Answers2

0

All public classes within the android.os package are marked with the JavaDocs attribute @hide, which, when applied to a package, class, method or field, removes that node and all of its children from the documentation.

Thus the namespace is not available to be imported, as there's nothing in it.

See here, for example, another question about why the android.os.SystemProperties cannot be used in code (without Reflection).

Here's a link to the source indicating the use of the @hide attribute in the SystemProperties class: https://android.googlesource.com/platform/frameworks/base/+/master/core/java/android/os/SystemProperties.java#26

Community
  • 1
  • 1
CJBS
  • 15,147
  • 6
  • 86
  • 135
-1

I encountered the same error the other day, actually same scenario and I just followed this guide and everything works again. http://developer.android.com/sdk/installing/installing-adt.html