4

这是我的 Manifest.xml 配置,我不明白为什么 Nexus 7 和其他平板电脑无法从市场下载此应用。

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

<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />
<uses-permission android:name="android.permission.GET_ACCOUNTS" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" android:required="false"/>
<uses-permission android:name="android.permission.READ_PHONE_STATE" android:required="false"/>
<uses-permission android:name="android.permission.CAMERA" android:required="false"/>
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" android:required="false" />
<uses-permission android:name="android.permission.CALL_PHONE" android:required="false" /> 
<uses-feature android:name="android.hardware.camera" android:required="false"/> 
<uses-feature android:name="android.hardware.camera.autofocus" android:required="false"/>

在开发者控制台中有这个字符串 Layout schermo: SMALL NORMAL LARGE XLARGE 所以我相信问题是权限。有什么建议么?

所有清单

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

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

<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />
<uses-permission android:name="android.permission.GET_ACCOUNTS" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" android:required="false"/>
<uses-permission android:name="android.permission.READ_PHONE_STATE" android:required="false"/>
<uses-permission android:name="android.permission.CAMERA" android:required="false"/>
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" android:required="false" />
<uses-permission android:name="android.permission.CALL_PHONE" android:required="false" /> 
<uses-feature android:name="android.hardware.camera" android:required="false"/> 
<uses-feature android:name="android.hardware.camera.autofocus" android:required="false"/>




