Closed kkoken closed 2 years ago
Hi @kkoken,
I haven't been able to reproduce this issue by declaring that version of lifecycle-viewmodel-ktx
in the android build.gradle
in our flutter example app, so it looks like this may be due to clashing dependency versions being used in your app.
First, I'd check your gradle.properties
file to make sure the following lines are included:
android.useAndroidX=true
android.enableJetifier=true
I'd also suggest running ./gradlew app:dependencies
to see if you can identify what other dependency is requesting v2.4.0
.
Normally, Gradle should be smart enough to resolve transitive dependencies without running into duplicate class issues, but you may need to either exclude or override the version to solve your issue. If you're able to find the other dependency and it's one that you're including manually in your build.gradle
, you can exclude transitive dependencies like this:
dependencies {
// ...
implementation("com.example.yourdependency:yourdependency:1.2.3") {
exclude group: "androidx.lifecycle"
}
}
Otherwise, you can force Gradle to resolve a specific version of androidx.lifecycle
by adding these lines above your dependencies
block:
configurations.all {
resolutionStrategy.eachDependency { details ->
if (details.requested.group == "androidx.lifecycle") {
details.useVersion "2.4.0"
}
}
}
Hi @jyaganeh Thank you for replying and being cooperative. Lines mention below was already added.
android.useAndroidX=true
android.enableJetifier=true
However, I was able to solve my problem with these lines that you mentioned:
configurations.all {
resolutionStrategy.eachDependency { details ->
if (details.requested.group == "androidx.lifecycle") {
details.useVersion "2.4.0"
}
}
}
Thank you for your help. Have a nice day.
@jyaganeh I have encountered with different problem; but, this time was on iOS side
airship version: 5.0.1
Automatically signing iOS for device deployment using specified development team in Xcode project: xxxxxxxxxx
Xcode build done. 150.8s
(lldb) 2021-12-02 11:30:31.227502+0300 Gain[471:243455] GoogleCast framework version 4.6.1.19.00
Warning: Unable to create restoration in progress marker file
* thread #1, queue = 'com.apple.main-thread', stop reason = EXC_BREAKPOINT (code=1, subcode=0x103ea21d0)
frame #0: 0x0000000103ea21d0 AirshipKit`merged function signature specialization <Arg[1] = Dead> of generic specialization <AirshipKit.AnalyticsProtocol> of static AirshipKit.Airship.requireComponent<τ_0_0>(ofType: τ_0_0.Type) -> τ_0_0 + 240
AirshipKit`merged function signature specialization <Arg[1] = Dead> of generic specialization <AirshipKit.AnalyticsProtocol> of static AirshipKit.Airship.requireComponent<τ_0_0>(ofType: τ_0_0.Type) -> τ_0_0:
-> 0x103ea21d0 <+240>: brk #0x1
0x103ea21d4 <+244>: brk #0x1
AirshipKit`specialized Airship.deepLink(_:completionHandler:):
0x103ea21d8 <+0>: sub sp, sp, #0xc0 ; =0xc0
0x103ea21dc <+4>: stp x28, x27, [sp, #0x60]
Target 0: (Gain) stopped.
Error launching application on iPhone.
Exited (sigterm)
@kkoken is this a runtime exception or build exception? Kinda hard for me to make sense of that snippet
After I fixed android side with the help of @jyaganeh, I decided to try iOS side. I plugged iPhone and try to run the app. The app build finished Xcode build done. 150.8s
and immediately crashed @rlepinski .
Could you try 5.1.0 to see if the problem goes away?
@rlepinski I moved 5.0.1 to 5.1.0, and android side works without any problem. I tried with iOS simulator (iPhone 12, iOS: 14.4) and it worked. However, I have not tried with physical device. I will check on Monday.
Have a nice weekend
Can't build the app when I try update the version to latest.
What Airship dependencies are you using?
airship_flutter 4.3.0 to 5.0.1 migration
What are the versions of any relevant development tools you are using?
Report
What unexpected behavior are you seeing?