构建 AAR-flutter 项目时不支持直接本地 .aar 文件依赖

Direct local .aar file dependencies are not supported when building an AAR-flutter project

提问人:Jood Alk 提问时间:5/5/2023 更新时间:5/5/2023 访问量:86

问:

我正在尝试camera_deep_ar插件,我还没有写任何与包相关的内容,我只是想在包含包后运行应用程序。该应用程序现在只包含一个主页,中间有一个按钮,什么都不做......

该应用程序无法编译,它给了我:

Direct local .aar file dependencies are not supported when building an AAR. The resulting
 AAR would be broken because the classes and Android resources from any local .aar file
 dependencies would not be packaged in the resulting AAR. Previous versions of the Android
 Gradle Plugin produce broken AARs in this case too (despite not throwing this error). The
 following direct local .aar file dependencies of the :camera_deep_ar project caused this error:
 C:\Users\USER\AppData\Local\Pub\Cache\hosted\pub.dev\camera_deep_ar 0.0.2+3\android\lib\deepar0.aar

我一步一步地遵循了文档

我觉得有误会,也许是我错过了什么,文档说要在文件中写这一行,所以我在app文件夹中创建了这个文件并写了这一行,然后在我写了这个-keepclassmembers class ai.deepar.ar.DeepAR { *; }proguard-rules.promy_flutter_project/android/app/proguard-rules.probuild.gradle

buildTypes {
release {
    // TODO: Add your own signing config for the release build.
    // Signing with the debug keys for now, so `flutter run --release` works.
    signingConfig signingConfigs.debug
    proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}

我正在使用

  • VS代码
  • Flutter SDK 3.7.12 版本
  • 安卓SDK开发包 32.1.0

那么,我错过了什么?

flutter 插件

评论


答: 暂无答案