This repository was archived by the owner on Feb 26, 2023. It is now read-only.

Description
I use Android Studio and Gradle to build my project, version of annotations - 3.0-SNAPSHOT. When I try to call method getDeclaredMethods() for my activity's class then it throw NoSuchMethod exception on devices(and emulators) with Android 2.3.x. On devices with 4.0 and later all work good.
Code sample:
@EActivity(R.layout.activity_test)
public class CompanyActivity extends NavigationActivity{
...
@AfterViews
void init(){
Method[] ms = this.getClass().getDeclaredMethods();
...
}
}
Error stack trace:
Caused by: java.lang.NoSuchMethodException
at java.lang.Class.getDeclaredMethods(Native Method)
at java.lang.ClassCache.getDeclaredMethods(ClassCache.java:140)
at java.lang.Class.getDeclaredMethods(Class.java:757)
at my.app.test.activity.TestActivity.init(TestActivity.java:25)
at my.app.test.activity.TestActivity_.onViewChanged(TestActivity_.java:43)
When I call this method for another generated classes - for example, generated with @efragment or with @eviewgroup - app doesn't crash.