安卓导入flutter module 报错,可build,无法运行
c.png
Execution failed for task ':app:mergeDebugJavaResource'.
> Could not resolve all files for configuration ':app:debugRuntimeClasspath'.
> Could not find flutter-1.0-debug.jar (com.example.my_flutter:flutter:1.0).
Searched in the following locations:
file:/xxx/MyApplication/app/libs/com/example/my_flutter/flutter/1.0/flutter-1.0-debug.jar
Possible solution:
- Declare repository providing the artifact, see the documentation at https://docs.gradle.org/current/userguide/declaring_repositories.html
flutter module 执行 flutter build aar,如下图
a.png
按照控制台信息进行配置后,发现报错
解决,修改如下
b.png
这里也标注一下,关于arr配置路径,
allprojects{
repositories {
maven{
url './libs'//将arr的目录,从repo文件下所有文件拷贝到项目libs下
}
// maven {
// url './../../my_flutter/build/host/outputs/repo'//相对路径,可以正常运行
// }
maven {
url "https://mirrors.cloud.tencent.com/flutter/download.flutter.io"//镜像
}
}
}
网友评论