NoClassDefFounderror Android

时间:2015-01-01 08:01:47

标签: java android eclipse

我试图运行我的Android项目,但是我收到以下错误: -

01-01 13:28:06.775: E/AndroidRuntime(1812): java.lang.NoClassDefFoundError: com.mapps.dailystatusupdater.StatusUpdater
01-01 13:28:06.775: E/AndroidRuntime(1812):     at com.mapps.dailystatusupdater.SplashScreen$RefreshTokenTask.onPostExecute(SplashScreen.java:253)
01-01 13:28:06.775: E/AndroidRuntime(1812):     at com.mapps.dailystatusupdater.SplashScreen$RefreshTokenTask.onPostExecute(SplashScreen.java:1)

SpashScreen.java

private class RefreshTokenTask extends AsyncTask<Void, Void, Void>
    {

        @Override
        protected Void doInBackground(Void... params) 
        {
            // TODO Auto-generated method stub
            //some code
        }

        @Override
        protected void onPostExecute(Void result) 
        {
            // TODO Auto-generated method stub
            super.onPostExecute(result);
            Intent i = new Intent(SplashScreen.this, StatusUpdater.class);
            startActivity(i);
            finish();

        }

        @Override
        protected void onPreExecute() {
            // TODO Auto-generated method stub
            super.onPreExecute();
        }


    }

AndroidManifest.java

<activity
            android:name="com.mapps.dailystatusupdater.StatusUpdater"
            android:label="@string/app_name" >
            <intent-filter>
                <action android:name="android.intent.action.MAIN" />

                <category android:name="android.intent.category.DEFAULT" />
            </intent-filter>
        </activity>

我将ADT从22.X更新到23.0。我尝试过清理项目,重新启动eclipse,导出我的Android私有库,没有任何效果。

enter image description here

enter image description here

如何解决此问题?

2 个答案:

答案 0 :(得分:1)

转到android sdk manager确保你安装了android构建工具。

答案 1 :(得分:0)

您还需要在Android SDK管理器中安装Android SDK Build-tools。