<application
    android:icon="@drawable/ic_launcher"
    android:label="@string/app_name" >
    <activity
        android:name=".SplashScreenActivity"
        android:label="@string/app_name"
        android:screenOrientation="portrait"
        android:theme="@style/Theme.Transparent" >
        <intent-filter>
            <action android:name="android.intent.action.MAIN" />
            <category android:name="android.intent.category.LAUNCHER" />
        </intent-filter>
    </activity>
    <activity
        android:name="**************"
        android:screenOrientation="portrait"
        android:theme="@style/Theme.Transparent" >
    </activity>
    <activity
        android:name="InfoServizio"
        android:screenOrientation="portrait"
        android:theme="@style/Theme.Transparent" >
    </activity>
    <activity
        android:name="NewProfilo"
        android:screenOrientation="portrait"
        android:theme="@style/Theme.Transparent" >
    </activity>
    <activity
        android:name="MiaDietaActivity"
        android:screenOrientation="portrait"
        android:theme="@style/Theme.Transparent" >
    </activity>
    <activity
        android:name="Percentuali"
        android:screenOrientation="portrait"
        android:theme="@style/Theme.Transparent" >
    </activity>
    <activity
        android:name="DatiFisiciUtente"
        android:screenOrientation="portrait"
        android:theme="@style/Theme.Transparent" >
    </activity>
    <activity
        android:name="ListViewFoodCategoryActivity"
        android:screenOrientation="portrait"
        android:theme="@style/Theme.Transparent" >
    </activity>
    <activity
        android:name="ListViewFoodActivity"
        android:screenOrientation="portrait"
        android:theme="@style/Theme.Transparent" >
    </activity>
    <activity
        android:name="FoodDescriptionActivity"
        android:screenOrientation="portrait"
        android:theme="@style/Theme.Transparent" >
    </activity>
    <activity android:name="MiaDietaActivityWebView" >
    </activity>
    <activity
        android:name="AggiungiNuovoPiattoActivity"
        android:screenOrientation="portrait"
        android:theme="@style/Theme.Transparent" >
    </activity>
    <activity
        android:name="EmailActivity"
        android:screenOrientation="portrait"
        android:theme="@style/Theme.Transparent" >
    </activity>
    <activity
        android:name="ProfiloActivity"
        android:screenOrientation="portrait"
        android:theme="@style/Theme.Transparent" >
    </activity>
    <activity
        android:name="InsertInitialDataActivity"
        android:screenOrientation="portrait"
        android:theme="@style/Theme.Transparent" >
    </activity>
    <activity
        android:name="LoginActivity"
        android:screenOrientation="portrait"
        android:theme="@style/Theme.Transparent" >
    </activity>
    <activity
        android:name=".StoricoTabActivity"
        android:screenOrientation="portrait"
        android:theme="@style/Theme.Transparent" >
    </activity>
    <activity
        android:name="PesoRiepilogoActivity"
        android:screenOrientation="portrait"
        android:theme="@style/Theme.Transparent" >
    </activity>
    <activity
        android:name="GraficoRiepilogoActivity"
        android:screenOrientation="landscape"
        android:theme="@style/Theme.Transparent" >
    </activity>
    <activity
        android:name="StoricoPesoActivity"
        android:screenOrientation="portrait"
        android:theme="@style/Theme.Transparent" >
    </activity>
    <activity
        android:name="StoricoPietanzeActivity"
        android:screenOrientation="portrait"
        android:theme="@style/Theme.Transparent" >
    </activity>
    <activity
        android:name="AggiungiNuovoPiattoSecondoPassaggioActvity"
        android:screenOrientation="portrait"
        android:theme="@style/Theme.Transparent" >
    </activity>
    <activity
        android:name="ActivityScattaFoto"
        android:screenOrientation="portrait" >
    </activity>
    <activity
        android:name="ListViewMyFoodActivity"
        android:screenOrientation="portrait"
        android:theme="@style/Theme.Transparent" >
    </activity>
    <activity
        android:name="ListViewMyFoodCategoryActivity"
        android:screenOrientation="portrait"
        android:theme="@style/Theme.Transparent" >
    </activity>
    <activity
        android:name="SearchActivity"
        android:screenOrientation="portrait"
        android:theme="@style/Theme.Transparent" >
    </activity>
    <activity
        android:name="HomeActivity"
        android:screenOrientation="portrait"
        android:theme="@style/Theme.Transparent" >
    </activity>
    <activity
        android:name="GraficoOK"
        android:screenOrientation="portrait"
        android:theme="@style/Theme.Transparent" >
    </activity>
    <activity
        android:name="FormuleActivity"
        android:screenOrientation="portrait"
        android:theme="@style/Theme.Transparent" >
    </activity>
    <activity
        android:name="CreditsActivity"
        android:screenOrientation="portrait"
        android:theme="@style/Theme.Transparent" >
    </activity>
    <activity
        android:name="AssociaDietologoActivity"
        android:screenOrientation="portrait"
        android:theme="@style/Theme.Transparent" >
    </activity>
    <activity android:name="org.achartengine.chartdemo.demo.chart.XYChartBuilder" />
    <activity android:name="org.achartengine.chartdemo.demo.chart.PieChartBuilder" />
    <activity android:name="org.achartengine.GraphicalActivity" />
    <activity android:name=".GeneratedChartDemo" />
    <activity
        android:name="AttesaDietologoActivity"
        android:screenOrientation="portrait"
        android:theme="@style/Theme.Transparent" >
    </activity>
    <activity
        android:name="FacebookLikeActivity"
        android:screenOrientation="portrait" >
    </activity>
    <activity
        android:name="TwitterGoActivity"
        android:screenOrientation="portrait" >
    </activity>
    <activity
        android:name="CalendarView"
        android:screenOrientation="portrait"
        android:theme="@style/Theme.Transparent" >
    </activity>
</application>

</manifest>
4

2 回答 2

5

您不能使用android:required="false"权限;它只是为了uses-feature。某些权限意味着功能。在这种情况下android.permission.CALL_PHONE意味着 android.hardware.telephony。Nexus 7 没有此功能,将被过滤掉。试试这个:

<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />
<uses-permission android:name="android.permission.GET_ACCOUNTS" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.READ_PHONE_STATE" />
<uses-permission android:name="android.permission.CAMERA" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.CALL_PHONE" />

<uses-feature android:name="android.hardware.camera" android:required="false"/> 
<uses-feature android:name="android.hardware.camera.autofocus" android:required="false"/>
<uses-feature android:name="android.hardware.telephony" android:required="false"/>
于 2012-12-10T23:27:02.293 回答
1

Nexus 7 没有自动对焦功能。因此,如果它显示在您的<uses>标签中,该应用程序将对所有不具备该功能的设备隐藏。如果您的应用程序不需要自动对焦,而只需要相机,则删除该<uses>标签,您应该可以在所有具有相机的设备上继续使用。您可能还想<uses>将相机的标签更改为 camera.any,否则它会因为缺少后置相机而失败。

于 2012-12-10T21:22:11.490 回答