2016-03-12 22 views
0

我已經安裝了Eclipse,JDK8,Android SDK和libGDX。當我從gdx_setup.jar生成項目時,我得到了我的桌面和Android項目,當我試圖啓動AndroidLauncher時,我崩潰了。無法解析Lcom/game/test/AndroidLauncher的超類; (3)


這裏是AndroidLauncher的代碼:

package com.game.test; 
import android.os.Bundle; 

import com.badlogic.gdx.backends.android.AndroidApplication; 
import com.badlogic.gdx.backends.android.AndroidApplicationConfiguration; 
import com.game.test.MainClassOfTestGame; 

public class AndroidLauncher extends AndroidApplication { 
    @Override 
    protected void onCreate (Bundle savedInstanceState) { 
     super.onCreate(savedInstanceState); 
     AndroidApplicationConfiguration config = new AndroidApplicationConfiguration(); 
     initialize(new MainClassOfTestGame(), config); 
    } 
} 

這裏是logcat的:

03-12 05:08:46.056: W/dalvikvm(2413): Unable to resolve superclass of Lcom/game/test/AndroidLauncher; (3) 
03-12 05:08:46.056: W/dalvikvm(2413): Link of class 'Lcom/game/test/AndroidLauncher;' failed 
03-12 05:08:46.056: D/AndroidRuntime(2413): Shutting down VM 
03-12 05:08:46.056: W/dalvikvm(2413): threadid=1: thread exiting with uncaught exception (group=0xa4d7cb20) 
03-12 05:08:46.064: E/AndroidRuntime(2413): FATAL EXCEPTION: main 

Android Private Libraries added to the build path. it didn't solve my problem


如果你知道我的問題,請幫助我。

P.S.對不起我的英語不好。

回答

0

OMG。有必要在項目和外部依賴項上添加一個複選標記。儘管我之前完成了它,但直到現在它還沒有奏效。

+0

好吧! –

0

試試這個 - >右鍵點擊您的項目,然後

轉到構建路徑 - >配置構建路徑 - >在線訂單和出口

當你在那裏,你應該檢查一下Android的私家藏書再單擊確定。

如果你仍然有這個問題,刪除你的bin文件夾內的所有文件,並重建你的項目。

希望這能幫助你!

+0

它沒有解決我的問題。我在很多論壇上讀過它,並在提出問題之前嘗試過。在我的問題中看截圖。 –

+0

此外,Android私人圖書館已被選中,之前我檢查它 –