gpt4 book ai didi

android - 如何将我的 Android Wear 分发给 Google Play 商店中的 alpha/beta 用户?

转载 作者:塔克拉玛干 更新时间:2023-11-02 20:11:28 24 4
gpt4 key购买 nike

我正在测试我的应用程序并且处于 Alpha 模式。我的应用程序已获批准,我可以在 Play 商店中以 alpha 模式找到它。但是,我的应用程序的“磨损”部分不会自动安装到磨损中。

我的 Wear 应用目前功能很少,因此“选择加入”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 channel 。

两个应用程序必须具有相同的包名,使用相同的 key 签名,并且在移动 gradle 依赖项中,您必须包含可穿戴项目

wearApp project(':wearable')

有关详细信息,请参阅完整的 Google 文档。 http://developer.android.com/training/wearables/apps/packaging.html

关于android - 如何将我的 Android Wear 分发给 Google Play 商店中的 alpha/beta 用户?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/30517879/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com