带有Android注释的类未找到异常
作者:互联网
我有这个代码
@EActivity(R.layout.activity_app_list)
public class MainListView extends SherlockFragmentActivity
{
}
这是例外
android.content.ActivityNotFoundException: Unable to find explicit activity class {com.imona.android/com.imona.android.MainListView}; have you declared this activity in your AndroidManifest.xml?
表现
<activity
android:name="com.imona.android.MainListView_"
android:label="@string/list_navigation"
android:theme="@style/Theme.VPI" >
<intent-filter>
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
将Android批注与SherlockFragmentActivity一起使用可以吗?
解决方法:
使用AndroidAnnotation,您必须在AndroidManifest文件中声明生成的类(即,带有_后缀).
在这里,似乎您正在尝试启动原始类,而不是生成的类.您应该使用构建器来开始您的活动.有关更多信息,请查看the wiki.
标签:actionbarsherlock,android-annotations,android 来源: https://codeday.me/bug/20191029/1963783.html