尝试安装.apk时出现INSTALL_PARSE_FAILED_MANIFEST_MALFORMED错误。
<intent-filter>
<data scheme="myurlscheme" />
<action name="android.intent.action.VIEW" />
<category name="android.intent.category.DEFAULT" />
<category name="android.intent.category.BROWSABLE" />
</intent-filter>
如果我删除它,一切都很好(除了我不能通过网址打开我的应用程序:) 这是我的活动代码:
<activity android:name="com.prime31.UnityPlayerNativeActivity" android:screenOrientation="sensorLandscape" android:launchMode="singleTask" android:label="@string/app_name" android:configChanges="fontScale|keyboard|keyboardHidden|locale|mnc|mcc|navigation|orientation|screenLayout|screenSize|smallestScreenSize|uiMode|touchscreen">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
<meta-data android:name="unityplayer.ForwardNativeEventsToDalvik" android:value="true" />
<intent-filter>
<data scheme="myurlscheme" />
<action name="android.intent.action.VIEW" />
<category name="android.intent.category.DEFAULT" />
<category name="android.intent.category.BROWSABLE" />
</intent-filter>
</activity>
它有什么问题?它适用于许多具有OS的Android设备&gt; 2.2。除了我正在谈论的只有一个设备
答案 0 :(得分:1)
变化:
<activity android:name="com.prime31.UnityPlayerNativeActivity" android:screenOrientation="sensorLandscape" android:launchMode="singleTask" android:label="@string/app_name" android:configChanges="fontScale|keyboard|keyboardHidden|locale|mnc|mcc|navigation|orientation|screenLayout|screenSize|smallestScreenSize|uiMode|touchscreen">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
<meta-data android:name="unityplayer.ForwardNativeEventsToDalvik" android:value="true" />
<intent-filter>
<data scheme="myurlscheme" />
<action name="android.intent.action.VIEW" />
<category name="android.intent.category.DEFAULT" />
<category name="android.intent.category.BROWSABLE" />
</intent-filter>
</activity>
要
<activity android:name="com.prime31.UnityPlayerNativeActivity" android:screenOrientation="sensorLandscape" android:launchMode="singleTask" android:label="@string/app_name" android:configChanges="fontScale|keyboard|keyboardHidden|locale|mnc|mcc|navigation|orientation|screenLayout|screenSize|smallestScreenSize|uiMode|touchscreen">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
<data scheme="myurlscheme" />
<action name="android.intent.action.VIEW" />
<category name="android.intent.category.DEFAULT" />
<category name="android.intent.category.BROWSABLE" />
</intent-filter>
<meta-data android:name="unityplayer.ForwardNativeEventsToDalvik" android:value="true" />
</activity>
答案 1 :(得分:0)
必须声明正确的包名(应从小写字母开始)请分享整个Android清单以了解
答案 2 :(得分:0)
<activity
android:name="packagename.Activity"
android:exported="true"
>
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
<intent-filter>
<data android:scheme="abc" />
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.BROWSABLE" />
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
</activity>
您可以从第二个<data android:scheme="abc" />
代码中删除<intent-filter>
。这是运行代码,它可能会帮助你。