0

I've started to implement instant app feature in my application. I managed to transition to base module and properly build an installable app. The base module has 3 build types:

    buildTypes {
    release {...}
    acceptance {...}
    debug {...}

When I try to build instant app as a separate module that has build.gradle file:

apply plugin: 'com.android.instantapp'

dependencies {
   implementation project(':base')
}

I'm getting below error message:

Cannot choose between the following variants of project :app: - inchargeAcceptanceBundleElements - inchargeAcceptanceRuntime - inchargeAcceptanceUnitTestCompile ... (much much longer I can give full stacktrace if needed)

I tried to change instantapp/build.gradle: implementation project(path: ':base', configuration: 'default')

but then I get:

Unable to resolve dependency for ':instantapp@debug/compileClasspath': Failed to transform file 'base-release.aar' to match attributes {artifactType=processed-aar} using transform IdentityTransform

Then the app module itself has 4 product flavors but it shouldn't matter I believe.

Any advice how to run instantapp module ?

Adam Styrc
  • 1,517
  • 2
  • 23
  • 38
  • I realized my answer is incorrect, as you're using build types and not flavors. What build types do you have in instant app module? – Hassan Ibraheem Dec 23 '18 at 12:34
  • You need to add the `productFlavors` to your feature modules and your `com.android.instantapp` module. – TWL Jan 04 '19 at 23:10

0 Answers0