Android 应用程序与我的设备不兼容
Android application is not compatible with my device
我在 android 上创建了应用程序,主要目标是:用户使用他的 Google 帐户登录,扫描 NFC 标签,将用户登录信息和标签信息发送到服务器使用凌空图书馆并得到回应。
当我使用 Android studio 和 usb 调试时一切正常,一切正常。我已将该应用程序放到 google Play 商店,它与我的 p9 lite 或任何其他带 NFC 的 phone 不兼容。所以我什至无法下载应用程序。
这是来自 Google 播放的屏幕截图:
这是我的 Android 清单:
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="some.package.name">
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.NFC" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.WRITE_SETTINGS" />
<uses-feature android:name="android.nfc"/>
<application
android:allowBackup="true"
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:roundIcon="@mipmap/ic_launcher_round"
android:supportsRtl="true"
android:theme="@style/AppTheme">
<activity android:name=".MainActivity"
android:screenOrientation="portrait">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
<intent-filter>
<action android:name="android.nfc.action.NDEF_DISCOVERED" />
<category android:name="android.intent.category.DEFAULT" />
<data android:mimeType="text/plain" />
</intent-filter>
<meta-data
android:name="android.nfc.action.TECH_DISCOVERED"
android:resource="@xml/nfc_tech_filter" />
</activity>
</application>
</manifest>
这也是我的 gradle 构建项目:
buildscript {
repositories {
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:2.3.1'
classpath 'com.google.gms:google-services:3.0.0'
}
}
allprojects {
repositories {
jcenter()
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}
并且gradle构建应用程序:
apply plugin: 'com.android.application'
android {
signingConfigs {
config {
keyAlias 'key0'
storeFile file('C:/AndroidKey/RandomKey.jks')
keyPassword 'randomKey'
storePassword 'randomPassword'
}
}
compileSdkVersion 25
buildToolsVersion "25.0.2"
defaultConfig {
applicationId "someId"
minSdkVersion 15
targetSdkVersion 25
versionCode 3
versionName "1.02"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
signingConfig signingConfigs.config
}
debug {
signingConfig signingConfigs.config
}
}
}
dependencies {
compile 'com.github.dmytrodanylyk.circular-progress-button:library:1.1.3'
compile 'com.android.volley:volley:1.0.0'
compile 'com.yarolegovich:lovely-dialog:1.0.5'
compile 'hanks.xyz:htextview-library:0.1.5'
compile fileTree(include: ['*.jar'], dir: 'libs')
androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
exclude group: 'com.android.support', module: 'support-annotations'
})
compile 'com.android.support:appcompat-v7:25.2.0'
compile 'com.android.support.constraint:constraint-layout:1.0.2'
compile 'com.google.android.gms:play-services-auth:9.8.0'
testCompile 'junit:junit:4.12'
}
apply plugin: 'com.google.gms.google-services'
通过 USB 连接一切正常,但我什至无法从 Google Play 商店下载应用程序。
在那种情况下我能做什么?谢谢和问候。
编辑:
我已将
<uses-feature android:name="android.nfc"/>
更改为
<uses-feature android:name="android.hardware.nfc"/>
但情况仍然相同:
编辑:我的设备有 NFC,当我点击选项以显示我的应用程序的兼容设备时,它就在那里。
正确的标签是
<uses-feature android:name="android.hardware.nfc"/>
如果您的应用也可以在没有 NFC 芯片的设备上运行,您应该将 android:required="false"
添加到上述标签中。
如果您的应用适用于没有 nfc 模块的设备,您应该像这样更改 uses-feature
:
<uses-feature android:name="android.hardware.nfc" android:required="false" />
如果您的应用无法在没有 nfc 模块的设备上运行,您应该拥有与 nfc 兼容的设备并像这样更改您的 uses-feature
:
<uses-feature android:name="android.hardware.nfc" />
好的,所以我找到了解决方案,谢谢大家的提示,清单中没有答案,很抱歉让您困惑。
Private apps in company
我不是google play developer console 的管理员,并且所有者没有检查
的权限
Allow users to update Google Play Private Channel
因此,在开发公司应用程序时,此选项是必需的。
感谢您的帮助和问候。
编辑:此外,设备必须具有工作配置文件才能安装该应用程序,它现在正在运行。
您必须将 <uses-feature>
标记更新为
<uses-feature
android:name="android.hardware.nfc"
android:required="false" />
就是这样!你会上线的!
我在 android 上创建了应用程序,主要目标是:用户使用他的 Google 帐户登录,扫描 NFC 标签,将用户登录信息和标签信息发送到服务器使用凌空图书馆并得到回应。
当我使用 Android studio 和 usb 调试时一切正常,一切正常。我已将该应用程序放到 google Play 商店,它与我的 p9 lite 或任何其他带 NFC 的 phone 不兼容。所以我什至无法下载应用程序。
这是来自 Google 播放的屏幕截图:
这是我的 Android 清单:
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="some.package.name">
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.NFC" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.WRITE_SETTINGS" />
<uses-feature android:name="android.nfc"/>
<application
android:allowBackup="true"
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:roundIcon="@mipmap/ic_launcher_round"
android:supportsRtl="true"
android:theme="@style/AppTheme">
<activity android:name=".MainActivity"
android:screenOrientation="portrait">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
<intent-filter>
<action android:name="android.nfc.action.NDEF_DISCOVERED" />
<category android:name="android.intent.category.DEFAULT" />
<data android:mimeType="text/plain" />
</intent-filter>
<meta-data
android:name="android.nfc.action.TECH_DISCOVERED"
android:resource="@xml/nfc_tech_filter" />
</activity>
</application>
</manifest>
这也是我的 gradle 构建项目:
buildscript {
repositories {
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:2.3.1'
classpath 'com.google.gms:google-services:3.0.0'
}
}
allprojects {
repositories {
jcenter()
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}
并且gradle构建应用程序:
apply plugin: 'com.android.application'
android {
signingConfigs {
config {
keyAlias 'key0'
storeFile file('C:/AndroidKey/RandomKey.jks')
keyPassword 'randomKey'
storePassword 'randomPassword'
}
}
compileSdkVersion 25
buildToolsVersion "25.0.2"
defaultConfig {
applicationId "someId"
minSdkVersion 15
targetSdkVersion 25
versionCode 3
versionName "1.02"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
signingConfig signingConfigs.config
}
debug {
signingConfig signingConfigs.config
}
}
}
dependencies {
compile 'com.github.dmytrodanylyk.circular-progress-button:library:1.1.3'
compile 'com.android.volley:volley:1.0.0'
compile 'com.yarolegovich:lovely-dialog:1.0.5'
compile 'hanks.xyz:htextview-library:0.1.5'
compile fileTree(include: ['*.jar'], dir: 'libs')
androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
exclude group: 'com.android.support', module: 'support-annotations'
})
compile 'com.android.support:appcompat-v7:25.2.0'
compile 'com.android.support.constraint:constraint-layout:1.0.2'
compile 'com.google.android.gms:play-services-auth:9.8.0'
testCompile 'junit:junit:4.12'
}
apply plugin: 'com.google.gms.google-services'
通过 USB 连接一切正常,但我什至无法从 Google Play 商店下载应用程序。
在那种情况下我能做什么?谢谢和问候。
编辑:
我已将 <uses-feature android:name="android.nfc"/>
更改为 <uses-feature android:name="android.hardware.nfc"/>
但情况仍然相同:
编辑:我的设备有 NFC,当我点击选项以显示我的应用程序的兼容设备时,它就在那里。
正确的标签是
<uses-feature android:name="android.hardware.nfc"/>
如果您的应用也可以在没有 NFC 芯片的设备上运行,您应该将 android:required="false"
添加到上述标签中。
如果您的应用适用于没有 nfc 模块的设备,您应该像这样更改 uses-feature
:
<uses-feature android:name="android.hardware.nfc" android:required="false" />
如果您的应用无法在没有 nfc 模块的设备上运行,您应该拥有与 nfc 兼容的设备并像这样更改您的 uses-feature
:
<uses-feature android:name="android.hardware.nfc" />
好的,所以我找到了解决方案,谢谢大家的提示,清单中没有答案,很抱歉让您困惑。
Private apps in company
我不是google play developer console 的管理员,并且所有者没有检查
的权限Allow users to update Google Play Private Channel
因此,在开发公司应用程序时,此选项是必需的。 感谢您的帮助和问候。
编辑:此外,设备必须具有工作配置文件才能安装该应用程序,它现在正在运行。
您必须将 <uses-feature>
标记更新为
<uses-feature
android:name="android.hardware.nfc"
android:required="false" />
就是这样!你会上线的!