2014-04-04 36 views
0

我在eclipse中有一個項目用於某些android應用程序。默認情況下它是沒有菜單創建的,現在BU我試着補充一些...無法編譯android項目 - 菜單問題

我不能編譯一個項目 - 獲得這個消息

[2014-04-04 08:10:27 - Dex Loader] Unable to execute dex: java.nio.BufferOverflowException. Check the Eclipse log for stack trace. 
[2014-04-04 08:10:27 - mksSQL] Conversion to Dalvik format failed: Unable to execute dex: java.nio.BufferOverflowException. Check the Eclipse log for stack trace. 

我已經添加了以下菜單:

@Override 
public boolean onCreateOptionsMenu(Menu menu) { 
    // Inflate the menu; this adds items to the action bar if it is present. 
    getMenuInflater().inflate(R.menu.main, menu); 
    return true; 
} 
+1

有些時候,它是你的api版本的問題,清理項目,並嘗試 – Sree

+0

看到[這個](http://stackoverflow.com/questions/19727915/android-dex-gives-a-bufferoverflowexception-when-building/19803777#19803777) – user3355820

+0

檢查[This](http://stackoverflow.com/questions/20778767/unable-to-execute-dex-java-nio-bufferoverflowexception-check-the-eclipse-log-f) – anuruddhika

回答

0

它發生在日食。

請嘗試以下方法

#1再試一次cleaning項目和build。 或

#2右鍵單擊您的Project→去Android tools→然後單擊android support library.然後清理並生成項目。

HIH。

+0

同樣的事情...嘗試了兩種... – IgorKushnir

+0

你使用任何jar文件你的libs文件夾和Java構建路徑? –