久久久久久久av_日韩在线中文_看一级毛片视频_日本精品二区_成人深夜福利视频_武道仙尊动漫在线观看

Wear App 和帶有 applicationIdSuffix 的自定義構(gòu)建類型

Wear App and with custom build type with applicationIdSuffix(Wear App 和帶有 applicationIdSuffix 的自定義構(gòu)建類型)
本文介紹了Wear App 和帶有 applicationIdSuffix 的自定義構(gòu)建類型的處理方法,對(duì)大家解決問題具有一定的參考價(jià)值,需要的朋友們下面隨著小編來一起學(xué)習(xí)吧!

問題描述

我有一個(gè)應(yīng)用,我想在其中添加 Android Wear 應(yīng)用擴(kuò)展.主應(yīng)用程序具有三種構(gòu)建類型(調(diào)試、測試和發(fā)布).Beta 版本有一個(gè) applicationIdSuffix,它允許我在同一臺(tái)設(shè)備上并行安裝 play-store 版本和當(dāng)前開發(fā)版本.這一切都很好,直到我添加了磨損應(yīng)用程序.

I have an app where I'd like to add an Android Wear app extension. The main app has three build types (debug, beta and release). Beta builds have an applicationIdSuffix which allows me to install the play-store version and the current development version in parallel on the same device. This all worked fine until I added the wear app.

主應(yīng)用的 build.gradle 如下所示:

The main app`s build.gradle looks like this:

apply plugin: 'com.android.application'

android {
    ...
    defaultConfig {
        ...
        applicationId "com.example.mainApp"
        ...
    }
    buildTypes {
        debug {
            applicationIdSuffix '.debug'                
        }
        beta {
            applicationIdSuffix '.beta'
        }
        release {
        }
    }
}

dependencies {
    ...
    wearApp project(':wear')
}

Wear-App 具有相同的構(gòu)建類型和相同的 applicationIdSuffix 值.但是,當(dāng)我構(gòu)建 beta 應(yīng)用程序(通過調(diào)用 gradle assembleBeta)時(shí),構(gòu)建過程會(huì)構(gòu)建 :wear:assembleRelease 而不是 :wear:assembleBeta這就是為什么我在構(gòu)建期間收到以下錯(cuò)誤消息:

The Wear-App has the same build types with the same applicationIdSuffix values. However, when I build the beta app (by calling gradle assembleBeta) the build process builds :wear:assembleRelease instead of :wear:assembleBeta which is why I get the following error message during build:

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':app:handleBetaMicroApk'.
> The main and the micro apps do not have the same package name.

在使用構(gòu)建類型beta打包主應(yīng)用程序時(shí),如何告訴構(gòu)建過程構(gòu)建正確的構(gòu)建類型?

How can I tell the build process to build the correct build type when packaging the main app with build type beta?

推薦答案

按照 Scott Barta 發(fā)布的鏈接 (http://tools.android.com/tech-docs/new-build-system/user-guide#TOC-Library-Publication) 我想出了這個(gè):

Following the link posted by Scott Barta (http://tools.android.com/tech-docs/new-build-system/user-guide#TOC-Library-Publication) I came up with this :

在wear app的build.gradle中,添加publishNonDefault true(發(fā)布所有變種):

In the build.gradle of the wear app, add publishNonDefault true (to publish all variants):

android {
    publishNonDefault true
}

在主應(yīng)用的build.gradle中,
替換

In the build.gradle of the main app,
Replace

wearApp project(':wear')

debugWearApp project(path:':wear', configuration: 'debug')
releaseWearApp project(path:':wear', configuration: 'release')

這篇關(guān)于Wear App 和帶有 applicationIdSuffix 的自定義構(gòu)建類型的文章就介紹到這了,希望我們推薦的答案對(duì)大家有所幫助,也希望大家多多支持html5模板網(wǎng)!

【網(wǎng)站聲明】本站部分內(nèi)容來源于互聯(lián)網(wǎng),旨在幫助大家更快的解決問題,如果有圖片或者內(nèi)容侵犯了您的權(quán)益,請(qǐng)聯(lián)系我們刪除處理,感謝您的支持!

相關(guān)文檔推薦

IncompatibleClassChangeError after updating to Android Build Tools 25.1.6 GCM / FCM(更新到 Android Build Tools 25.1.6 GCM/FCM 后出現(xiàn) IncompatibleClassChangeError)
How to get current flavor in gradle(如何在 gradle 中獲取當(dāng)前風(fēng)味)
How to fix quot;unexpected element lt;queriesgt; found in lt;manifestgt;quot; error?(如何修復(fù)“意外元素lt;查詢gt;在“清單中找到錯(cuò)誤?)
Multi flavor app based on multi flavor library in Android Gradle(基于 Android Gradle 中多風(fēng)味庫的多風(fēng)味應(yīng)用)
Android dependency has different version for the compile and runtime(Android 依賴在編譯和運(yùn)行時(shí)有不同的版本)
Transitive dependencies for local aar library(本地 aar 庫的傳遞依賴)
主站蜘蛛池模板: 久久久久国产精品一区二区 | 成人在线观看免费 | 国产精品久久久久久中文字 | 一级毛片在线播放 | 久久久国产一区二区三区 | 2022精品国偷自产免费观看 | 国产高清视频一区 | 久久亚洲一区二区三 | 国产在线中文字幕 | 中文字幕一区二区三区精彩视频 | 精品欧美乱码久久久久久 | 日韩午夜网站 | 成人区精品| 天天曰夜夜 | ririsao久久精品一区 | re久久 | av片在线观看网站 | 午夜在线视频一区二区三区 | 国产剧情一区 | 一区精品视频在线观看 | 久久国产欧美一区二区三区精品 | 久草视频在线播放 | 麻豆精品一区二区三区在线观看 | 国产有码 | 中文字幕亚洲视频 | 五月天天丁香婷婷在线中 | 欧美成人一区二区三区片免费 | 成人美女免费网站视频 | www.中文字幕| 中文字幕1区2区3区 亚洲国产成人精品女人久久久 | 欧美久久视频 | 永久网站 | 国产精品99久久久久久动医院 | 国产精品日女人 | 国产精品国产三级国产a | 国产精品一区二区三区在线 | 久久久黄色 | 羞羞的视频免费观看 | 国产午夜视频 | 亚洲精品一区久久久久久 | 殴美黄色录像 |