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

Wear App 和帶有 applicationIdSuffix 的自定義構建類型

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

問題描述

我有一個應用,我想在其中添加 Android Wear 應用擴展.主應用程序具有三種構建類型(調試、測試和發布).Beta 版本有一個 applicationIdSuffix,它允許我在同一臺設備上并行安裝 play-store 版本和當前開發版本.這一切都很好,直到我添加了磨損應用程序.

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.

主應用的 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 具有相同的構建類型和相同的 applicationIdSuffix 值.但是,當我構建 beta 應用程序(通過調用 gradle assembleBeta)時,構建過程會構建 :wear:assembleRelease 而不是 :wear:assembleBeta這就是為什么我在構建期間收到以下錯誤消息:

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.

在使用構建類型beta打包主應用程序時,如何告訴構建過程構建正確的構建類型?

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

推薦答案

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

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(發布所有變種):

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

android {
    publishNonDefault true
}

在主應用的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')

這篇關于Wear App 和帶有 applicationIdSuffix 的自定義構建類型的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網!

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

相關文檔推薦

IncompatibleClassChangeError after updating to Android Build Tools 25.1.6 GCM / FCM(更新到 Android Build Tools 25.1.6 GCM/FCM 后出現 IncompatibleClassChangeError)
How to get current flavor in gradle(如何在 gradle 中獲取當前風味)
How to fix quot;unexpected element lt;queriesgt; found in lt;manifestgt;quot; error?(如何修復“意外元素lt;查詢gt;在“清單中找到錯誤?)
Multi flavor app based on multi flavor library in Android Gradle(基于 Android Gradle 中多風味庫的多風味應用)
Android dependency has different version for the compile and runtime(Android 依賴在編譯和運行時有不同的版本)
Transitive dependencies for local aar library(本地 aar 庫的傳遞依賴)
主站蜘蛛池模板: av在线免费观看不卡 | 国产aa| 一级黄色片网站 | 久久一级免费视频 | 久久亚洲免费 | 福利视频一区二区三区 | 久草视频观看 | 请别相信他免费喜剧电影在线观看 | 久久综合成人精品亚洲另类欧美 | 成人欧美一区二区三区黑人孕妇 | 欧美一区二区 | 午夜电影网站 | 国产一区二区日韩 | 欧美久久久久久 | 中文字幕成人av | 久久精品亚洲欧美日韩久久 | 国产免费xxx| 日本一区二区三区在线观看 | 欧美天天视频 | 久久精品亚洲精品国产欧美 | 日本不卡一区二区三区在线观看 | 中文字幕免费在线观看 | 在线视频日韩 | 亚洲国产一区二区视频 | av中文字幕在线观看 | 免费毛片网 | h片在线看 | 一级网站 | 久久手机在线视频 | 久草网在线视频 | 天天精品在线 | 欧美国产日韩精品 | 请别相信他免费喜剧电影在线观看 | 色视频网站在线观看 | 中文字幕av亚洲精品一部二部 | 亚洲国产一区二区三区在线观看 | 9久久婷婷国产综合精品性色 | 国产视频不卡一区 | 国产一区二区在线播放视频 | 欧美一级黄色免费 | 我要看免费一级毛片 |