Home > Enterprise >  How to fix a build failure from trying a Flutter Chaquopy tutorial?
How to fix a build failure from trying a Flutter Chaquopy tutorial?

Time:10-21

I'm trying to follow this tutorial: https://pub.dev/packages/chaquopy and I'm having troubles getting it to run. I followed the code in the example tab and changed the buttons to text buttons. I added the dependencies as described in the Readme tab up until it says to sync the project (added things to android\build.gradle, android\app\build.gradle, and AndroidManifest.xml). When I tried to build the project using the Run button in Android Studio (which I think is what it means by sync the project), I get a build failure.

This is the build failure:

FAILURE: Build failed with an exception.

* What went wrong:
A problem occurred configuring root project 'android'.
> Could not resolve all files for configuration ':classpath'.
   > Could not find com.chaquo.python:gradle:latest-version.
     Searched in the following locations:
       - https://dl.google.com/dl/android/maven2/com/chaquo/python/gradle/latest-version/gradle-latest-version.pom
       - https://jcenter.bintray.com/com/chaquo/python/gradle/latest-version/gradle-latest-version.pom
       - https://chaquo.com/maven/com/chaquo/python/gradle/latest-version/gradle-latest-version.pom
     Required by:
         project :

* 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 6s
Exception: Gradle task assembleDebug failed with exit code 1

Could someone please help me determine what might be the reason why I'm getting this failure? I followed the linked tutorial as best I could.

CodePudding user response:

"latest-version" is a placeholder. You should replace it with the actual latest version from this list.

  • Related