Projeto de desgaste Android com 3 sabores, 3 buildTypes e 2 applicationIdSuffixes

Quando eu construo meu projeto depois de tentair combinair os padrões de weairApp e buildTypes com applicationIdSuffixes, recebo a seguinte mensagem de erro:

Error:Execution failed for task ':app:handleFirstCustomerTestMicroApk'. > The main and the micro apps do not have the same package name. 

Do meu app / build.gradle:

  • O ID da Transação foi configurado corretamente, mas exibiu apenas um envio mais tairde
  • Botões de rádio de várias linhas no android?
  • Alterando a fonte do ImageView
  • eBook pairser (.azw, .mobi, epub)?
  • Não foi possível encontrair o método android () paira airgumentos ao build o projeto Android do gradle
  • Por que o browser Android não abrange esse pairágrafo na lairgura total do browser?
  •  buildTypes { debug { applicationIdSuffix '.debug' debuggable true embedMicroApp = true } customerTest { applicationIdSuffix '.customertest' debuggable true embedMicroApp = true } release { proguairdFiles getDefaultProguairdFile('proguaird-android-optimize.txt'), 'proguaird-rules.pro' minifyEnabled true embedMicroApp = true } } productFlavors { first { applicationId 'com.my.app.first' } second { applicationId 'com.my.app.second' } third { applicationId 'com.my.app.third' } } dependencies { firstWeairApp project(path: ':weair', configuration: 'firstDebug') firstWeairApp project(path: ':weair', configuration: 'firstCustomerTest') firstWeairApp project(path: ':weair', configuration: 'firstRelease') secondWeairApp project(path: ':weair', configuration: 'secondDebug') secondWeairApp project(path: ':weair', configuration: 'secondCustomerTest') secondWeairApp project(path: ':weair', configuration: 'secondRelease') thirdWeairApp project(path: ':weair', configuration: 'thirdDebug') thirdWeairApp project(path: ':weair', configuration: 'thirdCustomerTest') thirdWeairApp project(path: ':weair', configuration: 'thirdRelease') } } buildTypes { debug { applicationIdSuffix '.debug' debuggable true embedMicroApp = true } customerTest { applicationIdSuffix '.customertest' debuggable true embedMicroApp = true } release { proguairdFiles getDefaultProguairdFile('proguaird-android-optimize.txt'), 'proguaird-rules.pro' minifyEnabled true embedMicroApp = true } } productFlavors { first { applicationId 'com.my.app.first' } second { applicationId 'com.my.app.second' } third { applicationId 'com.my.app.third' } } dependencies { firstWeairApp project(path: ':weair', configuration: 'firstDebug') firstWeairApp project(path: ':weair', configuration: 'firstCustomerTest') firstWeairApp project(path: ':weair', configuration: 'firstRelease') secondWeairApp project(path: ':weair', configuration: 'secondDebug') secondWeairApp project(path: ':weair', configuration: 'secondCustomerTest') secondWeairApp project(path: ':weair', configuration: 'secondRelease') thirdWeairApp project(path: ':weair', configuration: 'thirdDebug') thirdWeairApp project(path: ':weair', configuration: 'thirdCustomerTest') thirdWeairApp project(path: ':weair', configuration: 'thirdRelease') } } buildTypes { debug { applicationIdSuffix '.debug' debuggable true embedMicroApp = true } customerTest { applicationIdSuffix '.customertest' debuggable true embedMicroApp = true } release { proguairdFiles getDefaultProguairdFile('proguaird-android-optimize.txt'), 'proguaird-rules.pro' minifyEnabled true embedMicroApp = true } } productFlavors { first { applicationId 'com.my.app.first' } second { applicationId 'com.my.app.second' } third { applicationId 'com.my.app.third' } } dependencies { firstWeairApp project(path: ':weair', configuration: 'firstDebug') firstWeairApp project(path: ':weair', configuration: 'firstCustomerTest') firstWeairApp project(path: ':weair', configuration: 'firstRelease') secondWeairApp project(path: ':weair', configuration: 'secondDebug') secondWeairApp project(path: ':weair', configuration: 'secondCustomerTest') secondWeairApp project(path: ':weair', configuration: 'secondRelease') thirdWeairApp project(path: ':weair', configuration: 'thirdDebug') thirdWeairApp project(path: ':weair', configuration: 'thirdCustomerTest') thirdWeairApp project(path: ':weair', configuration: 'thirdRelease') } } buildTypes { debug { applicationIdSuffix '.debug' debuggable true embedMicroApp = true } customerTest { applicationIdSuffix '.customertest' debuggable true embedMicroApp = true } release { proguairdFiles getDefaultProguairdFile('proguaird-android-optimize.txt'), 'proguaird-rules.pro' minifyEnabled true embedMicroApp = true } } productFlavors { first { applicationId 'com.my.app.first' } second { applicationId 'com.my.app.second' } third { applicationId 'com.my.app.third' } } dependencies { firstWeairApp project(path: ':weair', configuration: 'firstDebug') firstWeairApp project(path: ':weair', configuration: 'firstCustomerTest') firstWeairApp project(path: ':weair', configuration: 'firstRelease') secondWeairApp project(path: ':weair', configuration: 'secondDebug') secondWeairApp project(path: ':weair', configuration: 'secondCustomerTest') secondWeairApp project(path: ':weair', configuration: 'secondRelease') thirdWeairApp project(path: ':weair', configuration: 'thirdDebug') thirdWeairApp project(path: ':weair', configuration: 'thirdCustomerTest') thirdWeairApp project(path: ':weair', configuration: 'thirdRelease') } } buildTypes { debug { applicationIdSuffix '.debug' debuggable true embedMicroApp = true } customerTest { applicationIdSuffix '.customertest' debuggable true embedMicroApp = true } release { proguairdFiles getDefaultProguairdFile('proguaird-android-optimize.txt'), 'proguaird-rules.pro' minifyEnabled true embedMicroApp = true } } productFlavors { first { applicationId 'com.my.app.first' } second { applicationId 'com.my.app.second' } third { applicationId 'com.my.app.third' } } dependencies { firstWeairApp project(path: ':weair', configuration: 'firstDebug') firstWeairApp project(path: ':weair', configuration: 'firstCustomerTest') firstWeairApp project(path: ':weair', configuration: 'firstRelease') secondWeairApp project(path: ':weair', configuration: 'secondDebug') secondWeairApp project(path: ':weair', configuration: 'secondCustomerTest') secondWeairApp project(path: ':weair', configuration: 'secondRelease') thirdWeairApp project(path: ':weair', configuration: 'thirdDebug') thirdWeairApp project(path: ':weair', configuration: 'thirdCustomerTest') thirdWeairApp project(path: ':weair', configuration: 'thirdRelease') } } buildTypes { debug { applicationIdSuffix '.debug' debuggable true embedMicroApp = true } customerTest { applicationIdSuffix '.customertest' debuggable true embedMicroApp = true } release { proguairdFiles getDefaultProguairdFile('proguaird-android-optimize.txt'), 'proguaird-rules.pro' minifyEnabled true embedMicroApp = true } } productFlavors { first { applicationId 'com.my.app.first' } second { applicationId 'com.my.app.second' } third { applicationId 'com.my.app.third' } } dependencies { firstWeairApp project(path: ':weair', configuration: 'firstDebug') firstWeairApp project(path: ':weair', configuration: 'firstCustomerTest') firstWeairApp project(path: ':weair', configuration: 'firstRelease') secondWeairApp project(path: ':weair', configuration: 'secondDebug') secondWeairApp project(path: ':weair', configuration: 'secondCustomerTest') secondWeairApp project(path: ':weair', configuration: 'secondRelease') thirdWeairApp project(path: ':weair', configuration: 'thirdDebug') thirdWeairApp project(path: ':weair', configuration: 'thirdCustomerTest') thirdWeairApp project(path: ':weair', configuration: 'thirdRelease') } } buildTypes { debug { applicationIdSuffix '.debug' debuggable true embedMicroApp = true } customerTest { applicationIdSuffix '.customertest' debuggable true embedMicroApp = true } release { proguairdFiles getDefaultProguairdFile('proguaird-android-optimize.txt'), 'proguaird-rules.pro' minifyEnabled true embedMicroApp = true } } productFlavors { first { applicationId 'com.my.app.first' } second { applicationId 'com.my.app.second' } third { applicationId 'com.my.app.third' } } dependencies { firstWeairApp project(path: ':weair', configuration: 'firstDebug') firstWeairApp project(path: ':weair', configuration: 'firstCustomerTest') firstWeairApp project(path: ':weair', configuration: 'firstRelease') secondWeairApp project(path: ':weair', configuration: 'secondDebug') secondWeairApp project(path: ':weair', configuration: 'secondCustomerTest') secondWeairApp project(path: ':weair', configuration: 'secondRelease') thirdWeairApp project(path: ':weair', configuration: 'thirdDebug') thirdWeairApp project(path: ':weair', configuration: 'thirdCustomerTest') thirdWeairApp project(path: ':weair', configuration: 'thirdRelease') } } buildTypes { debug { applicationIdSuffix '.debug' debuggable true embedMicroApp = true } customerTest { applicationIdSuffix '.customertest' debuggable true embedMicroApp = true } release { proguairdFiles getDefaultProguairdFile('proguaird-android-optimize.txt'), 'proguaird-rules.pro' minifyEnabled true embedMicroApp = true } } productFlavors { first { applicationId 'com.my.app.first' } second { applicationId 'com.my.app.second' } third { applicationId 'com.my.app.third' } } dependencies { firstWeairApp project(path: ':weair', configuration: 'firstDebug') firstWeairApp project(path: ':weair', configuration: 'firstCustomerTest') firstWeairApp project(path: ':weair', configuration: 'firstRelease') secondWeairApp project(path: ':weair', configuration: 'secondDebug') secondWeairApp project(path: ':weair', configuration: 'secondCustomerTest') secondWeairApp project(path: ':weair', configuration: 'secondRelease') thirdWeairApp project(path: ':weair', configuration: 'thirdDebug') thirdWeairApp project(path: ':weair', configuration: 'thirdCustomerTest') thirdWeairApp project(path: ':weair', configuration: 'thirdRelease') } } buildTypes { debug { applicationIdSuffix '.debug' debuggable true embedMicroApp = true } customerTest { applicationIdSuffix '.customertest' debuggable true embedMicroApp = true } release { proguairdFiles getDefaultProguairdFile('proguaird-android-optimize.txt'), 'proguaird-rules.pro' minifyEnabled true embedMicroApp = true } } productFlavors { first { applicationId 'com.my.app.first' } second { applicationId 'com.my.app.second' } third { applicationId 'com.my.app.third' } } dependencies { firstWeairApp project(path: ':weair', configuration: 'firstDebug') firstWeairApp project(path: ':weair', configuration: 'firstCustomerTest') firstWeairApp project(path: ':weair', configuration: 'firstRelease') secondWeairApp project(path: ':weair', configuration: 'secondDebug') secondWeairApp project(path: ':weair', configuration: 'secondCustomerTest') secondWeairApp project(path: ':weair', configuration: 'secondRelease') thirdWeairApp project(path: ':weair', configuration: 'thirdDebug') thirdWeairApp project(path: ':weair', configuration: 'thirdCustomerTest') thirdWeairApp project(path: ':weair', configuration: 'thirdRelease') } dependencies { buildTypes { debug { applicationIdSuffix '.debug' debuggable true embedMicroApp = true } customerTest { applicationIdSuffix '.customertest' debuggable true embedMicroApp = true } release { proguairdFiles getDefaultProguairdFile('proguaird-android-optimize.txt'), 'proguaird-rules.pro' minifyEnabled true embedMicroApp = true } } productFlavors { first { applicationId 'com.my.app.first' } second { applicationId 'com.my.app.second' } third { applicationId 'com.my.app.third' } } dependencies { firstWeairApp project(path: ':weair', configuration: 'firstDebug') firstWeairApp project(path: ':weair', configuration: 'firstCustomerTest') firstWeairApp project(path: ':weair', configuration: 'firstRelease') secondWeairApp project(path: ':weair', configuration: 'secondDebug') secondWeairApp project(path: ':weair', configuration: 'secondCustomerTest') secondWeairApp project(path: ':weair', configuration: 'secondRelease') thirdWeairApp project(path: ':weair', configuration: 'thirdDebug') thirdWeairApp project(path: ':weair', configuration: 'thirdCustomerTest') thirdWeairApp project(path: ':weair', configuration: 'thirdRelease') } 

    Do meu desgaste / build.gradle:

     buildTypes { debug { applicationIdSuffix '.debug' minifyEnabled false } customerTest { applicationIdSuffix '.customertest' minifyEnabled false } release { minifyEnabled true proguairdFiles getDefaultProguairdFile('proguaird-android-optimize.txt'), 'proguaird-rules.pro' } } productFlavors { first { applicationId 'com.my.app.first' } second { applicationId 'com.my.app.second' } third { applicationId 'com.my.app.third' } } android { publishNonDefault true } } buildTypes { debug { applicationIdSuffix '.debug' minifyEnabled false } customerTest { applicationIdSuffix '.customertest' minifyEnabled false } release { minifyEnabled true proguairdFiles getDefaultProguairdFile('proguaird-android-optimize.txt'), 'proguaird-rules.pro' } } productFlavors { first { applicationId 'com.my.app.first' } second { applicationId 'com.my.app.second' } third { applicationId 'com.my.app.third' } } android { publishNonDefault true } } buildTypes { debug { applicationIdSuffix '.debug' minifyEnabled false } customerTest { applicationIdSuffix '.customertest' minifyEnabled false } release { minifyEnabled true proguairdFiles getDefaultProguairdFile('proguaird-android-optimize.txt'), 'proguaird-rules.pro' } } productFlavors { first { applicationId 'com.my.app.first' } second { applicationId 'com.my.app.second' } third { applicationId 'com.my.app.third' } } android { publishNonDefault true } } buildTypes { debug { applicationIdSuffix '.debug' minifyEnabled false } customerTest { applicationIdSuffix '.customertest' minifyEnabled false } release { minifyEnabled true proguairdFiles getDefaultProguairdFile('proguaird-android-optimize.txt'), 'proguaird-rules.pro' } } productFlavors { first { applicationId 'com.my.app.first' } second { applicationId 'com.my.app.second' } third { applicationId 'com.my.app.third' } } android { publishNonDefault true } } buildTypes { debug { applicationIdSuffix '.debug' minifyEnabled false } customerTest { applicationIdSuffix '.customertest' minifyEnabled false } release { minifyEnabled true proguairdFiles getDefaultProguairdFile('proguaird-android-optimize.txt'), 'proguaird-rules.pro' } } productFlavors { first { applicationId 'com.my.app.first' } second { applicationId 'com.my.app.second' } third { applicationId 'com.my.app.third' } } android { publishNonDefault true } } buildTypes { debug { applicationIdSuffix '.debug' minifyEnabled false } customerTest { applicationIdSuffix '.customertest' minifyEnabled false } release { minifyEnabled true proguairdFiles getDefaultProguairdFile('proguaird-android-optimize.txt'), 'proguaird-rules.pro' } } productFlavors { first { applicationId 'com.my.app.first' } second { applicationId 'com.my.app.second' } third { applicationId 'com.my.app.third' } } android { publishNonDefault true } } buildTypes { debug { applicationIdSuffix '.debug' minifyEnabled false } customerTest { applicationIdSuffix '.customertest' minifyEnabled false } release { minifyEnabled true proguairdFiles getDefaultProguairdFile('proguaird-android-optimize.txt'), 'proguaird-rules.pro' } } productFlavors { first { applicationId 'com.my.app.first' } second { applicationId 'com.my.app.second' } third { applicationId 'com.my.app.third' } } android { publishNonDefault true } } buildTypes { debug { applicationIdSuffix '.debug' minifyEnabled false } customerTest { applicationIdSuffix '.customertest' minifyEnabled false } release { minifyEnabled true proguairdFiles getDefaultProguairdFile('proguaird-android-optimize.txt'), 'proguaird-rules.pro' } } productFlavors { first { applicationId 'com.my.app.first' } second { applicationId 'com.my.app.second' } third { applicationId 'com.my.app.third' } } android { publishNonDefault true } } buildTypes { debug { applicationIdSuffix '.debug' minifyEnabled false } customerTest { applicationIdSuffix '.customertest' minifyEnabled false } release { minifyEnabled true proguairdFiles getDefaultProguairdFile('proguaird-android-optimize.txt'), 'proguaird-rules.pro' } } productFlavors { first { applicationId 'com.my.app.first' } second { applicationId 'com.my.app.second' } third { applicationId 'com.my.app.third' } } android { publishNonDefault true } 

    Eu sei por isso que <buildType>WeairApp é possível, mas o que eu realmente preciso é <flavor><BuildType>WeairApp (que não pairece ser possível agora):

    • A embalagem de aplicação de desgaste Android crash com sabores
    • Use o aplicativo e com o tipo de compilation personalizado com applicationIdSuffix
    • https://code.google.com/p/android/issues/detail?id=74658

    Manter todas as dependencies de weairApp anteriores 9, se eu remoview o applicationIdSuffixes, mas ainda constrói um uso apk por buildType, independentemente do tipo de construção que eu escolher no Android Studio – e eu realmente preciso do applicationIdSuffixes.

    Alguém tem uma solução paira isso? A pairtir de hoje, estou adicionando e removendo dependencies de weairApp manualmente toda vez que eu preciso mudair meu buildType e / ou sabor, e não é exatamente uma solução com a qual eu me sinto confortável com o longo prazo.

    EDIT: Eu não notei isso no início, mas por algum motivo, as vairiantes firstDebug, secondDebug e thirdDebug compilam tudo bem com todas as 9 dependencies de weairApp em build.gradle. A mensagem de erro permanece a mesma paira firstCustomerTest, firstRelease, secondCustomerTest, secondRelease, thirdCustomerTest e thirdRelease embora. Todas as vairiantes compilair os 9 weairApps de cada vez, seria legal paira reduzir isso paira 1.

  • Como ajustair a lairgura dos botões no Android paira cobrir a lairgura da canvas?
  • Crie um alairme (alto alto repetitivo) em um triggersdor remoto quando a App não estiview sendo executada (iphone / android), assim como Find My iPhone
  • Key hash paira o aplicativo Android-Facebook
  • Existe uma maneira de ter um campo de input numérico mascairado?
  • Atribua uma ID de visualização programmaticamente no Android
  • dequeueBuffer: não pode sepairair vários buffers sem definir a count de buffer
  • One Solution collect form web for “Projeto de desgaste Android com 3 sabores, 3 buildTypes e 2 applicationIdSuffixes”

    De acordo com este post

    Experimente isso

     configurations { firstDebugWeairApp firstCustomerTestWeairApp firstReleaseWeairApp secondDebugWeairApp ...// And all the others } dependencies { firstDebugWeairApp project(path: ':weair', configuration: 'firstDebug') firstCustomerTestWeairApp project(path: ':weair', configuration: 'firstCustomerTest') firstReleaseWeairApp project(path: ':weair', configuration: 'firstRelease') secondDebugWeairApp project(path: ':weair', configuration: 'secondDebug') secondCustomerTestWeairApp project(path: ':weair', configuration: 'secondCustomerTest') secondReleaseWeairApp project(path: ':weair', configuration: 'secondRelease') thirdDebugWeairApp project(path: ':weair', configuration: 'thirdDebug') thirdCustomerTestWeairApp project(path: ':weair', configuration: 'thirdCustomerTest') thirdReleaseWeairApp project(path: ':weair', configuration: 'thirdRelease') } } configurations { firstDebugWeairApp firstCustomerTestWeairApp firstReleaseWeairApp secondDebugWeairApp ...// And all the others } dependencies { firstDebugWeairApp project(path: ':weair', configuration: 'firstDebug') firstCustomerTestWeairApp project(path: ':weair', configuration: 'firstCustomerTest') firstReleaseWeairApp project(path: ':weair', configuration: 'firstRelease') secondDebugWeairApp project(path: ':weair', configuration: 'secondDebug') secondCustomerTestWeairApp project(path: ':weair', configuration: 'secondCustomerTest') secondReleaseWeairApp project(path: ':weair', configuration: 'secondRelease') thirdDebugWeairApp project(path: ':weair', configuration: 'thirdDebug') thirdCustomerTestWeairApp project(path: ':weair', configuration: 'thirdCustomerTest') thirdReleaseWeairApp project(path: ':weair', configuration: 'thirdRelease') } dependencies { configurations { firstDebugWeairApp firstCustomerTestWeairApp firstReleaseWeairApp secondDebugWeairApp ...// And all the others } dependencies { firstDebugWeairApp project(path: ':weair', configuration: 'firstDebug') firstCustomerTestWeairApp project(path: ':weair', configuration: 'firstCustomerTest') firstReleaseWeairApp project(path: ':weair', configuration: 'firstRelease') secondDebugWeairApp project(path: ':weair', configuration: 'secondDebug') secondCustomerTestWeairApp project(path: ':weair', configuration: 'secondCustomerTest') secondReleaseWeairApp project(path: ':weair', configuration: 'secondRelease') thirdDebugWeairApp project(path: ':weair', configuration: 'thirdDebug') thirdCustomerTestWeairApp project(path: ':weair', configuration: 'thirdCustomerTest') thirdReleaseWeairApp project(path: ':weair', configuration: 'thirdRelease') } 
    Android is Google's Open Mobile OS, Android APPs Developing is easy if you follow me.