我正在尝试在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 foundGithub回购:https://github.com/JideGuru/Folioreader-Android
感谢您忍耐到这里...:)
发布于 2021-01-25 20:53:21
您需要配置app level Gradle,如下所示
android {
.....
lintOptions {
checkReleaseBuilds false
// Or, if you prefer, you can continue to check for errors in release builds,
// but continue the build even when errors are found:
abortOnError false
}
}https://stackoverflow.com/questions/65877979
复制相似问题