简体   繁体   English

Google Play上的Android应用程序 - 与所有设备不兼容

[英]Android application on Google Play - incompatible with all devices

I trying to find the answer for 2 days on StackOverflow and other services without any luck. 我试图在StackOverflow和其他服务上找到答案2天没有任何运气。 I have published an app to Google Play. 我已向Google Play发布了一款应用。 It's there but it's incompatible with most of the devices. 它在那里,但它与大多数设备不兼容。 I ran tests on Nexus 7 both using Eclipse and TestFlight to install it and there was no problem. 我使用Eclipse和TestFlight在Nexus 7上运行测试来安装它并且没有问题。 So I'm almost sure it is related to the AndroidManifest. 所以我几乎可以肯定它与AndroidManifest有关。

Here is aapt dump badging result: 这是aapt dump badging结果:

Application.apk

package: name='com.test.application' 

versionCode='1' 

versionName='1.0'

sdkVersion:'11'

targetSdkVersion:'19'

uses-permission:'android.permission.WRITE_EXTERNAL_STORAGE'

uses-permission:'android.permission.ACCESS_NETWORK_STATE'

uses-permission:'android.permission.INTERNET'

application-label:'Application'

application-label-da:'Application'

application-label-el:'Application'

application-icon-160:'res/drawable-mdpi/ic_launcher.png'

application-icon-240:'res/drawable-hdpi/ic_launcher.png'

application-icon-320:'res/drawable-xhdpi/ic_launcher.png'

application-icon-480:'res/drawable-xxhdpi/ic_launcher.png'

application: label='Application' icon='res/drawable-mdpi/ic_launcher.png'

application-debuggable

launchable-activity: name='com.test.application.activity.Launcher'  

label='Application' icon=''

uses-permission:'android.permission.READ_EXTERNAL_STORAGE'

uses-implied-permission:'android.permission.READ_EXTERNAL_STORAGE','requested 

WRITE_EXTERNAL_STORAGE'

uses-feature:'android.hardware.touchscreen'

uses-implied-feature:'android.hardware.touchscreen','assumed you require a touch screen 

unless explicitly made optional'

uses-feature:'android.hardware.screen.landscape'

uses-implied-feature:'android.hardware.screen.landscape','one or more activities have 
specified a landscape orientation'

main

other-activities

supports-screens: 'small' 'normal' 'large' 'xlarge'

supports-any-density: 'true'

locales: '--_--' 'da' 'el'

densities: '160' '240' '320' '480'

and here is Manifest: 这里是清单:

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

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

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

    <application
        android:allowBackup="true"
        android:hardwareAccelerated="true"
        android:icon="@drawable/ic_launcher"
        android:label="@string/app_name"
        android:theme="@style/AppTheme"
        android:debuggable="false"
        android:name=".ApplicationApplication">
        <activity
            android:name="com.test.application.activity.Launcher"
            android:label="@string/app_name"
            android:screenOrientation="sensorLandscape"
            android:configChanges="orientation|screenSize|keyboardHidden|locale">
            <intent-filter>
                <action android:name="android.intent.action.MAIN" />
                <category android:name="android.intent.category.LAUNCHER" />
            </intent-filter>
        </activity>
        <activity
            android:name="com.test.application.activity.SomeActivity"
            android:label="@string/app_name"
            android:screenOrientation="sensorLandscape"
            android:windowSoftInputMode="adjustPan"
            android:configChanges="orientation|screenSize|keyboardHidden|locale">
        </activity>
        <activity
            android:name="com.test.application.activity.AnotherActivity"
            android:label="@string/app_name"
            android:screenOrientation="sensorLandscape"
            android:windowSoftInputMode="adjustPan"
            android:configChanges="orientation|screenSize|keyboardHidden|locale">
         </activity>
    </application>

</manifest>

The signed apk was built using Android Studio. 签名的apk是使用Android Studio构建的。 What seems suspicious is this "application-debuggable". 看似可疑的是“应用程序可调试”。 Do You guys have any clue why on Earth it is incompatible with, let's say Nexus 7? 你们有什么线索,为什么在地球上它是不相容的,让我们说Nexus 7?

Is it saying, app is not compatible. 是说,app不兼容。

It is showing error on device not only because minSDKversion but also google play concern about your given permission on the manifest file as well. 它在设备上显示错误不仅因为minSDKversion而且谷歌也关注你对清单文件的授权。

Like if you entered something like: 就像你输入的东西一样:

<uses-permission android:name="android.permission.RECEIVE_SMS" />
<uses-permission android:name="android.permission.CAMERA" />
<uses-permission android:name="android.permission.READ_PHONE_STATE" />

Your tab will not support it. 您的标签不支持它。

So instead of using uses-permission use <uses-feature> . 因此,使用<uses-feature>而不是使用uses-permission And in java file check for it that your needed hardware is available or not. 并在java文件中检查您所需的硬件是否可用。

For <uses-feature> see the below link: 对于<uses-feature>请参阅以下链接:

http://developer.android.com/guide/topics/manifest/uses-feature-element.html#features-reference http://developer.android.com/guide/topics/manifest/uses-feature-element.html#features-reference

In case If you use this you have to update your manifest like this: 如果你使用这个,你必须像这样更新你的清单:

<uses-permission android:name="android.permission.CAMERA"/>
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.SEND_SMS"/>
<uses-permission android:name="android.permission.READ_CONTACTS"/>
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />

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

You have to put <uses-permission> along with its required <uses-feature> . 您必须将<uses-permission>及其所需的<uses-feature>放在一起。

And a small tips if it will help you: 还有一个小技巧,如果它会帮助你:

  • You have to keep in mind about android:minSdkVersion as well to make it compatible with lower version device. 你必须记住android:minSdkVersion以及它与低版本设备兼容。 As you have to set it like: android:minSdkVersion="11" . 因为你必须设置它: android:minSdkVersion="11"

In manifest set android:minSdkVersion="11" - this means that all the devices below Android 3.0 - will not support. 在清单集android:minSdkVersion="11" - 这意味着Android 3.0以下的所有设备都不支持。 Or misrepresented that the problem with the above version 3.0 devices still hit in the list is not supported? 或者错误地表示不支持上述3.0版设备的问题仍然在列表中出现?

Ok, after all it turns out that there was no problem at all. 好吧,毕竟事实证明根本没有问题。 Guy responsible for publication process set country restrictions. 负责出版过程的家伙设定了国家限制。 That's why app was not compatible with all devices in specific country. 这就是为什么app与特定国家/地区的所有设备不兼容的原因。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM