Tim
Tim

Reputation: 588

Question on "Cannot resolve symbol" when trying to import files from Android 19 API

I am using Android Studio and getting the error, "cannot resolve symbol" when trying to import the following libraries:

import android.os.ServiceManager;
import android.os.storage.IMountService;
import android.os.storage.StorageEventListener;

Why do I get these errors? I can view the files ServieManager.java, IMountService.java, and StorageEventListener.java in Android Studio (Press Shift twice, and type in the file name - ServiceManager.java for example - and verify the file shows up. My IDE recognizes the file is there).

Looking at the attached picture below, it seems ServiceManager.java is part of the android 19 API: enter image description here

Upvotes: 1

Views: 159

Answers (1)

CommonsWare
CommonsWare

Reputation: 1006614

None of those classes are part of the Android SDK. For example, you will not find them in the published documentation. They are part of the implementation of Android, but they are not part of the public API of Android.

As a result, Android SDK projects cannot reference them.

Upvotes: 3

Related Questions