我正在开发 android 本机应用程序,我为他们准备了一个库项目,其中包含这些应用程序的所有常用工具。我正在使用 jfrog artifactory 导入我的库,并且运行良好;现在我想使用git 和 sub-module将我的库作为一个模块放在我的项目中,以便能够同时在应用程序和库上工作。但是现在(在我的项目中包含两个模块(应用程序和库)),构建失败......我之前尝试了很多东西在这里寻求帮助......我认为问题来自两个模块之间的重复依赖关系因为没有库子模块构建是可以的。
这是堆栈跟踪的开头:
C:\Users\sri\.gradle\caches\transforms-2\files-2.1\841047937c984e1ac263db2768d03619\jetified-objenesis-3.0.1.jar: D8: MethodHandle.invoke and MethodHandle.invokeExact are only supported starting with Android O (--min-api 26)
Stack trace:
com.android.tools.r8.errors.a: MethodHandle.invoke and MethodHandle.invokeExact are only supported starting with Android O (--min-api 26)
at com.android.tools.r8.errors.a.a(:7)
...........
//end
* What went wrong:
Execution failed for task ':app:dexBuilderDebug'.
> There was a failure while executing work items
> A failure occurred while executing com.android.build.gradle.internal.dexing.DexWorkAction
> Failed to process: C:\Users\sri\.gradle\caches\transforms-2\files-2.1\841047937c984e1ac263db2768d03619\jetified-objenesis-3.0.1.jar …Run Code Online (Sandbox Code Playgroud)