2016-02-13 563 views
2

不是重复谷歌Play商店:“这个程序是与设备不兼容”

情况
我的应用程序是专为智能手机和目前正在对谷歌Play商店也显示我的应用程序与我的设备不兼容,也不支持任何设备。我已经在Google Play商店上传了我的应用程序的APK 9次每次都发生不同的变化。我已经经历了15个堆栈溢出问题,并尝试了什么不同的答案建议,没有任何帮助或没有任何工作。

我曾尝试和我目前有
1.尝试支持的屏幕在AndroidManifest标签。
2.在AndroidManifest中试过支持屏幕标记。
3.试过均为
4. 从AndroidManifest中删除了一些权限
5.所有使用功能目前都有“false”作为要求。
6.不得不把功能“android.hardware.telephony”作为谷歌Play商店给我的提示,我的APK是专为平板电脑
7.删除了不需要的和不必要的文件和代码片段(虽然我确实有一些Java文件,我已经将该类的整个代码片段作为评论,我将来可能会需要)。
8.放置不同大小mipmap文件夹中的应用程序徽标(尽管我不确定这是否真的会产生影响)。
9.目前,我只有一个布局文件夹,并没有为不同的屏幕尺寸设计不同的布局或布局文件夹,所以我不确定这是否会产生影响。

我的怀疑
1.可能是应用主题,因为我还没有在AndroidManifest文件中定义的“应用”标签的apptheme。但是,我只在应用程序的父项活动中定义了apptheme。
2.对于不同的屏幕尺寸,可能是不具有不同的布局
3.可能是其中一个gradle构建文件我可能需要更改某些内容,但是,我不知道它可能是什么。
4.可能来自AndroidManifest。

以下是我的AndroidManifest.xml文件。

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

    <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" /> 
     <screen android:screenSize="small" android:screenDensity="640" /> 

     <!-- 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" /> 
     <screen android:screenSize="normal" android:screenDensity="560" /> 
     <screen android:screenSize="normal" android:screenDensity="640" /> 
    </compatible-screens> 

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

    <uses-feature 
     android:name="android.hardware.sensor.accelerometer" 
     android:required="false" /> 
    <uses-feature 
     android:name="android.hardware.sensor.compass" 
     android:required="false" /> 
    <uses-feature 
     android:name="android.hardware.sensor.gyroscope" 
     android:required="false" /> 
    <uses-feature 
     android:name="android.hardware.wifi" 
     android:required="false" /> 

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

    <application 
     android:allowBackup="true" 
     android:icon="@mipmap/applogo" 
     android:label="my app name" 
     android:supportsRtl="true" 
     android:fullBackupContent="true"> 

     <service 
      android:name="com.indooratlas.android.sdk.IALocationService" 
      android:exported="false" 
      android:label="IALocationService" /> 

     <meta-data 
      android:name="com.indooratlas.android.sdk.API_KEY" 
      android:value="My Key" /> 

     <meta-data 
      android:name="com.indooratlas.android.sdk.API_SECRET" 
      android:value="My key" /> 

     <activity 
      android:name=".MainActivity" 
      android:screenOrientation="portrait" 
      android:theme="@style/AppTheme"> 

      <intent-filter> 

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

      </intent-filter> 

      <intent-filter> 
       <action android:name="android.intent.action.VIEW" /> 

       <category android:name="android.intent.category.DEFAULT" /> 
       <category android:name="android.intent.category.BROWSABLE"/> 
       <data android:host="my package" android:pathPrefix="/main" 
        android:scheme="http" /> 
      </intent-filter> 
     </activity> 

     <activity 
      android:name=".IPS" 
      android:screenOrientation="portrait" 
      android:parentActivityName=".MainActivity"> 
     </activity> 

     <activity android:name=".BI" 
      android:screenOrientation="portrait" 
      android:parentActivityName=".MainActivity"> 
     </activity> 

     <activity android:name=".SH" 
      android:windowSoftInputMode="adjustPan" 
      android:screenOrientation="portrait" 
      android:parentActivityName=".MainActivity"> 
     </activity> 

     <activity android:name=".Help" 
      android:screenOrientation="portrait" 
      android:parentActivityName=".MainActivity"> 
     </activity> 

    </application> 

</manifest> 

以下是我的build.gradle(app)文件。

apply plugin: 'com.android.application' 

android { 
    compileSdkVersion 23 
    buildToolsVersion "23.0.2" 

    defaultConfig { 
     applicationId "my package" 
     minSdkVersion 11 
     targetSdkVersion 23 
     versionCode 9 
     versionName "9.0" 
    } 

    buildTypes { 
     release { 
      minifyEnabled false 
      proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' 
      } 
     } 

} 

dependencies { 
    compile fileTree(dir: 'libs', include: ['*.jar']) 
    testCompile 'junit:junit:4.12' 
    compile 'com.android.support:appcompat-v7:23.1.1' 
    compile 'com.indooratlas.android:indooratlas-android-sdk:[email protected]' 
    compile 'com.davemorrissey.labs:subsampling-scale-image-view:3.4.1' 
} 

我甚至可能已经尝试了比我在这里陈述的更多的东西。 如果有人知道AndroidManifest文件中出现了什么问题,或者我的build.gradle文件中出了什么问题,或者根据我的怀疑可能会出错,那么我将不胜感激。提前谢谢了。

回答

1

请删除这些所有行,然后重试。

<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" /> 
    <screen android:screenSize="small" android:screenDensity="640" /> 

    <!-- 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" /> 
    <screen android:screenSize="normal" android:screenDensity="560" /> 
    <screen android:screenSize="normal" android:screenDensity="640" /> 
</compatible-screens> 

如果您想添加平板电脑支持,然后做你的应用程序设计响应和上传平板电脑屏幕截图到PlayStore。而已。

希望它适合你。

+0

我会尝试你的建议,我无意为我的智能手机和平板电脑开发我的应用程序,所以现在只需坚持使用智能手机。谢谢你的答案。 – Neel0507

+0

很酷,试试吧...... – Darshak

+0

试过了,没有奏效。 – Neel0507

0

通过使用内置的样式和主题,您的应用程序自然会遵循Android新版本的最新外观和风格。

因此,在应用程序标签中,您需要添加主题,至少是内置的主题,但没有定义主题,没有可运行“无主题”应用程序的设备。所以,

1)请确保您有下styles.xml是这样的:

<style name="AppTheme" parent="Theme.AppCompat.Light.DarkActionBar"> 
     <!-- Customize your theme here. --> 
     <item name="colorPrimary">@color/colorPrimary</item> 
     <item name="colorPrimaryDark">@color/colorPrimaryDark</item> 
     <item name="colorAccent">@color/colorAccent</item> 
</style> 

2),并在清单应用程序标签,

android:theme="@style/AppTheme" 

你能请他们

+0

所以我想我的怀疑是正确的。是的,我的styles.xml文件中有这些代码行。我一定会尝试你的建议,并会让你知道结果。非常感谢这些信息。 – Neel0507

+0

试过并没有工作。经过这些努力,真的不知道问题出在哪里。 – Neel0507

相关问题