Solved

androidx.core version 1.7.0-alpha02 dependency causing Android build errors

  • 4 September 2021
  • 2 replies
  • 111 views

Badge

The Flutter library for RevCat depends on androidx.core:core-ktx, and Google’s latest version androidx.core 1.7.0-alpha02 is causing Android build errors and preventing app deployment. Is there anything RevCat can do to address this, or anything you’d recommend we do on our end? Our pubspec.lock/yaml file haven’t been updated in a while so not sure why Google’s latest change impacts us. 

 

For more details on our issue:

Running our Android emulator without any new changes or library updates suddenly started breaking with `error: resource android:attr/lStar not found`. From investigation, we saw a lot of Flutter & React Native developers posting the same issue: 

 

We found the androidx.core:core-ktx dependency in purchases_flutter library from running `gradle :app:dependencies > dependencies.txt` in the command line and searching androidx.core:core-ktx:

+--- project :purchases_flutter
| +--- io.flutter:flutter_embedding_debug:1.0.0-05e680e202af9a92461070cb2d9982acad46c83c (*)
| +--- org.jetbrains.kotlin:kotlin-stdlib-jdk7:1.3.72 -> 1.5.10 (*)
| \--- com.revenuecat.purchases:purchases-hybrid-common:1.7.1
| +--- com.revenuecat.purchases:purchases:4.2.1
| | +--- com.revenuecat.purchases:purchases-core-public:4.2.1
| | | +--- org.jetbrains.kotlin:kotlin-android-extensions-runtime:1.4.10
| | | | \--- org.jetbrains.kotlin:kotlin-stdlib:1.4.10 -> 1.5.21 (*)
| | | +--- com.revenuecat.purchases:purchases-core-utils:4.2.1
| | | | +--- org.jetbrains.kotlin:kotlin-android-extensions-runtime:1.4.10 (*)
| | | | +--- org.jetbrains.kotlin:kotlin-stdlib:1.4.10 -> 1.5.21 (*)
| | | | \--- androidx.core:core-ktx:1.3.1 -> 1.7.0-alpha02 (*)

 

icon

Best answer by Cesar 7 September 2021, 20:50

Is it possible you have another library that depends con `core-ktx` that it’s bringing that version? Looking at the output of your dependencies command, looks like our dependency on the version 1.3.1 got replaced by 1.7.0-alpha02 (that’s what the arrow → means).

I ran your same command in our tester app and got a different result (it doesn’t show the alpha version):
 

 

 

View original

2 replies

Is it possible you have another library that depends con `core-ktx` that it’s bringing that version? Looking at the output of your dependencies command, looks like our dependency on the version 1.3.1 got replaced by 1.7.0-alpha02 (that’s what the arrow → means).

I ran your same command in our tester app and got a different result (it doesn’t show the alpha version):
 

 

 

Badge

Ah got it, yes it looks like `audioplayers` was the one not specifying a safe version with `androidx.core:core-ktx:+ -> 1.7.0-alpha02`. Will report to them, thanks!

 

Reply