I have a public abstract class and I\'m trying to use the getClass()
method, as I will need info from the class extending my abstract class. An example is this:
I noticed that it depends on the Android version you are referencing whether the error occurs or not. I used to define a dependency for Android 4.1.1.4 in the pom.xml
linking to Maven Central.
com.google.android
android
4.1.1.4
provided
Meanwhile, I provide the needed dependencies using maven-android-sdk-deployer.
android
android
4.3_r1
provided
Then getClass()
produces the error.