flutter_form_builder icon indicating copy to clipboard operation
flutter_form_builder copied to clipboard

FormBuilder 4.0.2 Failed to Build caused by File_Picker

Open byzramku opened this issue 6 years ago • 5 comments

My Flutter Doctor :

`Doctor summary (to see all details, run flutter doctor -v): [√] Flutter (Channel stable, 1.22.4, on Microsoft Windows [Version 10.0.19041.630], locale en-ID)

[√] Android toolchain - develop for Android devices (Android SDK version 30.0.2) [√] Android Studio (version 4.0) [√] IntelliJ IDEA Community Edition (version 2019.2) [√] Connected device (1 available)

• No issues found!`

Flutter Run :

`FAILURE: Build failed with an exception.

  • What went wrong: Execution failed for task ':app:processDebugResources'.

A failure occurred while executing com.android.build.gradle.internal.tasks.Workers$ActionFacade Android resource linking failed D:\app-flutter\Project\elapor_app_test\super_flutter\build\file_picker\intermediates\library_manifest\debug\AndroidManifest.xml:9:5-15:15: AAPT: error: unexpected element found in .

  • Try: 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.

  • Get more help at https://help.gradle.org

BUILD FAILED in 27s Running Gradle task 'assembleDebug'...
Running Gradle task 'assembleDebug'... Done 28.0s The built failed likely due to AndroidX incompatibilities in a plugin. The tool is about to try using Jetfier to solve the incompatibility. Building plugin camera... Running Gradle task 'assembleAarRelease'...
Running Gradle task 'assembleAarRelease'... Done 1.8s

FAILURE: Build failed with an exception.

  • What went wrong: A problem occurred configuring root project 'camera'.

SDK location not found. Define location with sdk.dir in the local.properties file or with an ANDROID_HOME environment variable.

  • Try: 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.

  • Get more help at https://help.gradle.org

BUILD FAILED in 1s

Exception: The plugin camera could not be built due to the issue above.`

byzramku avatar Dec 03 '20 04:12 byzramku

I do have the same problem ...

Ashkan-Oliaie avatar Dec 03 '20 12:12 Ashkan-Oliaie

According to this comment:

Error - " AAPT: error: unexpected element found in . " , I was able to solve it by upgrading the build Gradle version.

Please see flutter_file_picker's Troubleshooting guide on their wiki.

What version of Gradle are you using?

awhitford avatar Dec 03 '20 20:12 awhitford

According to this comment:

Error - " AAPT: error: unexpected element found in . " , I was able to solve it by upgrading the build Gradle version.

Please see flutter_file_picker's Troubleshooting guide on their wiki.

What version of Gradle are you using?

I've tried with 5.4 I assume , and also with 6.1 both didn't work for me. For now I ended up using v3.10.0.

Ashkan-Oliaie avatar Dec 04 '20 08:12 Ashkan-Oliaie

PR #620 added CI steps to build the example for Android and iOS in order to proactively detect this issue.

You will notice that I had to adjust a couple of Android build configurations: https://github.com/danvick/flutter_form_builder/commit/c2b63433778187cd9258499f1bf5f53781fa3ffa I used the latest release versions. (Other combinations also work, but I prefer the latest and greatest stable release when possible.)

awhitford avatar Dec 05 '20 08:12 awhitford

Closing this issue since it really isn't an issue with Flutter Form Builder. If you have this issue, please double-check your Gradle version and Android build settings.

awhitford avatar Dec 05 '20 08:12 awhitford