安卓应用与三星Galaxy S4 mini不兼容。

3
我有一部三星galaxy s4 mini手机,屏幕尺寸为540 x 960像素,4.3英寸(~256 ppi像素密度)。我的应用程序在所有设备上都可以完美运行,但不包括galaxy s4 mini、galaxy s4和galaxy s5。我已经访问了以下链接并尝试过,但它没有对设备产生影响。 Android App is not compatible with Samsung galaxy S4 如果有解决方法,请建议我。
我的AndroidManifest.xml文件代码:
<uses-permission android:name="android.permission.BLUETOOTH" />
<uses-permission android:name="android.permission.BLUETOOTH_ADMIN" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />

<uses-feature
    android:name="android.hardware.bluetooth_le"
    android:required="true" />

<supports-screens
    android:anyDensity="true"
    android:largeScreens="true"
    android:normalScreens="true"
    android:smallScreens="false" />

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

<application
    android:name="com.utils.Constant"
    android:allowBackup="true"
    android:icon="@drawable/ic_launcher"
    android:killAfterRestore="false"
    android:label="@string/app_name"
    android:theme="@style/AppTheme" >
    <activity
        android:name="Video"
        android:configChanges="orientation"
        android:screenOrientation="portrait" >
    </activity>

    <meta-data
        android:name="com.facebook.sdk.ApplicationId"
        android:value="@string/facebook_app_id" />

    <activity
        android:name="com.facebook.LoginActivity"
        android:configChanges="orientation"
        android:screenOrientation="portrait" >
    </activity>
    <activity
        android:name="Result"
        android:configChanges="orientation"
        android:screenOrientation="portrait" >
    </activity>
    <activity
        android:name="Login"
        android:configChanges="orientation"
        android:screenOrientation="portrait" >
        <intent-filter>
            <action android:name="android.intent.action.MAIN" />

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

    <service
        android:name="com.beaconrangingservice.BeaconRangingService"
        android:enabled="true" />

    <activity
        android:name="Home"
        android:configChanges="orientation"
        android:screenOrientation="portrait" >
    </activity>
    <activity
        android:name="Infopage"
        android:configChanges="orientation"
        android:screenOrientation="portrait" >
    </activity>
    <activity
        android:name="BeaconFoundPage"
        android:configChanges="orientation"
        android:screenOrientation="portrait" >
    </activity>

    <!--
    <service android:name=".EstimoteService" />
    <service
        android:name="com.estimote.sdk.service.BeaconService"
        android:exported="false" />
    <service
        android:name="org.altbeacon.beacon.service.BeaconService"
        android:exported="false" />
    -->
    <service android:name=".BeaconService" >
    </service>
    <service
        android:name="org.altbeacon.beacon.BeaconIntentProcessor"
        android:enabled="true" >
    </service>
</application>`

你能发布你的AndroidManifest.xml吗? - ianhanniballake
首先,你所说的“不工作”是什么意思?其次,我有一部Galaxy S4手机,没有发现任何问题。 - Biu
我的意思是在所有设备上都看起来很完美,但在S4迷你手机上,所有视图的位置都改变了。 - Malay
你只需要调整那些显示不正确的部分。Android 设备的尺寸和版本各不相同,这就是为什么 Google 会发布有关支持不同屏幕尺寸的最佳实践的文章。(http://developer.android.com/training/multiscreen/index.html)(http://developer.android.com/guide/practices/screens_support.html) - Biu
实际上,应用程序并没有从任何活动中崩溃。我认为这是设计问题。 - Malay
显示剩余2条评论
2个回答

1

540 x 960 设备访问 drawable-hdpivalues-hdpi 文件夹。

请更新您的 hdpi 文件夹并检查。

或者您应该为特定尺寸的设备创建布局 res/layout-w540dp-h960dp/layout.xml


0

那sdk版本呢?尝试将此添加到您的清单中:

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

我认为发布整个代码可能会有问题,但我已经添加了最小和最大版本。 - Malay
所以,也许这可以帮助吗?https://dev59.com/_WQn5IYBdhLWcg3w36XV?lq=1 - anil
我也尝试过这个,但是不起作用,而且xxhdpi不存在。 - Malay
你应该像Commonsware所说的那样使用480,而不是'xxhdpi'。 - anil
我已经使用了这个,但没有影响到任何东西,而且'xxhdpi'不存在。 - Malay

网页内容由stack overflow 提供, 点击上面的
可以查看英文原文,
原文链接