I’m completely new to flutter and all the concepts behind building android apps. So I thought I’d follow the budget_tracker tutorial: https://docs.amplify.aws/flutter/start/getting-started/setup/
After running flutter create budget_tracker
and adding all the dependencies to my pubspec.yaml
(no reason to copy/paste, please check link for context), I ran flutter run
against flutter-emulator (android-arm64 emulator)
FAILURE: Build failed with an exception.
What went wrong:
Could not determine the dependencies of task ‘:amplify_secure_storage:compileDebugJavaWithJavac’.
Could not determine the dependencies of null.
Cannot query the value of this provider because it has no value available.
I thought, oh right, might need to do additional setup before it works, so headed to the Platform setup [Android]
section (again, check link for reference), and mimicked the setup, then ran flutter run
again I get this;
FAILURE: Build failed with an exception.
Where:
Build file ‘/Users/******/code/personal/budget_tracker/android/build.gradle’ line: 21What went wrong:
A problem occurred evaluating root project ‘android’.
Could not find method classpath() for arguments [com.android.tools.build:gradle:7.4.2] on object of type org.gradle.api.internal.artifacts.dsl.dependencies.DefaultDependencyHandler.
If I nuke everything and start fresh with flutter create budget_tracker
it has no problems running in the emulator, but as soon as I add amplify_flutter
everything goes boom.
I’ve tried the versions listed in the guide (^1.0.0) as well as 1.6.0, and 1.8.0 but I just can’t get it to work.
Anyone who’s been able to get passed this?
This is my flutter doctor
output (omitting irrelevant data)
✅ Flutter (Channel stable, 3.19.6, on macOS 14.3 23D56 darwin-arm64)
✅ Android toolchain - develop for Android devices (Android SDK version 34.0.0)
✅ Android Studio (version 2023.2)
✅ VS Code (version 1.88.1)
✅ Network resources
I’ve tried this tutorial as well:
https://aws.amazon.com/getting-started/hands-on/build-flutter-mobile-app-part-one/module-two/
And it goes boom as soon as I try to run it as well (same as the first issue in this post but for another aws package)
bump versions, follow official tutorial, upgrade android studio