line / line-sdk-unity

Provides a modern way of implementing LINE APIs in Unity games, for iOS and Android.
https://developers.line.biz/
Apache License 2.0
117 stars 24 forks source link

fix: make it able to build with 2020.3.48f1 (b805b124c6b7) #54

Closed tsairene closed 1 year ago

tsairene commented 1 year ago

Verify on: 2020.3.48f1 (b805b124c6b7) & 2022.3.4f1

onevcat commented 1 year ago

Ummm. I tries these changes but I am still getting these errors in both 2020.3.0 and 2022.3.4:

2020.3.0

  java.lang.RuntimeException: Duplicate class androidx.lifecycle.ViewModelLazy found in modules jetified-lifecycle-viewmodel-ktx-2.2.0-runtime.jar (androidx.lifecycle:lifecycle-viewmodel-ktx:2.2.0) and lifecycle-viewmodel-2.4.0-runtime.jar (androidx.lifecycle:lifecycle-viewmodel:2.4.0)

...and more others. Seems the jetified classes are conflicting with those are not.

(Did not yet try on 2020.3.48, since my available disk space is not enough to install another Unity now. I will find a chance later)

2022.3.4

> Failed to apply plugin 'com.android.internal.application'.
   > Cannot parse project property android.enableR8='' of type 'class java.lang.String' as boolean. Expected 'true' or 'false'.

Since all the settings from LINE SDK under the Android Plugins folder will be merged into the final product, I would suggest to keep it as easy as possible. If there is no special reason, I don't think changing the R8 setting is a good idea.

onevcat commented 1 year ago

I believe the most of the issues come from an incompatible version with the dependencies from Unity versions.

I will try to see if I can make it work if we upgrade the minimal version to Unity 2020.3.15:

截屏2023-07-24 14 34 06
onevcat commented 1 year ago

I am closing this since it fails to compile and the related changes should be already covered by #55