【发布时间】:2021-01-25 01:51:53
【问题描述】:
我正在尝试在 Android Flutter 插件中包含 FolioReader-Android 库。它适用于调试 APK,但是当我尝试构建发布 APK 时
Execution failed for task ':app:lintVitalRelease'.
> Could not resolve all artifacts for configuration ':epub_viewer:profileRuntimeClasspath'.
> Could not resolve project :folioreader.
Required by:
project :epub_viewer
> Cannot choose between the following variants of project :folioreader:
- debugAndroidTestCompile
- debugAndroidTestRuntime
- debugRuntime
- debugUnitTestCompile
- debugUnitTestRuntime
- releaseRuntime
- releaseUnitTestCompile
- releaseUnitTestRuntime
All of them match the consumer attributes:
- Variant 'debugAndroidTestCompile' capability com.jideguru:folioreader:0.6.2:
- Unmatched attributes:
- Required com.android.build.api.attributes.BuildTypeAttr 'profile' but no value provided.
- Required com.android.build.gradle.internal.dependency.AndroidTypeAttr 'Aar' but no value provided.
- Required org.gradle.usage 'java-runtime' but no value provided.
- Found org.jetbrains.kotlin.localToProject 'local to :folioreader' but wasn't required.
- Found org.jetbrains.kotlin.platform.type 'androidJvm' but wasn't required
(Repeated for all variants)
现在,如果我尝试更改我的实现配置,即
来自implementation project(path: ':folioreader')这个
到implementation project(path: ':folioreader', configuration: 'default')
我开始在库本身中收到以下错误
error: cannot access Locator
ReadLocator readLocator = ReadLocator.fromJson(location);
^
class file for org.readium.r2.shared.Locator not found
Github 仓库:https://github.com/JideGuru/Folioreader-Android
感谢您一直到这里...:)
【问题讨论】:
-
嗨 rupa,我在做同样的工作,但我的颤振库没有构建它,给出了这个错误,知道该怎么做吗?评估项目“:epub_viewer”时出现问题。 > 在项目 ':epub_viewer' 中找不到路径为 ':folioreader' 的项目。 implementation project(path: ':folioreader') 在 build.gradle 和 setting.gradle 中可用: rootProject.name = 'epub_viewer' include ':folioreader' 我真的有货,不知道该怎么办 :(
标签: android gradle build.gradle flutter-plugin