After setting up Android Studio, I tried to find out how few of the methods work but I can see that Activity class have got a lot of errors.
For example:
// Gives: cannot resolve symbol 'CallSuper'
android.annotation.CallSuper();
// Gives: cannot resolve method 'trackActivity(android.app.Activity)'
private final Object mInstanceTracker = StrictMode.trackActivity(this);
// Gives: cannot resolve symbol 'MainThread'
@MainThread
// **312 errors in android.app.Activity, 579 in android.view.View**
My application works fine though. How can i make those errors disappear and be able to see documentation of structures that cannot be resolved now?
Details on my Android Studio 2.1.3 configuration
Installed in Standalone SDK Manager:
Being precise, those aren't errors in the source code for Activity/View
it's just that :
android.annotation.CallSuper
in it's classpath.trackActivity
in class android.app.Activity
. This is because the SDK is subset of the actual Android platform. The SDK shipped to the developers a.k.a Public API utilizes a lot of platform features a.k.a. Internal APIs, hence you can't find them in your SDK 24 classpath.
So why are all these portions hidden from developers?
It's kept hidden from developers because most of its implementation varies from device to device, plus they wouldn't be required in 99.99% cases (metaphorical figure not actual stats). You might want to have a look here.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With