【问题标题】:What does it mean "No Launcher activity found! and The launch will only sync the application package on the device!"什么意思“没有找到启动器活动!并且启动只会同步设备上的应用程序包!”
【发布时间】:2014-06-28 23:49:33
【问题描述】:

在模拟器上运行我的应用程序时,我从控制台收到此警告 未找到启动器活动! 启动只会同步设备上的应用包!

事实上,我已经在 AndroidManifest.xml 文件中将两个活动声明为 GMapsActivity 和 MainActivity 启动器

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

    <uses-sdk
        android:minSdkVersion="7"
        android:targetSdkVersion="16" />
      <uses-permission android:name="android.permission.INTERNET"/>
    <application
        android:allowBackup="true"
        android:icon="@drawable/ic_launcher"
        android:label="@string/app_name"
        android:theme="@style/AppTheme" >


        <activity

            android:name="com.emsgpstracking.fh.GMapsActivity"
            android:label="@string/app_name" >
            <intent-filter>
                <action android:name="android.intent.action.main" />

            <category android:name="android.intent.category.LAUNCHER" />
            </intent-filter>
        </activity>
        <activity
             android:exported="false"
            android:name="com.emsgpstracking.fh.MainActivity"
            android:label="@string/app_name" >
            <intent-filter>
                <action android:name="android.intent.action.main.MAINACTIVITY" />
                <category android:name="android.intent.category.DEFAULT" />
            </intent-filter>
        </activity>
         <uses-library android:name="com.google.android.maps" />


    </application>




</manifest>

这是什么原因?请给我一个解决方案

【问题讨论】:

    标签: java android


    【解决方案1】:

    行:

    <action android:name="android.intent.action.main" />
    

    应该是:

    <action android:name="android.intent.action.MAIN" />
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2017-09-13
      • 1970-01-01
      • 2012-07-10
      相关资源
      最近更新 更多