Android Wear 应用程序不兼容,但调试时是?
Android Wear application not compatible, but when debugging it is?
我最近向 google Play 商店发布了一个 android wear 应用程序,但是当我访问该网页时,它告诉我该应用程序与我注册的设备不兼容。但是其中一个设备是 android 我用来开发相同应用程序的 wear。
Play 商店没有告诉我应用程序有什么问题以及为什么它不兼容,所以我有点迷茫。任何人都可以告诉我我是否做错了什么(您会在下面找到清单和 build.gradle)?
build.gradle
apply plugin: 'com.android.application'
apply plugin: 'com.google.gms.google-services'
android {
compileSdkVersion 28
defaultConfig {
applicationId "com.bartimeus.hapticswear"
minSdkVersion 25
targetSdkVersion 28
versionCode 6
versionName "1.1.1"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation 'com.google.android.support:wearable:2.4.0'
implementation 'com.google.android.gms:play-services-wearable:16.0.1'
implementation 'com.android.support:percent:28.0.0'
implementation 'com.android.support:support-v4:28.0.0'
implementation 'com.android.support:recyclerview-v7:28.0.0'
implementation 'com.android.support:wear:28.0.0'
implementation 'com.android.support.constraint:constraint-layout:1.1.3'
compileOnly 'com.google.android.wearable:wearable:2.4.0'
implementation 'com.google.firebase:firebase-messaging:17.3.4'
implementation 'com.squareup.okhttp3:okhttp:3.11.0'
implementation 'com.squareup.okhttp3:logging-interceptor:3.4.1'
implementation 'com.squareup.retrofit2:retrofit:2.3.0'
implementation 'com.squareup.retrofit2:converter-gson:2.3.0'
implementation 'com.google.firebase:firebase-core:16.0.6'
}
清单
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
package="com.bartimeus.hapticswear">
<uses-feature android:name="android.hardware.type.watch" />
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.VIBRATE" />
<uses-permission android:name="android.permission.WAKE_LOCK" />
<application
android:allowBackup="true"
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:supportsRtl="true"
android:theme="@android:style/Theme.DeviceDefault"
tools:ignore="GoogleAppIndexingWarning">
<uses-library
android:name="com.google.android.wearable"
android:required="true" />
<meta-data
android:name="com.google.android.wearable.standalone"
android:value="true" />
<activity
android:name=".activity.MainActivity"
android:label="@string/app_name">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<service android:name=".service.HapticsFirebaseMessagingService">
<intent-filter>
<action android:name="com.google.firebase.MESSAGING_EVENT" />
</intent-filter>
</service>
<activity
android:name=".activity.AlarmActivity"
android:label="@string/title_activity_alarm" />
</application>
</manifest>
在 Play 控制台中
- 转到您的应用程序
- 在左侧菜单中选择 "Device catalogue"
- 选择"All devices"
- 通过制造商搜索选择您认为应该兼容的设备
如果它不兼容,它会告诉你原因。
我最近向 google Play 商店发布了一个 android wear 应用程序,但是当我访问该网页时,它告诉我该应用程序与我注册的设备不兼容。但是其中一个设备是 android 我用来开发相同应用程序的 wear。
Play 商店没有告诉我应用程序有什么问题以及为什么它不兼容,所以我有点迷茫。任何人都可以告诉我我是否做错了什么(您会在下面找到清单和 build.gradle)?
build.gradle
apply plugin: 'com.android.application'
apply plugin: 'com.google.gms.google-services'
android {
compileSdkVersion 28
defaultConfig {
applicationId "com.bartimeus.hapticswear"
minSdkVersion 25
targetSdkVersion 28
versionCode 6
versionName "1.1.1"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation 'com.google.android.support:wearable:2.4.0'
implementation 'com.google.android.gms:play-services-wearable:16.0.1'
implementation 'com.android.support:percent:28.0.0'
implementation 'com.android.support:support-v4:28.0.0'
implementation 'com.android.support:recyclerview-v7:28.0.0'
implementation 'com.android.support:wear:28.0.0'
implementation 'com.android.support.constraint:constraint-layout:1.1.3'
compileOnly 'com.google.android.wearable:wearable:2.4.0'
implementation 'com.google.firebase:firebase-messaging:17.3.4'
implementation 'com.squareup.okhttp3:okhttp:3.11.0'
implementation 'com.squareup.okhttp3:logging-interceptor:3.4.1'
implementation 'com.squareup.retrofit2:retrofit:2.3.0'
implementation 'com.squareup.retrofit2:converter-gson:2.3.0'
implementation 'com.google.firebase:firebase-core:16.0.6'
}
清单
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
package="com.bartimeus.hapticswear">
<uses-feature android:name="android.hardware.type.watch" />
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.VIBRATE" />
<uses-permission android:name="android.permission.WAKE_LOCK" />
<application
android:allowBackup="true"
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:supportsRtl="true"
android:theme="@android:style/Theme.DeviceDefault"
tools:ignore="GoogleAppIndexingWarning">
<uses-library
android:name="com.google.android.wearable"
android:required="true" />
<meta-data
android:name="com.google.android.wearable.standalone"
android:value="true" />
<activity
android:name=".activity.MainActivity"
android:label="@string/app_name">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<service android:name=".service.HapticsFirebaseMessagingService">
<intent-filter>
<action android:name="com.google.firebase.MESSAGING_EVENT" />
</intent-filter>
</service>
<activity
android:name=".activity.AlarmActivity"
android:label="@string/title_activity_alarm" />
</application>
</manifest>
在 Play 控制台中
- 转到您的应用程序
- 在左侧菜单中选择 "Device catalogue"
- 选择"All devices"
- 通过制造商搜索选择您认为应该兼容的设备
如果它不兼容,它会告诉你原因。