Closed silencezwm closed 3 years ago
My Flutter 1.12.13+hotfix.5 • channel stable •
I hope that I am not hijacking this thread, but I believe that I have a "related" issue.
I use flutter_sodium myself and now with the new flutter version (Same as silencezwm "1.12.13+hotfix.5") I have a problem to build my APK:
2769 FAILURE: Build failed with an exception.
2770 * What went wrong:
2771 Execution failed for task ':flutter_sodium:verifyReleaseResources'.
2772 > java.util.concurrent.ExecutionException: com.android.builder.internal.aapt.v2.Aapt2Exception: Android resource linking failed
2773 /builds/app/build/flutter_sodium/intermediates/res/merged/release/values/values.xml:236: error: resource android:attr/fontVariationSettings not found.
2774 /builds/app/build/flutter_sodium/intermediates/res/merged/release/values/values.xml:237: error: resource android:attr/ttcIndex not found.
2775 error: failed linking references.
2776 * Try:
2777 Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
2778 * Get more help at https://help.gradle.org
2779 BUILD FAILED in 6m 58s
2780 Running Gradle task 'assembleRelease'... 420.2s (!)
2781 Gradle task assembleRelease failed with exit code 1
I have investigated and found this: https://github.com/flutter/flutter/issues/27226
Long story short. All plugins have to update compileSdkVersion to 28.
I created here a PR https://github.com/chickahoona/flutter_sodium/tree/upgrade-to-compilesdk-28
I have now temporary replaced your version of flutter with my modification:
I leave this to others, as it might be helpful.
dependencies:
....
flutter_sodium:
git:
url: git://github.com/chickahoona/flutter_sodium.git
ref: upgrade-to-compilesdk-28
....
This is no longer an issue with the current FFI implementation
The plugin
flutter_sodium
is built using an older version of the Android plugin API which assumes that it's running in a full-Flutter environment. It may have undefined behaviors when Flutter is integrated into an existing app as a module. The plugin can be updated to the v2 Android Plugin APIs by following https://flutter.dev/go/android-plugin-migration. Process finished with exit code 0