我有这个代码
@EActivity(R.layout.activity_app_list)
public class MainListView extends SherlockFragmentActivity
{
}
这是异常(exception)
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?
list
<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>
可以在 SherlockFragmentActivity 中使用 Android 注释吗?
最佳答案
使用 AndroidAnnotation,您必须在 AndroidManifest
文件中声明生成的类(即:带有 _
后缀)。
在这里,您似乎正在尝试启动原始类而不是生成的类。您应该使用构建器来开始您的 Activity 。请查看the wiki了解更多相关信息。
关于android - Android 注释未找到类异常,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/21504773/