1

我刚刚使用 Phonegap 创建了一个 Android 应用程序并将其部署到商店。它只是显示网站的内容。我遇到的问题是这个应用程序只对移动设备可见,而不是平板电脑,即使在清单文件中包含它之后:

<compatible-screens>
  <!-- all small size screens -->
  <screen android:screenSize="small" android:screenDensity="ldpi" />
  <screen android:screenSize="small" android:screenDensity="mdpi" />
  <screen android:screenSize="small" android:screenDensity="hdpi" />
  <screen android:screenSize="small" android:screenDensity="xhdpi" />
  <!-- all normal size screens -->
  <screen android:screenSize="normal" android:screenDensity="ldpi" />
  <screen android:screenSize="normal" android:screenDensity="mdpi" />
  <screen android:screenSize="normal" android:screenDensity="hdpi" />
  <screen android:screenSize="normal" android:screenDensity="xhdpi" />
  <screen android:screenSize="large" android:screenDensity="ldpi" />
  <screen android:screenSize="large" android:screenDensity="mdpi" />
  <screen android:screenSize="large" android:screenDensity="hdpi" />
  <screen android:screenSize="large" android:screenDensity="xhdpi" />
  <screen android:screenSize="xlarge" android:screenDensity="ldpi" />
  <screen android:screenSize="xlarge" android:screenDensity="mdpi" />
  <screen android:screenSize="xlarge" android:screenDensity="hdpi" />
  <screen android:screenSize="xlarge" android:screenDensity="xhdpi" />
</compatible-screens>

我不知道该怎么办。我正在测试的平板电脑是 Acer A100 7",运行 Android 版本 4.0.3。

更新

这是清单文件:

<manifest xmlns:android="http://schemas.android.com/apk/res/android"
  package="com.rakoty.rakoty"
  android:versionCode="1"
  android:versionName="1.0">
  <uses-sdk
    android:minSdkVersion="8"
    android:targetSdkVersion="15" />
  <supports-screens
    android:largeScreens="true"
    android:normalScreens="true"
    android:smallScreens="true"
    android:resizeable="true"
    android:anyDensity="true" />
  <uses-permission android:name="android.permission.VIBRATE" />
  <uses-permission android:name="android.permission.VIBRATE" />
  <uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
  <uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
  <uses-permission android:name="android.permission.ACCESS_LOCATION_EXTRA_COMMANDS" />
  <uses-permission android:name="android.permission.READ_PHONE_STATE" />
  <uses-permission android:name="android.permission.INTERNET" />
  <uses-permission android:name="android.permission.RECEIVE_SMS" />
  <uses-permission android:name="android.permission.RECORD_AUDIO" />
  <uses-permission android:name="android.permission.MODIFY_AUDIO_SETTINGS" />
  <uses-permission android:name="android.permission.READ_CONTACTS" />
  <uses-permission android:name="android.permission.WRITE_CONTACTS" />
  <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
  <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
  <uses-permission android:name="android.permission.GET_ACCOUNTS" />
  <uses-permission android:name="android.permission.BROADCAST_STICKY" />
  <uses-permission android:name="android.permission.BROADCAST_STICKY" />
  <compatible-screens>
    <!-- the screen part from above -->
  </compatible-screens>
  <application
    android:icon="@drawable/ic_launcher"
    android:label="@string/app_name"
    android:theme="@style/AppTheme" >
    <activity
      android:configChanges="orientation|keyboardHidden|keyboard|screenSize|locale"
      android:name=".MainActivity"
      android:label="@string/title_activity_main" >
      <intent-filter>
        <action android:name="android.intent.action.MAIN" />
        <category android:name="android.intent.category.LAUNCHER" />
      </intent-filter>
    </activity>
 </application>
</manifest>
4

1 回答 1

3

根据我在 Play 商店中看到的内容,您RECORD_AUDIO在清单中拥有权限。默认情况下,这意味着设备必须有麦克风,而某些平板电脑则没有。考虑添加:

<uses-feature android:name="android.hardware.microphone" android:required="false" />

同样,您拥有RECEIVE_SMS权限,默认情况下要求设备具有电话功能,而大多数平板电脑没有。请考虑添加:

<uses-feature android:name="android.hardware.telephony" android:required="false" />

等等。

我建议您将您的权限与文档中的说明进行比较,以查看您可能需要添加的其他内容:http: //developer.android.com/guide/topics/manifest/uses-feature-element.html#permissions

于 2012-10-22T01:00:17.300 回答