我是JavaScript and Developement on Android
的新功能。我安裝了Eclipse
,但我甚至無法運行「Hello World」程序,包括在創建新項目時!以Eclipse開頭的錯誤
請幫助我,我花了兩天的最後的日子安裝此IDE(甚至試圖Android Studio
), 但總是有相同的錯誤:
找不到Chwet.apk!
而且似乎是與 「R」 的錯誤,就像在 的setContentView(R.layout.activity_main)
這裏是我的代碼:
package com.example.chwet;
import android.os.Bundle;
import android.app.Activity;
import android.view.Menu;
public class MainActivity extends Activity {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
}
@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;
}
}
嘗試清理你的項目到eclipse中的Project菜單並清理你的項目並讓我知道錯誤是否消失。 – InnocentKiller
可能的重複[http://stackoverflow.com/questions/885009/r-cannot-be-resolved-android-error] –
您的意思是「我是Java和Eclipse的新手」嗎?你可以從eclipse中啓動簡單的Java應用程序(非Android)嗎?您是否安裝了JDK或只安裝了JRE? Eclipse錯誤日誌說什麼? – Axel