0

我使用 HTML5 和 monaca.io IDE 构建了一个混合 Android 应用程序。我上传了在 google play 上成功构建的版本,但是当我从商店安装它时它不起作用,我在我的小部件上找不到应用程序图标,但应用程序已安装。当我从硬盘安装应用程序时也会发生这种情况。我不知道是什么问题

<manifest xmlns:android="http://schemas.android.com/apk/res/android" android:hardwareAccelerated="true" android:versionCode="" android:versionName="1.0.0" android:windowSoftInputMode="adjustPan" package="com.notechsoft.petsbook">
<supports-screens android:anyDensity="true" android:largeScreens="true" android:normalScreens="true" android:resizeable="true" android:smallScreens="true" android:xlargeScreens="true"/>
<uses-permission android:name="android.permission.INTERNET"/>

<application android:hardwareAccelerated="true" android:icon="@drawable/icon" android:label="Pets-Book">
<activity android:configChanges="orientation|keyboardHidden|keyboard|screenSize|locale" android:label="Pets-Book" android:name="MainActivity" android:theme="@android:style/Theme.Black.NoTitleBar">
 <intent-filter>
    <action android:name="android.intent.action.MAIN"/>
    <data android:scheme="tel"/>
  </intent-filter>
</activity>
</application>
<uses-sdk android:minSdkVersion="10" android:targetSdkVersion="19"/>
</manifest>
4

1 回答 1

0

您需要向您的 AndroidManifest.xml 添加另一个意图过滤器

这就是你的新 AndroidManifest.xml 的样子:

<manifest xmlns:android="http://schemas.android.com/apk/res/android" android:hardwareAccelerated="true" android:versionCode="" android:versionName="1.0.0" android:windowSoftInputMode="adjustPan" package="com.notechsoft.petsbook">
<supports-screens android:anyDensity="true" android:largeScreens="true" android:normalScreens="true" android:resizeable="true" android:smallScreens="true" android:xlargeScreens="true"/>
<uses-permission android:name="android.permission.INTERNET"/>

<application android:hardwareAccelerated="true" android:icon="@drawable/icon" android:label="Pets-Book">
<activity android:configChanges="orientation|keyboardHidden|keyboard|screenSize|locale" android:label="Pets-Book" android:name="MainActivity" android:theme="@android:style/Theme.Black.NoTitleBar">
 <intent-filter>
    <action android:name="android.intent.action.MAIN"/>
    <category android:name="android.intent.category.LAUNCHER" />
    <data android:scheme="tel"/>
  </intent-filter>
</activity>
</application>
<uses-sdk android:minSdkVersion="10" android:targetSdkVersion="19"/>
</manifest>

我基本上<category android:name="android.intent.category.LAUNCHER" />在您的意图过滤器中添加了该行。使用此清单重新编译,这应该会在应用程序抽屉中获得您的应用程序的图标。

于 2015-12-25T17:52:25.880 回答