Important: I'm a novice
**Everything works fine with Form Builder ^3.14.1
When upgrading to ^4.0.2, this is the error message:**
`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
/Users/mgav/AndroidStudioProjects/streakers_journal_beta/build/file_picker/intermediates/library_manifest/debug/AndroidManifest.xml:9:5-15:15: AAPT: error: unexpected elementfound 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 11s
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 file_picker...
Running Gradle task 'assembleAarRelease'...
FAILURE: Build failed with an exception.
What went wrong:
A problem occurred configuring root project 'file_picker'.
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 0s
Exception: The plugin file_picker could not be built due to the issue above.
`
Also, when I add cloud_firestore: ^0.14.4 to pubspec.yaml, this is the revised error message:
`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
/Users/mgav/AndroidStudioProjects/streakers_journal_beta/build/file_picker/intermediates/library_manifest/debug/AndroidManifest.xml:9:5-15:15: AAPT: error: unexpected elementfound 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 10s
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 cloud_firestore...
Running Gradle task 'assembleAarRelease'...
Exception: The plugin cloud_firestore could not be built due to the issue above.
**BACKGROUND: when I runflutter doctor -v` (terminal), here's the result:**
`[✓] Flutter (Channel stable, 1.22.4, on Mac OS X 10.14.6 18G6020 darwin-x64, locale en-US)
• Flutter version 1.22.4 at /Users/mgav/Developer/flutter
• Framework revision 1aafb3a8b9 (4 weeks ago), 2020-11-13 09:59:28 -0800
• Engine revision 2c956a31c0
• Dart version 2.10.4
[✓] Android toolchain - develop for Android devices (Android SDK version 30.0.1)
• Android SDK at /Users/mgav/Library/Android/sdk
• Platform android-30, build-tools 30.0.1
• Java binary at: /Applications/Android Studio.app/Contents/jre/jdk/Contents/Home/bin/java
• Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b3-6222593)
• All Android licenses accepted.
[!] Xcode - develop for iOS and macOS
✗ Xcode installation is incomplete; a full installation is necessary for iOS development.
Download at: https://developer.apple.com/xcode/download/
Or install Xcode via the App Store.
Once installed, run:
sudo xcode-select --switch /Applications/Xcode.app/Contents/Developer
sudo xcodebuild -runFirstLaunch
• CocoaPods version 1.10.0
[✓] Android Studio (version 4.0)
• Android Studio at /Applications/Android Studio.app/Contents
• Flutter plugin version 48.1.2
• Dart plugin version 193.7547
• Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b3-6222593)
[✓] Connected device (1 available)
• sdk gphone x86 arm (mobile) • emulator-5554 • android-x86 • Android 11 (API 30) (emulator)
! Doctor found issues in 1 category.
`
I'm only working in Android for now, so this error shouldn't matter
Had the same and resolved it with:
adding
buildToolsVersion = "29.0.3"
compileSdkVersion = 29
to the defaultConfig of my apps build.gradle and changing
classpath 'com.android.tools.build:gradle:4.1.0'
in my projects build.gradle
I also changed
distributionUrl=https\://services.gradle.org/distributions/gradle-6.5-all.zip
in my gradle-wrapper.properties file
@akreienbring gives good advice.
@mgav The example app code and configuration were recently updated (#620), and it demonstrates that a clean Android build is possible:
https://github.com/danvick/flutter_form_builder/commit/c2b63433778187cd9258499f1bf5f53781fa3ffa#diff-50d858e0985ecc7f60418aaf0cc5ab587f42c2570a884095a9e8ccacd0f6545c
These versions are not the only working combination, but these were the latest release versions, and they work.
Closing since this issue duplicates #613.
Thank you so much @awhitford and @akreienbring!
Most helpful comment
Had the same and resolved it with:
adding
to the defaultConfig of my apps build.gradle and changing
in my projects build.gradle
I also changed
in my gradle-wrapper.properties file