Back

[SOLVED] Error after adding Appwrite to Pubscpec.yaml FLUTTER

  • 1
  • Flutter
Chewbacca
19 Mar, 2023, 11:11

Hi guys. I have very interesting problem. Right after adding AppWrite dependencies to pabspec.yaml in my Flutter project I get givven this error:

TL;DR
After adding Appwrite to the pubspec.yaml file in a Flutter project, an error occurs. Here's the solution: 1. Open the `build.gradle` file in `android/app` directory of your Flutter project. 2. Replace the `dependencies` block with the provided code. 3. Save the file and run `flutter clean`. 4. Run `dart pub get` and `flutter pub get`. 5. Run your project. The error should be resolved now.
safwan
19 Mar, 2023, 11:15

This is an error I came across as well. Here's how to fix it:

  1. In your Flutter project, navigate to android/app and open the build.gradle file.
  2. Scroll all the way down to where you see the dependencies {} code block.
  3. Replace the full dependencies block with the following code:
TypeScript
dependencies {
    constraints {
        implementation("org.jetbrains.kotlin:kotlin-stdlib-jdk7:1.8.0") {
            because("kotlin-stdlib-jdk7 is now a part of kotlin-stdlib")
        }
        implementation("org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.8.0") {
            because("kotlin-stdlib-jdk8 is now a part of kotlin-stdlib")
        }
    }
}
  1. Save the file, and run flutter clean from your project root. Follow it up with dart pub get and flutter pub get to install all the dependencies that were cleaned.
  2. Run your project 🤞🏻
safwan
19 Mar, 2023, 11:17

@Chewbacca @Samuel Kings Let me know if this works!

Chewbacca
19 Mar, 2023, 11:18

I will try it, thanks

Chewbacca
19 Mar, 2023, 11:26

@safwan thank you very much, It works

safwan
19 Mar, 2023, 11:27

Glad it does! Can you change the title of this post to [SOLVED] Error after adding Appwrite to Pubscpec.yaml FLUTTER

Chewbacca
19 Mar, 2023, 11:28

okay

Chewbacca
19 Mar, 2023, 11:28

[SOLVED] Error after adding Appwrite to Pubscpec.yaml FLUTTER

Samuel Kings
19 Mar, 2023, 11:49

@safwan Thanks a lot. Works like magic

safwan
19 Mar, 2023, 11:58

glad it helped!

Reply

Reply to this thread by joining our Discord

Reply on Discord

Need support?

Join our Discord

Get community support by joining our Discord server.

Join Discord

Get premium support

Join Appwrite Pro and get email support from our team.

Learn more