Android清单将支持Galaxy S4,HTC One

时间:2013-10-15 12:07:07

标签: android android-manifest manifest galaxy htc-android

我正在尝试创建 Google Play 将向三星Galaxy S4,HTC One等显示的Android清单,因为当前的清单并未列出兼容设备列表中的那些。

我确实搜索了Stack Overflow,但是这里的所有建议都没有帮助我。下面显示我正在使用我们的应用程序...

我们还尝试删除完整的<compatible-screens>,只留下<support-screens>但仍然没有...

提前致谢

<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.application.testapp"
android:versionCode="4"
android:versionName="1.01c"
android:installLocation="auto" >
<uses-sdk android:minSdkVersion="8"  android:targetSdkVersion="17"/>
<uses-permission android:name="android.permission.INTERNET"/>
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION"/>
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION"/>
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>
<supports-screens 
android:anyDensity="true" 
android:largeScreens="true"
android:normalScreens="true" 
android:smallScreens="true"
android:xlargeScreens="true" 
android:resizeable="true" /> 
<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" />
<screen android:screenSize="small" android:screenDensity="480" />
<!-- 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="normal" android:screenDensity="480" />
<!-- all large size screens -->
<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="large" android:screenDensity="480" />
<!-- all xlarge size screens -->
<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" />
<screen android:screenSize="xlarge" android:screenDensity="480" />
</compatible-screens>
<application
android:icon="@drawable/ic_launcher"
android:label="@string/app_name" android:theme="@android:style/Theme.Light">
<uses-library android:name="com.google.android.maps"/> 
<activity 
android:name=".Main"
android:label="@string/app_name" android:theme="@android:style/Theme.Light.NoTitleBar" android:screenOrientation="portrait">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
</activity>
<activity android:name=".SplashScreen" android:theme="@android:style/Theme.Light.NoTitleBar.Fullscreen" android:screenOrientation="portrait">
<intent-filter>
<action android:name="android.intent.action.MAIN"></action>
<category android:name="android.intent.category.LAUNCHER"></category>
</intent-filter>
</activity>
<activity android:name=".ActivityProducst" android:theme="@android:style/Theme.Light.NoTitleBar" android:screenOrientation="portrait"/>
<activity android:name=".ActivityDetails" android:theme="@android:style/Theme.Light.NoTitleBar" android:screenOrientation="portrait"/>
<activity android:name=".ActivityNews" android:theme="@android:style/Theme.Light.NoTitleBar" android:screenOrientation="portrait"/>
<activity android:name=".ActivityImage" android:theme="@android:style/Theme.Light.NoTitleBar" android:screenOrientation="portrait"/>
<activity android:name=".ActivityAbout" android:theme="@android:style/Theme.Light.NoTitleBar" android:screenOrientation="portrait"/>
</application>
</manifest>

3 个答案:

答案 0 :(得分:0)

我希望你正在寻找这个,

Manifest

中更改此内容
<supports-screens
    android:anyDensity="true"
    android:largeScreens="true"
    android:normalScreens="true"
    android:smallScreens="true"
    android:xlargeScreens="true"        
/>

只是,这没有用。您需要不同的图像尺寸,不同的布局以适应不同的分辨率。

修改

http://developer.android.com/guide/practices/screens_support.html

您必须在res文件夹中为不同的布局添加不同的文件夹 - &gt; hdpi,mdpi,ldpi和大屏幕你xhdpi(对于平板电脑)和大hdpi或xlarge(对于NXzoom)。并根据屏幕尺寸设置不同布局的图像和文本大小。

答案 1 :(得分:0)

您可以在Android Developer Console上执行此配置,该控制台会将应用仅发布到您选择的设备。

答案 2 :(得分:0)

在我的应用程序中我使用此清单(我更改了包和活动名称):

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

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

    <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>

    <application 
        android:icon="@drawable/ic_launcher" 
        android:label="@string/app_name">

        <activity
            android:label="@string/app_name"
            android:name="com.blabla.Activity"
            android:configChanges="orientation" >

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

        </activity>

        <activity
            android:label="@string/app_name"
            android:name="com.blabla.Optionen" >
        </activity>

    </application>
</manifest>

Google Play商店表示它与&gt;兼容包括4000个设备,HTC One和SGS4。

我希望我理解你的问题。