2014-09-18 1 views
-1

enter image description here 나는 안드로이드 개발에 초보자이며 일식 경험이 거의 없습니다. 내 안드로이드 에뮬레이터가 제대로 작동하지만 응용 프로그램이 실행되는 것을 볼 수 없습니다.Android 에뮬레이터가 제대로 실행되고 있지만 응용 프로그램을 볼 수 없습니다.

모든 포인터가 좋을 것입니다. 미리 감사드립니다.

MainACtivity.java

package com.example.helloworld; 

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.act`enter code here`ion_settings) { 
      return true; 
     } 
     return super.onOptionsItemSelected(item); 
    } 
} 

의 AndroidManifest.xml

<?xml version="1.0" encoding="utf-8"?> 
<manifest xmlns:android="http://schemas.android.com/apk/res/android" 
    package="com.example.helloworld" 
    android:versionCode="1" 
    android:versionName="1.0" > 

    <uses-sdk 
     android:minSdkVersion="8" 
     android:targetSdkVersion="20" /> 

    <application 
     android:allowBackup="true" 
     android:icon="@drawable/ic_launcher" 
     android:label="@string/app_name" 
     android:theme="@style/AppTheme" > 
     <activity 
      android:name=".MainActivity" 
      android:label="@string/app_name" > 
      <intent-filter> 
       <action android:name="android.intent.action.MAIN" /> 

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

</manifest> 
+3

이클립스를 사용하는 경우 실행 버튼을 클릭하십시오 –

+2

어떻게 보이는지 몇 가지 UI를 표시 할 수 있습니까? – SilentKiller

+1

한번 adb 연결 확인 – Dondaldo

답변

1

AndroidManifest.xml 파일을 사용하여, 당신은 실제로 심지어 응용 프로그램 매니페스트에 지정된 하나 개 이상의 실행 활동을 할 수 있습니다 . 당신의 <activity> 내부 매니페스트

<intent-filter> 
     <action android:name="android.intent.action.MAIN" /> 
     <category android:name="android.intent.category.LAUNCHER" /> 
</intent-filter> 

설정이 당신의 활동에 이러한 속성을 추가 런처에서 본 활동을합니다. 잘하면 지금 작동해야합니다. :)

+0

내 AndroidManifest.xml에는 이미 이러한 enteries가 있습니다 –

+0

@ShrutiJakhete이므로 애플리케이션을 코딩했습니다. 네가 그것을 실행할 때. 응용 프로그램을 시작하지 않습니다. 그거야?!? 또는 실행중인 응용 프로그램을 에뮬레이터에서 종료하면 응용 프로그램을 다시 볼 수 없습니까? 어떤 시나리오에 문제가 있습니까? –

+0

간단한 "hello world"응용 프로그램을 코딩했습니다. 실행하면 응용 프로그램이 시작되지 않습니다. 위의 이미지를 참조하십시오.이 화면 만 보여줍니다. –

관련 문제