I haven't built an app in android using this library before android.annotation.SystemApi
, but my project now requires it.
Is there something wrong in my import statement that prevents me from using SystemApi? There are a few other annotation libraries that I need to use and they all throw the following error:
error: cannot find symbol
import android.annotation.SystemApi;
^
symbol: class SystemApi
location: package android.annotation
I appreciate any help I can get!
There is no SystemApi
annotation in the Android SDK. It is part of the framework, and it is marked as @hide
, meaning it is stripped from the Android SDK.
but my project now requires it
If you are creating an Android app, you should not need @SystemApi
, and you cannot use it. It is for creating extensions to the Android framework, if you are building your own custom edition of Android using the AOSP.