おはよう、Eclipse - Android - java.lang.Stringのレイアウトが無効
EclipseとプラグインをAndroid ADTにインストールしました。 私はクラシカルで新しいAndroidプロジェクトを作成しました:
package com.example.test_android_2;
import android.support.v7.app.ActionBarActivity;
import android.os.Bundle;
import android.view.Menu;
import android.view.MenuItem;
public class MainActivity extends ActionBarActivity {
@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;
}
@Override
public boolean onOptionsItemSelected(MenuItem item) {
// Handle action bar item clicks here. The action bar will
// automatically handle clicks on the Home/Up button, so long
// as you specify a parent activity in AndroidManifest.xml.
int id = item.getItemId();
if (id == R.id.action_settings) {
return true;
}
return super.onOptionsItemSelected(item);
}
}
をしかし、私はこのコードを実行すると、以下のものがコンソールウィンドウにあります。
ありInvalid layout of java.lang.String at value
Error occurred during initialization of VM
Invalid layout of preloaded class: use -XX:+TraceClassLoading to see the origin of the problem class
エラーウィンドウにエラーはなく、何も起こっていません。接続されたデバイスは検出されません。私は「として実行」をクリックすると
は、
EclipseやADTのAndroidのインストールの問題があります何のアイテム(のみ「該当なし」)が存在しませんか?
お願いします。
おかげ
ご迷惑をおかけして申し訳ありません。 – Krukiou
遅れて申し訳ありません。最後にAndroid Studioを使用してプログラムを作成しましたが、それ以上のエラーはありません。助けてくれてありがとう。よろしく。 – Krukiou