-
Notifications
You must be signed in to change notification settings - Fork 185
Closed
Labels
Description
Originally posted by @arnavpon in #94 (comment)
Hi Malcolm,
I'm building a Flutter plugin that requires chaquopy as a dependency, but having a lot of trouble correctly configuring the build.gradle file. The main issue is that there's only one build.gradle in a Flutter plugin's android module (there's no app-specific build.gradle), so I tried to add all the necessary configuration to this file. When I try to build, here's the error I'm getting:
FAILURE: Build failed with an exception.
* What went wrong:
Could not determine the dependencies of task ':pydroid:bundleDebugAar'.
> Could not resolve all files for configuration ':pythonRuntimeJava'.
> Could not find com.chaquo.python.runtime:chaquopy_java:11.0.0.
Searched in the following locations:
- https://dl.google.com/dl/android/maven2/com/chaquo/python/runtime/chaquopy_java/11.0.0/chaquopy_java-11.0.0.pom
- https://repo.maven.apache.org/maven2/com/chaquo/python/runtime/chaquopy_java/11.0.0/chaquopy_java-11.0.0.pom
Required by:
project :
And the build.gradle file:
buildscript {
repositories {
google()
mavenCentral()
maven { url "https://chaquo.com/maven" }
}
dependencies {
classpath 'com.android.tools.build:gradle:4.1.0'
classpath "com.chaquo.python:gradle:11.0.0"
}
}
rootProject.allprojects {
repositories {
google()
mavenCentral()
}
}
apply plugin: 'com.android.library'
apply plugin: 'com.chaquo.python'
android {
compileSdkVersion 30
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
defaultConfig {
minSdkVersion 16
ndk {
abiFilters "armeabi-v7a", "arm64-v8a", "x86", "x86_64"
}
python {
buildPython "~/opt/anaconda3/envs/chaquopy/bin/python3.8"
pip {
install 'numpy'
}
}
}
}
Apologies in advance if I'm making an obvious error - I'm new to Android development. Thank you!
Reactions are currently unavailable