简体   繁体   中英

android - “your device isn't compatible with this version”

I put an app in the play store and my friend, who is running 4.1(Nexus 7), got the following message when trying to install my app : "your device isn't compatible with this version". Why this came? Please can any one help me.

Manifeast file

< ?xml version="1.0" encoding="utf-8"?>

< manifest xmlns:android="http://schemas.android.com/apk/res/android"
      package="com.ibkr.pcg"
      android:versionCode="3"
      android:versionName="1.1">

< uses-sdk android:minSdkVersion="7"  
      android:targetSdkVersion="8"/>
<uses-permission android:name="android.permission.INTERNET"></uses-permission> 
<uses-permission android:name="android.permission.CAMERA" />        
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" ></uses-permission>  

<!-- C2DM Permissions Start -->
 <!-- Only this application can receive the messages and registration result --> 
<permission android:name="com.ibkr.pcg.permission.C2D_MESSAGE" android:protectionLevel="signature" />
<uses-permission android:name="com.ibkr.pcg.permission.C2D_MESSAGE" /> 

 <!-- This app has permission to register and receive message -->
<uses-permission android:name="com.google.android.c2dm.permission.RECEIVE" />
<!-- End of the C2DM Permissions -->

<application android:icon="@drawable/pcgicon" 
    android:label="@string/app_name" 
    android:theme="@android:style/Theme.NoTitleBar.Fullscreen" 
    android:name="MyApplication"
    android:debuggable="true">
    <activity android:name=".PriceCheckGuruSplash"
              android:label="@string/app_name">      
        <intent-filter>
            <action android:name="android.intent.action.MAIN" />
            <category android:name="android.intent.category.LAUNCHER" />    
        </intent-filter>  
    </activity>

     <!-- Only C2DM servers can send messages for the app. If permission is not set - any other app can generate it --> 
    <receiver
     android:name=".C2DMMessageReciever" android:permission="com.google.android.c2dm.permission.SEND" >
      <!-- Receive the actual message -->
     <intent-filter >
            <action android:name="com.google.android.c2dm.intent.RECEIVE" >  
            </action>
            <category android:name="com.ibkr.pcg" /> 
        </intent-filter>
    </receiver>

   <receiver
        android:name=".C2DMRegistrationReceiver"
        android:permission="com.google.android.c2dm.permission.SEND" >
        <intent-filter >
            <action android:name="com.google.android.c2dm.intent.REGISTRATION" >
            </action>
            <category android:name="com.ibkr.pcg" />
        </intent-filter>
    </receiver>

    <activity android:name="MessageReceivedActivty" android:screenOrientation="portrait"/>
    <activity android:name="LoginScreen" android:screenOrientation="portrait"> </activity>
    <activity android:name="RegistrationScreen" android:screenOrientation="portrait"> </activity>
    <activity android:name="ForgotPasswordScreen" android:screenOrientation="portrait"> </activity>
    <activity android:name="UserPreferences" android:screenOrientation="portrait"> </activity>
    <activity android:name="TrackedItems" android:screenOrientation="portrait"> </activity> 
    <activity android:name="WebPage" android:screenOrientation="portrait"> </activity>
    <activity android:name="CustomTabActivity" android:screenOrientation="portrait"> </activity>
    <activity android:name="TabGroup1Activity" android:screenOrientation="portrait"> </activity>
    <activity android:name="TabGroup2Activity" android:screenOrientation="portrait"> </activity>
    <activity android:name="TabGroup3Activity" android:screenOrientation="portrait"> </activity>
    <activity android:name="TabGroup4Activity" android:screenOrientation="portrait"> </activity>
    <activity android:name="SearchScreen" android:screenOrientation="portrait"> </activity>
    <activity android:name="SearchResultsScreen" android:screenOrientation="portrait"></activity>
    <activity android:name="ProductDisplay" android:screenOrientation="portrait"></activity>
    <activity android:name="VendorsDisplay" android:screenOrientation="portrait"></activity>
    <activity android:name="Filter" android:screenOrientation="portrait"></activity>
    <activity android:name="barcodeScanner" android:screenOrientation="portrait"></activity>
    <activity android:name="ScannerPage" android:screenOrientation="portrait"></activity> 
    <activity android:name="Linegraphpage" android:screenOrientation="landscape"></activity>        
    <activity android:name="org.achartengine.GraphicalActivity" android:screenOrientation="landscape"/> 
    <activity android:name="org.acra.CrashReportDialog"
    android:theme="@android:style/Theme.Dialog"
    android:launchMode="singleInstance"
    android:excludeFromRecents="true"
    android:finishOnTaskLaunch="true" />
</application>

< /manifest>

在此输入图像描述

//remove this android:targetSdkVersion="8"

and Nexus 7 doesn't have back camera features.

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

Note: If you are using the camera via an intent, your application does not need to request this permission. Camera Features - Your application must also declare use of camera features, for example:

  <uses-feature android:name="android.hardware.camera" />

For a list of camera features, see the manifest Features Reference. Adding camera features to your manifest causes Google Play to prevent your application from being installed to devices that do not include a camera or do not support the camera features you specify. For more information

If your application can use a camera or camera feature for proper operation, but does not require it, you should specify this in the manifest by including the android:required attribute, and setting it to false:

Note: you need to mention supports-screens

It's because of your ' android.permission.ACCESS_NETWORK_STATE ' permission- the device doesn't have a cell phone modem, you need to put android:required="false" in the permission to allow it to be installed on devices that don't support it

To control filtering, always explicitly declare hardware features in elements, rather than relying on Google Play to "discover" the requirements in elements. Then, if you want to disable filtering for a particular feature, you can add a android:required="false" attribute to the declaration.

http://developer.android.com/guide/topics/manifest/uses-permission-element.html

Like others already suggested - the camera could be an issue here. There's a good post on the android developers blog about nexus 7. Basically it only has a single front facing camera, so your app asking for the default camera requirement will fail....

basically you need to extend the request to say it's not critical, and then handle the details in your app...

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

For lots more info, follow the link http://android-developers.blogspot.com.au/2012/07/getting-your-app-ready-for-jelly-bean.html

android:targetSdkVersion should be the highest SDK available when you are building the app, unless you have very specific reasons not to. Maybe you want to guarantee newer methods and APIs will not be called because you must work right on a specific device, even if it means sacrificing behavior on newer ones.

Most of the time, download the latest SDK and set android:targetSdkVersion to the latest version.

只需使用它

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

Use the following :

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

<uses-sdk
    android:minSdkVersion="7"
    android:targetSdkVersion="16" /> //or just remove the targetSdkVersion, altough it is not recommended

Always attributes defined in Manifest Filters out Your app By Google Playstore to some devices. For example:

  1. Declared specific Target Sdk Version .
  2. Defined Camera permission (Will filter devices without Camera)
  3. Uses Feature Camera.
  4. SIM enabled device.
  5. Device with Wifi.

So, Before releasing your app you have to keep in mind that you have to reach maximum devices for your target than you have to Opt out some of the features and Permissions and most of the time Sdk version target .

Hope this gives you idea about releasing App.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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