无法解析项目:CordovaLib [英] Could not resolve project: CordovaLib

查看:393
本文介绍了无法解析项目:CordovaLib的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在学习如何使用cordova来构建应用程序,并且目前可以通过Google chrome浏览器模拟移动屏幕.我正在尝试在需要使用Android Studio(已下载3.0稳定版)的android平台上对其进行测试.导入项目后, Gradle项目同步失败,并且似乎存在解决CordovaLib依赖关系的问题.见下图

I'm learning how to build app using cordova and I'm currently able to emulate a mobile screen via google chrome browser. I'm attempting to test it on android platform which requires using Android studio (downloaded the 3.0 stable version). After importing the project, Gradle project sync failed and there seems to be issues resolving some dependencies for CordovaLib. See image below

我在这里浏览了几篇文章,但仍然找不到解决方案,或者考虑到这是我第一次学习它,所以我可能遗漏了要点.以下是

I have gone through several post here and still haven't been able to find a solution or maybe I'm missing the point considering that this is my first time learning with it. Below are the settings for

build.gradle(模块:CordovaLib)

build.gradle(Module: CordovaLib)

and build.gradle(模块:android)

and build.gradle(Module: android)

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

Please how do i fix the issue and run my app in an emulator?

推荐答案

Is a typical error of migration, please read the paragraph 'Migrate dependency configurations for local modules':

您应改为按以下方式配置依赖项:

You should instead configure your dependencies as follows:

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'
}

这篇关于无法解析项目:CordovaLib的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