2015-06-24 5 views
0

У меня возникла следующая проблема.Невозможно запустить приложение Hello World в Android

[2015-06-24 20:00:57 - MyProject] No activity specified! Getting the launcher activity. 
[2015-06-24 20:00:57 - MyProject] No Launcher activity found! 
[2015-06-24 20:00:57 - MyProject] The launch will only sync the application package on the device! 

Мой Manifest код:

<manifest xmlns:android="http://schemas.android.com/apk/res/android" 
package="com.hello" 
android:versionCode="1" 
android:versionName="1.0" > 

<uses-sdk 
    android:minSdkVersion="14" 
    android:targetSdkVersion="19" /> 

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

Пожалуйста, помогите, как я застрял на это, так как последние 4 дня! Благодаря

ответ

1

Вместо

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

Использование

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

<action> теги самозакрывающиеся теги и должны быть закрыты, как этот <action [...] />.

+0

Спасибо Neto Lima, вы сделали мой день, я не могу вас поблагодарить, и я дам ваш ответ +1 с моей стороны! – Siddharth

Смежные вопросы