无法解析项目:CordovaLib

2023-12-29

我正在学习如何使用 cordova 构建应用程序,目前我可以通过 google chrome 浏览器模拟移动屏幕。我正在尝试在android平台上测试它,这需要使用Android studio(下载了3.0稳定版本)。导入项目后,Gradle 项目同步失败并且在解决 CordovaLib 的某些依赖项时似乎存在问题。见下图

我已经在这里阅读了几篇文章,但仍然无法找到解决方案,或者考虑到这是我第一次学习它,也许我错过了要点。以下是设置

build.gradle(模块:CordovaLib)

和 build.gradle(模块:android)

请问我该如何解决问题并在模拟器中运行我的应用程序?


一个典型的错误是移民 https://developer.android.com/studio/build/gradle-plugin-3-0-0-migration.html,请阅读“迁移本地模块的依赖配置”段落:

您应该按如下方式配置依赖项:

dependencies {
// This is the old method and no longer works for local
// library modules:
// debugImplementation project(path: ':library', configuration: 'debug')
// releaseImplementation project(path: ':library', configuration: 'release')

// Instead, simply use the following to take advantage of
// variant-aware dependency resolution. You can learn more about
// the 'implementation' configuration in the section about
// new dependency configurations.
implementation project(':library')

// You can, however, keep using variant-specific configurations when
// targeting external dependencies. The following line adds 'app-magic'
// as a dependency to only the "debug" version of your module.

debugImplementation 'com.example.android:app-magic:12.3'
}
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)

无法解析项目:CordovaLib 的相关文章

随机推荐