没有Launcher活动发现无法找到解决方案

时间:2014-04-25 14:54:10

标签: android

当我在手机上运行我的应用程序时,它给了我这个错误没有找到Launcher活动!  启动只会同步设备上的应用程序包!我看了一些类似的问题,但我似乎还无法弄清楚问题是什么

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

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

 <uses-permission android:name="android.permission.RECORD_VIDEO" />
<uses-permission android:name="android.permission.CAMERA" />
<uses-permission android:name="android.permission.RECORD_AUDIO" />
<uses-feature android:name="android.hardware.camera" />
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.CALL_PHONE" />
<uses-permission android:name="android.permission.READ_PHONE_STATE" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.GET_ACCOUNTS" />
<uses-permission android:name="android.permission.WAKE_LOCK" />


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

<activity android:name="com.soloinc.meip.view.VideoRecorder"           
android:screenOrientation="landscape" 
android:configChanges="keyboardHidden|orientation|screenLayout" 
android:windowSoftInputMode="stateAlwaysHidden" />

    <activity 
        android:name="com.soloinc.meip.webpage.Webview" 
        android:screenOrientation="portrait" 
        android:windowSoftInputMode="stateAlwaysHidden" />


    <intent-filter>
        <!--Viewer filter-->
        <action android:name="android.intent.action.VIEW" />
        <category android:name="android.intent.category.DEFAULT" />
        <category android:name="android.intent.category.BROWSABLE" />
    </intent-filter>

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

    <!--custom filter-->
    <intent-filter>

        <category android:name="com.soloinc.meip" />
    </intent-filter>

</application>
</manifest>

1 个答案:

答案 0 :(得分:0)

请针对某些活动编写以下内容

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

例如在您的情况下

<activity android:name="com.soloinc.meip.view.VideoRecorder"           android:screenOrientation="landscape" android:configChanges="keyboardHidden|orientation|screenLayout" android:windowSoftInputMode="stateAlwaysHidden" />

        <!--Viewer filter-->
       <intent-filter>     
            <action android:name="android.intent.action.VIEW" />
            <category android:name="android.intent.category.DEFAULT" />
            <category android:name="android.intent.category.BROWSABLE" />
        </intent-filter>
          <!-- DEFAULT LAUNCHER filter-->
          <intent-filter>
                <action android:name="android.intent.action.MAIN" />
                <category android:name="android.intent.category.LAUNCHER" />
            </intent-filter>
        <!--custom filter-->
        <intent-filter>

            <category android:name="com.soloinc.meip" />
        </intent-filter>
  </activity>