我在eclipse中编译maven项目,我在org.androidannotations.annotations错误时遇到错误。
以下是错误日志
[ERROR] /activities/MainActivity.java:[75,1] error: @org.androidannotations.annotations.sharedpreferences.Pref can only be used in a class annotated with @org.androidannotations.annotations.EApplication, @org.androidannotations.annotations.EActivity, @org.androidannotations.annotations.EViewGroup, @org.androidannotations.annotations.EView, @org.androidannotations.annotations.EBean, @org.androidannotations.annotations.EService, @org.androidannotations.annotations.EIntentService, @org.androidannotations.annotations.EReceiver, @org.androidannotations.annotations.EProvider, @org.androidannotations.annotations.EFragment.
[ERROR] /activities/MainActivity.java:[77,1] error: @org.androidannotations.annotations.sharedpreferences.Pref can only be used in a class annotated with @org.androidannotations.annotations.EApplication, @org.androidannotations.annotations.EActivity, @org.androidannotations.annotations.EViewGroup, @org.androidannotations.annotations.EView, @org.androidannotations.annotations.EBean, @org.androidannotations.annotations.EService, @org.androidannotations.annotations.EIntentService, @org.androidannotations.annotations.EReceiver, @org.androidannotations.annotations.EProvider, @org.androidannotations.annotations.EFragment.
[ERROR] /api/BwfApiV3Service.java:[50,1] error: @org.androidannotations.annotations.sharedpreferences.Pref can only be used on an element that extends org.androidannotations.api.sharedpreferences.SharedPreferencesHelper
[ERROR] /activities/PrivacyActivity.java:[20,1] error: @org.androidannotations.annotations.ViewById can only be used in a class annotated with @org.androidannotations.annotations.EActivity, @org.androidannotations.annotations.EViewGroup, @org.androidannotations.annotations.EView, @org.androidannotations.annotations.EBean, @org.androidannotations.annotations.EFragment.
[ERROR] /activities/MainActivity.java:[84,1] error: @org.androidannotations.annotations.ViewById can only be used in a class annotated with @org.androidannotations.annotations.EActivity, @org.androidannotations.annotations.EViewGroup, @org.androidannotations.annotations.EView, @org.androidannotations.annotations.EBean, @org.androidannotations.annotations.EFragment.
[ERROR] /activities/MainActivity.java:[86,1] error: @org.androidannotations.annotations.ViewById can only be used in a class annotated with @org.androidannotations.annotations.EActivity, @org.androidannotations.annotations.EViewGroup, @org.androidannotations.annotations.EView, @org.androidannotations.annotations.EBean, @org.androidannotations.annotations.EFragment.
[ERROR] /activities/MainActivity.java:[89,1] error: @org.androidannotations.annotations.ViewById can only be used in a class annotated with @org.androidannotations.annotations.EActivity, @org.androidannotations.annotations.EViewGroup, @org.androidannotations.annotations.EView, @org.androidannotations.annotations.EBean, @org.androidannotations.annotations.EFragment.
这是java文件
import org.androidannotations.annotations.*;
import org.androidannotations.annotations.sharedpreferences.Pref;
import retrofit.RetrofitError;
import timber.log.Timber;
import java.util.ArrayList;
import java.util.List;
@EActivity(R.layout.act_main)
public class MainActivity extends ActionBarActivity
{
private static final Timber LOG = TimberProvider.getInstance();
private static final String TOP_LEVEL_FRAGMENT = "TOP_LEVEL_FRAGMENT";
private static final String NON_TOP_LEVEL_FRAGMENT = "NON_TOP_LEVEL_FRAGMENT";
@App
BwfApp mApp;
@Bean
BwfApiV3Service mApi;
@Pref
AppData_ mAppData;
@Pref
UserPrefs_ mUserPrefs;
@SystemService
InputMethodManager mInputMethodManager;
@SystemService
LocationManager mLocationManager;
@ViewById(R.id.drawer_layout)
DrawerLayout mDrawer;
@ViewById(R.id.cnt_fragment)
FrameLayout mFragmentContainer;
@ViewById(R.id.error_popup_view)
ErrorPopupView mErrorPopupView;
我不确定是什么问题。有人可以帮我解决这个问题吗?
非常感谢。