如何将我的 Android Wear 分发给 Google Play 商店中的 alpha/beta 用户?
How do I distribute my Android Wear to alpha/beta users on Google Play Store?
我正在测试我的应用程序并且处于 Alpha 模式。我的应用程序已获批准,我可以在 Play 商店中以 alpha 模式找到它。但是,我的应用程序的 'wear' 部分不会自动安装到 wear。
我的 wear 应用程序目前只有很少的功能,因此 "opt-in" for wear 不断被拒绝。我仍然希望能够为我的 alpha 用户打包我的 minimal wear 应用程序,但它似乎不起作用。我有什么想法可以自动安装应用程序的磨损部分吗?
这是我当前的文件:
/build.gradle
// Used in 'mobile' and 'wear' submodules
def versionMajor() { 0 }
def versionMinor() { 0 }
def versionPatch() { 8 }
def gitVersion() {
def process = "git rev-list master --first-parent --count".execute()
return process.text.toInteger()
}
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
repositories {
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:1.2.3'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
allprojects {
repositories {
jcenter()
}
}
/mobile/build.gradle
apply plugin: 'com.android.application'
android {
compileSdkVersion 22
buildToolsVersion "22.0.1"
defaultConfig {
applicationId "com.kamil.coach"
minSdkVersion 19
targetSdkVersion 22
versionCode gitVersion()
versionName "${versionMajor()}.${versionMinor()}.${versionPatch()}"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
packagingOptions {
exclude 'META-INF/DEPENDENCIES'
exclude 'META-INF/LICENSE'
exclude 'META-INF/LICENSE.txt'
exclude 'META-INF/license.txt'
exclude 'META-INF/NOTICE'
exclude 'META-INF/NOTICE.txt'
exclude 'META-INF/notice.txt'
exclude 'META-INF/ASL2.0'
exclude 'APK META-INF/NOTICE.txt'
exclude 'APK META-INF/notice.txt'
}
}
if(project.hasProperty("MyProject.signing") && new File(project.property("MyProject.signing") + ".gradle").exists()) {
println "mobile applying gradle file"
apply from: project.property("MyProject.signing") + ".gradle";
} else {
println "mobile not applying gradle file"
}
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
compile project(':core')
wearApp project(':wear')
compile "com.android.support:appcompat-v7:22.1.0"
compile 'com.google.android.gms:play-services:7.3.0'
compile 'com.google.android.support:wearable:1.1.0'
compile 'com.google.android.gms:play-services-wearable:7.3.0'
compile 'org.apache.commons:commons-lang3:3.0'
compile 'joda-time:joda-time:2.7'
compile 'org.ocpsoft.prettytime:prettytime:4.0.0.Final'
compile 'com.uservoice:uservoice-android-sdk:+'
compile(name:'cloud-release', ext:'aar')
compile(name:'auth-release', ext:'aar')
compile(name:'core-release', ext:'aar')
}
repositories {
flatDir {
dirs 'libs'
}
}
/wear/build.gradle
apply plugin: 'com.android.application'
android {
compileSdkVersion 22
buildToolsVersion "22.0.1"
defaultConfig {
applicationId "com.kamil.coach"
minSdkVersion 20
targetSdkVersion 22
versionCode gitVersion()
versionName "${versionMajor()}.${versionMinor()}.${versionPatch()}"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
packagingOptions {
exclude 'META-INF/DEPENDENCIES'
exclude 'META-INF/LICENSE'
exclude 'META-INF/LICENSE.txt'
exclude 'META-INF/license.txt'
exclude 'META-INF/NOTICE'
exclude 'META-INF/NOTICE.txt'
exclude 'META-INF/notice.txt'
exclude 'META-INF/ASL2.0'
exclude 'APK META-INF/NOTICE.txt'
exclude 'APK META-INF/notice.txt'
}
}
if(project.hasProperty("MyProject.signing") && new File(project.property("MyProject.signing") + ".gradle").exists()) {
println "wear applying gradle file"
apply from: project.property("MyProject.signing") + ".gradle";
} else {
println "wear not applying gradle file"
}
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
compile project(':core')
compile 'com.google.android.support:wearable:1.1.0'
compile 'com.google.android.gms:play-services-wearable:7.3.0'
compile 'org.apache.commons:commons-lang3:3.0'
compile(name:'cloud-release', ext:'aar')
compile(name:'auth-release', ext:'aar')
compile(name:'core-release', ext:'aar')
}
repositories {
flatDir {
dirs 'libs'
}
}
/core/build.gradle
apply plugin: 'com.android.library'
android {
compileSdkVersion 22
buildToolsVersion "22.0.1"
defaultConfig {
minSdkVersion 17
targetSdkVersion 22
versionCode 1
versionName "1.0"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
compile 'com.android.support:appcompat-v7:22.0.0'
compile 'com.squareup.retrofit:retrofit:1.9.+'
}
/mobile/AndroidManifest.xml
<?xml version="1.0" encoding="utf-8"?>
<manifest package="com.kamil.coach"
xmlns:android="http://schemas.android.com/apk/res/android">
<uses-feature android:name="android.hardware.sensor.accelerometer"/>
<uses-feature android:name="android.hardware.sensor.gyroscope"/>
<uses-permission android:name="android.permission.VIBRATE"/>
<uses-permission android:name="android.permission.BLUETOOTH"/>
<uses-permission android:name="android.permission.BLUETOOTH_ADMIN"/>
<uses-permission android:name="android.permission.INTERNET"/>
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>
<application
android:name=".mobile.MobileKamilApplication"
android:allowBackup="true"
android:icon="@drawable/launcher_icon"
android:label="@string/app_name"
android:theme="@style/CoachTheme"
>
<meta-data
android:name="com.google.android.gms.version"
android:value="@integer/google_play_services_version"/>
.
.
.
</application>
</manifest>
/wear/AndroidManifest.xml
<?xml version="1.0" encoding="utf-8"?>
<manifest package="com.kamil.coach"
xmlns:android="http://schemas.android.com/apk/res/android">
<uses-feature android:name="android.hardware.type.watch"/>
<uses-feature android:name="android.hardware.sensor.accelerometer"/>
<uses-feature android:name="android.hardware.sensor.gyroscope"/>
<uses-permission android:name="android.permission.VIBRATE"/>
<uses-permission android:name="android.permission.BLUETOOTH"/>
<uses-permission android:name="android.permission.BLUETOOTH_ADMIN"/>
<application
android:name="com.core.KamilApplication"
android:allowBackup="true"
android:icon="@drawable/launcher_icon"
android:label="@string/app_name"
android:theme="@android:style/Theme.DeviceDefault"
>
<meta-data
android:name="com.google.android.gms.version"
android:value="@integer/google_play_services_version"/>
.
.
.
.
</application>
</manifest>
穿戴应用必须打包在主应用中,不能单独分发。您只需像往常一样将移动应用的发布 apk 上传到 Play 商店 alpha 通道。
两个应用程序必须具有相同的程序包名称,使用相同的密钥进行签名,并且在移动 gradle 依赖项中,您必须包含可穿戴项目
wearApp project(':wearable')
有关详细信息,请参阅完整的 Google 文档。
http://developer.android.com/training/wearables/apps/packaging.html
我正在嵌入一个导致权限错误的 aar 文件。
我必须将该 aar 文件中的权限复制到我的移动应用程序中。
我通过在 wear 上使用 'adb logcat' 解决了这个问题,因为我的手机-release.apk 尝试从 wear 安装并找出问题所在。
我正在测试我的应用程序并且处于 Alpha 模式。我的应用程序已获批准,我可以在 Play 商店中以 alpha 模式找到它。但是,我的应用程序的 'wear' 部分不会自动安装到 wear。
我的 wear 应用程序目前只有很少的功能,因此 "opt-in" for wear 不断被拒绝。我仍然希望能够为我的 alpha 用户打包我的 minimal wear 应用程序,但它似乎不起作用。我有什么想法可以自动安装应用程序的磨损部分吗?
这是我当前的文件:
/build.gradle
// Used in 'mobile' and 'wear' submodules
def versionMajor() { 0 }
def versionMinor() { 0 }
def versionPatch() { 8 }
def gitVersion() {
def process = "git rev-list master --first-parent --count".execute()
return process.text.toInteger()
}
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
repositories {
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:1.2.3'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
allprojects {
repositories {
jcenter()
}
}
/mobile/build.gradle
apply plugin: 'com.android.application'
android {
compileSdkVersion 22
buildToolsVersion "22.0.1"
defaultConfig {
applicationId "com.kamil.coach"
minSdkVersion 19
targetSdkVersion 22
versionCode gitVersion()
versionName "${versionMajor()}.${versionMinor()}.${versionPatch()}"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
packagingOptions {
exclude 'META-INF/DEPENDENCIES'
exclude 'META-INF/LICENSE'
exclude 'META-INF/LICENSE.txt'
exclude 'META-INF/license.txt'
exclude 'META-INF/NOTICE'
exclude 'META-INF/NOTICE.txt'
exclude 'META-INF/notice.txt'
exclude 'META-INF/ASL2.0'
exclude 'APK META-INF/NOTICE.txt'
exclude 'APK META-INF/notice.txt'
}
}
if(project.hasProperty("MyProject.signing") && new File(project.property("MyProject.signing") + ".gradle").exists()) {
println "mobile applying gradle file"
apply from: project.property("MyProject.signing") + ".gradle";
} else {
println "mobile not applying gradle file"
}
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
compile project(':core')
wearApp project(':wear')
compile "com.android.support:appcompat-v7:22.1.0"
compile 'com.google.android.gms:play-services:7.3.0'
compile 'com.google.android.support:wearable:1.1.0'
compile 'com.google.android.gms:play-services-wearable:7.3.0'
compile 'org.apache.commons:commons-lang3:3.0'
compile 'joda-time:joda-time:2.7'
compile 'org.ocpsoft.prettytime:prettytime:4.0.0.Final'
compile 'com.uservoice:uservoice-android-sdk:+'
compile(name:'cloud-release', ext:'aar')
compile(name:'auth-release', ext:'aar')
compile(name:'core-release', ext:'aar')
}
repositories {
flatDir {
dirs 'libs'
}
}
/wear/build.gradle
apply plugin: 'com.android.application'
android {
compileSdkVersion 22
buildToolsVersion "22.0.1"
defaultConfig {
applicationId "com.kamil.coach"
minSdkVersion 20
targetSdkVersion 22
versionCode gitVersion()
versionName "${versionMajor()}.${versionMinor()}.${versionPatch()}"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
packagingOptions {
exclude 'META-INF/DEPENDENCIES'
exclude 'META-INF/LICENSE'
exclude 'META-INF/LICENSE.txt'
exclude 'META-INF/license.txt'
exclude 'META-INF/NOTICE'
exclude 'META-INF/NOTICE.txt'
exclude 'META-INF/notice.txt'
exclude 'META-INF/ASL2.0'
exclude 'APK META-INF/NOTICE.txt'
exclude 'APK META-INF/notice.txt'
}
}
if(project.hasProperty("MyProject.signing") && new File(project.property("MyProject.signing") + ".gradle").exists()) {
println "wear applying gradle file"
apply from: project.property("MyProject.signing") + ".gradle";
} else {
println "wear not applying gradle file"
}
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
compile project(':core')
compile 'com.google.android.support:wearable:1.1.0'
compile 'com.google.android.gms:play-services-wearable:7.3.0'
compile 'org.apache.commons:commons-lang3:3.0'
compile(name:'cloud-release', ext:'aar')
compile(name:'auth-release', ext:'aar')
compile(name:'core-release', ext:'aar')
}
repositories {
flatDir {
dirs 'libs'
}
}
/core/build.gradle
apply plugin: 'com.android.library'
android {
compileSdkVersion 22
buildToolsVersion "22.0.1"
defaultConfig {
minSdkVersion 17
targetSdkVersion 22
versionCode 1
versionName "1.0"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
compile 'com.android.support:appcompat-v7:22.0.0'
compile 'com.squareup.retrofit:retrofit:1.9.+'
}
/mobile/AndroidManifest.xml
<?xml version="1.0" encoding="utf-8"?>
<manifest package="com.kamil.coach"
xmlns:android="http://schemas.android.com/apk/res/android">
<uses-feature android:name="android.hardware.sensor.accelerometer"/>
<uses-feature android:name="android.hardware.sensor.gyroscope"/>
<uses-permission android:name="android.permission.VIBRATE"/>
<uses-permission android:name="android.permission.BLUETOOTH"/>
<uses-permission android:name="android.permission.BLUETOOTH_ADMIN"/>
<uses-permission android:name="android.permission.INTERNET"/>
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>
<application
android:name=".mobile.MobileKamilApplication"
android:allowBackup="true"
android:icon="@drawable/launcher_icon"
android:label="@string/app_name"
android:theme="@style/CoachTheme"
>
<meta-data
android:name="com.google.android.gms.version"
android:value="@integer/google_play_services_version"/>
.
.
.
</application>
</manifest>
/wear/AndroidManifest.xml
<?xml version="1.0" encoding="utf-8"?>
<manifest package="com.kamil.coach"
xmlns:android="http://schemas.android.com/apk/res/android">
<uses-feature android:name="android.hardware.type.watch"/>
<uses-feature android:name="android.hardware.sensor.accelerometer"/>
<uses-feature android:name="android.hardware.sensor.gyroscope"/>
<uses-permission android:name="android.permission.VIBRATE"/>
<uses-permission android:name="android.permission.BLUETOOTH"/>
<uses-permission android:name="android.permission.BLUETOOTH_ADMIN"/>
<application
android:name="com.core.KamilApplication"
android:allowBackup="true"
android:icon="@drawable/launcher_icon"
android:label="@string/app_name"
android:theme="@android:style/Theme.DeviceDefault"
>
<meta-data
android:name="com.google.android.gms.version"
android:value="@integer/google_play_services_version"/>
.
.
.
.
</application>
</manifest>
穿戴应用必须打包在主应用中,不能单独分发。您只需像往常一样将移动应用的发布 apk 上传到 Play 商店 alpha 通道。
两个应用程序必须具有相同的程序包名称,使用相同的密钥进行签名,并且在移动 gradle 依赖项中,您必须包含可穿戴项目
wearApp project(':wearable')
有关详细信息,请参阅完整的 Google 文档。 http://developer.android.com/training/wearables/apps/packaging.html
我正在嵌入一个导致权限错误的 aar 文件。
我必须将该 aar 文件中的权限复制到我的移动应用程序中。
我通过在 wear 上使用 'adb logcat' 解决了这个问题,因为我的手机-release.apk 尝试从 wear 安装并找出问题所在。