2014-06-27 49 views
0

我正在浏览developer.android.com上的教程,我已经到了希望我运行程序的地步。我右键单击项目浏览器中的项目,然后运行并单击android应用程序。控制台显示以下运行第一个android应用程序的问题

[2014-06-27 15:15:23 - myFirstApp] Android Launch! 
[2014-06-27 15:15:23 - myFirstApp] adb is running normally. 
[2014-06-27 15:15:23 - myFirstApp] No Launcher activity found! 
[2014-06-27 15:15:23 - myFirstApp] The launch will only sync the application package on the device! 
[2014-06-27 15:15:23 - myFirstApp] Performing sync 
[2014-06-27 15:15:23 - myFirstApp] Automatic Target Mode: Unable to detect device compatibility. Please select a target device. 

如果您需要看到AndroidManifest.xml文件,这里是

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

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

    <application 
     android:allowBackup="true" 
     android:icon="@drawable/ic_launcher" 
     android:label="@string/app_name" 
     android:theme="@style/AppTheme" > 
    </application> 

</manifest> 
+0

我有我的关系5以PTP模式连接。 – DudeGuy676

回答

1

你缺少活动标签,如:

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

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

    <application 
     android:allowBackup="true" 
     android:icon="@drawable/ic_launcher" 
     android:label="@string/app_name" 
     android:theme="@style/AppTheme" > 

    ***<activity 
     android:name="com.example.myfirstapp.YourActivity" 
     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> 
+0

感谢您的帮助!该应用程序立即崩溃,但至少我知道它会打开。 – DudeGuy676

相关问题