flutter-unity-view-widget icon indicating copy to clipboard operation
flutter-unity-view-widget copied to clipboard

android:attr/lStar not found on Unity export when building in production

Open Drarox opened this issue 1 year ago • 3 comments

Describe the bug I cannot build a production APK, the build fail with this error :

Execution failed for task ':flutter_unity_widget:verifyReleaseResources'.
> A failure occurred while executing com.android.build.gradle.tasks.VerifyLibraryResourcesTask$Action
   > Android resource linking failed
     ERROR:/Users/yannick/projects/Recim/build/flutter_unity_widget/intermediates/merged_res/release/values/values.xml:181: AAPT: error: resource android:attr/lStar not found.

Whoever, in debug it works without any problems. I updated the kotlin and gradle version in both projects but I still cannot build in production. Has anyone already seen this error ?

Versions :

  • Tried on Unity 2021.3.23f1 and 2022.3.4f1
  • Flutter 3.7.12 Dart 2.19.6
  • Gradle : Wrapper 7.5 and Build tools 7.4.2
  • Kotlin : 1.7.21

What I already tried:

  • Checked that the compileSdkVersion was up to date
  • Updating and try different version of gradle, kotlin and unity
  • Forcing androidx core version (force 'androidx.core:core-ktx:1.6.0')

Drarox avatar Jul 17 '23 13:07 Drarox

hi,Do you know how to deal with it, I have the same problem.

pen110 avatar Sep 01 '23 01:09 pen110

hii did you solve the problem? I am facing same issue.

Rumanali786 avatar Dec 05 '23 07:12 Rumanali786

Hi there! 👋

I noticed that the compile SDK version in the Flutter Unity package is not up to date. To ensure compatibility and take advantage of the latest features and improvements, I recommend making the following changes:

  1. In the Flutter Unity package:

    • Update the compile SDK version to the latest available. This can be done by modifying the build.gradle file in the Flutter Unity package and setting the compileSdkVersion to the latest SDK version.
  2. In your project:

    • Make sure to update the Flutter Unity package to the latest version that includes the updated compile SDK. You can do this by modifying the pubspec.yaml file in your Flutter project and specifying the updated package version.

By making these changes, you'll ensure that your project is using the most recent compile SDK version, which can help resolve compatibility issues and provide access to the latest Android features.

Rumanali786 avatar Dec 05 '23 09:12 Rumanali786