Open YanhqZ opened 6 months ago
➤ PM Bot commented:
Jira ticket: RDART-1023
Sounds like you can reproduce this with a brand new project, do you mind uploading/sharing that so that we can look into what's happening?
The repro steps are pretty much the standard install steps and those work, so there's likely something subtle in your setup that's hitting a corner case we didn't guard against.
Sounds like you can reproduce this with a brand new project, do you mind uploading/sharing that so that we can look into what's happening?
The repro steps are pretty much the standard install steps and those work, so there's likely something subtle in your setup that's hitting a corner case we didn't guard against.
https://github.com/yanhq0719/flutter_module.git https://github.com/yanhq0719/RealmAddToApp.git
I am also getting this error
Launching lib/main_development.dart on Redmi Note 8 in debug mode...
Package realm not found in dependencies. Add realm package to your pubspec.yaml
-t, --target-os-type The target OS to install binaries for.
[android, ios, linux, macos, windows]
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':realm:downloadRealmBinaries'.
> Process 'command '/Users/mac/development/flutter/bin/dart'' finished with non-zero exit value 64
That error seems completely unrelated with the original issue.
That error seems completely unrelated with the original issue.
maybe the realm gradle task problem. the [runMetrics] and [downloadRealmBinaries] workingDir point to wrong path.
any update?
We were experiencing the same issue when trying to use flutter as a module. We solved the issue by locking the version of realm, copying and modifying realm's build.gradle (we specified correct relative paths for workingDir
) and then creating a task that would run before each build that overrides the generated realm's build.gradle (in .pub-cache) with our modified one.
It would be really nice if realm had better support for this. Acquiring the path for workingDir
via an environmental variable or reading it from local.properties.
We were experiencing the same issue when trying to use flutter as a module. We solved the issue by locking the version of realm, copying and modifying realm's build.gradle (we specified correct relative paths for
workingDir
) and then creating a task that would run before each build that overrides the generated realm's build.gradle (in .pub-cache) with our modified one.It would be really nice if realm had better support for this. Acquiring the path for
workingDir
via an environmental variable or reading it from local.properties.
Thanks for your comment, we adopt simlar way (fork repository and modifying realm's build.gradle) to solve this issue in the past period. Fortunately, at this moment we had achieved whole flutter-developed application so wo can get rid of this. But i believe before realm team proposing a solution, your solution should be the best answer
Having the same problem on a MacOS project.
What happened?
Repro steps
1.create a flutter module project(ep.realm_flutter_modules) and add realm dependency ` dependencies: flutter: sdk: flutter
...
realm: ^2.2.1 ` 2.create a android project(ep.RealmAddToApp) and follow the doc
3.run. then see build failed...
Version
3.19.3
What Atlas Services are you using?
Local Database only
What type of application is this?
Flutter Application
Client OS and version
Android Studio Iguana | 2023.2.1
Code snippets
Host App(RealmAddToApp) flutter_settings.gradle
setBinding(new Binding(["gradle": this])) evaluate(new File( settingsDir.parentFile, "realm_flutter_modules/.android/include_flutter.groovy" ))
settings.gradle.kts
//... apply { from("flutter_settings.gradle") } //...
build.gradle.kts(app)//... dependencies { //... implementation(project(":flutter")) //... } //...
Stacktrace of the exception/crash you're getting
No response
Relevant log output
No response