android / codelab-android-dynamic-features

Apache License 2.0
123 stars 47 forks source link

FindViewById returns negative values For Dynamic Feature Module #54

Open r0shanbhagat opened 9 months ago

r0shanbhagat commented 9 months ago

I'm trying to use the DFM in my project but somehow it's returning negative values for my views, below is my project configuration:

**build.gradle(feature-moduleA)**
  defaultConfig {
        applicationId "com. sample.app"
        minSdkVersion 28
        targetSdkVersion 33
        compileSdk 33
    }

findViewById<TextView>(R.id.tvMsg).id // -2147418111
Now the catch is if we change the "minSdkVersion=24" automatically findViewById started returning the postive value:

**build.gradle(feature-moduleA)**
defaultConfig {
        applicationId "com. sample.app"
        minSdkVersion 24
        targetSdkVersion 33
        compileSdk 33
    }

findViewById<TextView>(R.id.tvMsg).id // 2139095043

Can you please provide the solution for this, I've to use minSdkVersion= 28 in my project.

r0shanbhagat commented 9 months ago

Hi @Team,

I'll keep checking for your update on this issue. Can you please examine it? It's preventing us from doing anything.

@pflammertsma , @keyboardsurfer @tdobek
@osuleymanova

r0shanbhagat commented 9 months ago

Gentle Reminder , Is there any update?