Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Provider_shopper fails to build / deploy to android emulator #49

Open
clarkezone opened this issue Jun 1, 2023 · 4 comments
Open

Provider_shopper fails to build / deploy to android emulator #49

clarkezone opened this issue Jun 1, 2023 · 4 comments

Comments

@clarkezone
Copy link

I have the latest android studio and flutter:

(base) jamesclarke@Jamess-Air provider_shopper % flutter --version
Flutter 3.10.2 • channel stable • https://github.com/flutter/flutter.git
Framework • revision 9cd3d0d9ff (9 days ago) • 2023-05-23 20:57:28 -0700
Engine • revision 90fa3ae28f
Tools • Dart 3.0.2 • DevTools 2.23.1

base) jamesclarke@Jamess-Air provider_shopper % flutter doctor
Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel stable, 3.10.2, on macOS 13.3.1 22E772610a darwin-arm64, locale en-US)
[✓] Android toolchain - develop for Android devices (Android SDK version 33.0.2)
[✓] Xcode - develop for iOS and macOS (Xcode 14.3)
[✓] Chrome - develop for the web
[✓] Android Studio (version 2022.2)
[✓] VS Code (version 1.78.2)
[✓] Connected device (3 available)
[✓] Network resources

• No issues found!

Fresh clone of this repo and attempted to run provider_shopper on the android emulator but it's failing:
(base) jamesclarke@Jamess-Air provider_shopper % flutter run -d emulator-5554
Using hardware rendering with device sdk gphone64 arm64. If you notice graphics artifacts, consider enabling software rendering with "--enable-software-rendering".
Launching lib/main.dart on sdk gphone64 arm64 in debug mode...
Warning: Mapping new ns http://schemas.android.com/repository/android/common/02 to old ns http://schemas.android.com/repository/android/common/01
Warning: Mapping new ns http://schemas.android.com/repository/android/generic/02 to old ns http://schemas.android.com/repository/android/generic/01
Warning: Mapping new ns http://schemas.android.com/sdk/android/repo/addon2/02 to old ns http://schemas.android.com/sdk/android/repo/addon2/01
Warning: Mapping new ns http://schemas.android.com/sdk/android/repo/addon2/03 to old ns http://schemas.android.com/sdk/android/repo/addon2/01
Warning: Mapping new ns http://schemas.android.com/sdk/android/repo/repository2/02 to old ns http://schemas.android.com/sdk/android/repo/repository2/01
Warning: Mapping new ns http://schemas.android.com/sdk/android/repo/repository2/03 to old ns http://schemas.android.com/sdk/android/repo/repository2/01
Warning: Mapping new ns http://schemas.android.com/sdk/android/repo/sys-img2/03 to old ns http://schemas.android.com/sdk/android/repo/sys-img2/01
Warning: Mapping new ns http://schemas.android.com/sdk/android/repo/sys-img2/02 to old ns http://schemas.android.com/sdk/android/repo/sys-img2/01
Realm binaries for realm@1.1.0 already downloaded
Realm install command finished.

FAILURE: Build failed with an exception.

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

Unable to make field private final java.lang.String java.io.File.path accessible: module java.base does not "opens java.io" to unnamed module @37aa9fdc

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

BUILD FAILED in 7s
Running Gradle task 'assembleDebug'... 8.4s
Exception: Gradle task assembleDebug failed with exit code 1
(base) jamesclarke@Jamess-Air provider_shopper %

@desistefanova
Copy link
Contributor

Hi @clarkezone!
I think it will help if you delete android folder under the app provider_shopper and re-create it again with running:
flutter create --platforms ios . under provider_shopper folder.
Meanwhile we will update the platforms in our samples.
Thanks for reporting!

@clarkezone
Copy link
Author

That fixed it thx!

@clarkezone
Copy link
Author

@desistefanova although.. same workaround isn't working for macos version flexible sync sample.. the app builds and runs with the fix but window draws black.

@desistefanova
Copy link
Contributor

@clarkezone, this is a bug in the sample. We should have waited downloading the realm to complete and then to continue.
You can just add await realm.syncSession.waitForDownload(); after await realm.subscriptions.waitForSynchronization();
We have just fixed this here:
https://github.com/realm/realm-dart-samples/blob/536132076b4b91c3871c77e8214b14b2e8f6f0b2/flutter_flexible_sync/lib/main.dart#LL44C3-L44C45

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants