编程语言
首页 > 编程语言> > 更新到Android Studio 3.0后无法运行Ionic应用程序

更新到Android Studio 3.0后无法运行Ionic应用程序

作者:互联网

这是我的离子信息

cli packages: (/Users/billb/dev/customer-mkt-app/node_modules)

@ionic/cli-utils  : 1.15.2
ionic (Ionic CLI) : 3.15.2

全球套餐:

cordova (Cordova CLI) : 7.0.1

本地包裹:

@ionic/app-scripts : 3.0.1
Cordova Platforms  : android 6.2.3 ios 4.4.0
Ionic Framework    : ionic-angular 3.3.0

系统:

Android SDK Tools : 26.1.1
ios-deploy        : 1.9.2
Node              : v6.11.5
npm               : 3.10.10
OS                : macOS Sierra
Xcode             : Xcode 9.0.1 Build version 9A1004

环境变量:

ANDROID_HOME : /Users/billb/Library/Android/sdk

其他:

backend : pro

我可以成功构建应用程序.当我尝试在Android Studio中打开它时,我收到了一些错误,主要是围绕一个gradle同步失败.这是Messages控制台中的5个错误.

Unable to resolve dependency for ‘:@debug/compileClasspath’: Could not resolve project :CordovaLib.
Could not resolve project :CordovaLib.

Required by:
project :

Project : declares a dependency from configuration ‘debugCompile’ to configuration ‘debug’ which is not declared in the descriptor for project >:CordovaLib.

Unable to resolve dependency for ‘:@debugAndroidTest/compileClasspath’: Could not resolve project :CordovaLib.
Could not resolve project :CordovaLib.

Required by:
project :

Project : declares a dependency from configuration ‘debugCompile’ to configuration ‘debug’ which is not declared in the descriptor for project >:CordovaLib.

Unable to resolve dependency for ‘:@debugUnitTest/compileClasspath’: Could not resolve project :CordovaLib.
Could not resolve project :CordovaLib.

Required by:
project :

Project : declares a dependency from configuration ‘debugCompile’ to configuration ‘debug’ which is not declared in the descriptor for project >
:CordovaLib.

Unable to resolve dependency for ‘:@release/compileClasspath’: Could not resolve project :CordovaLib.

Could not resolve project :CordovaLib.
Required by:
project :

Project : declares a dependency from configuration ‘releaseCompile’ to configuration ‘release’ which is not declared in the descriptor for project :CordovaLib.

Unable to resolve dependency for ‘:@releaseUnitTest/compileClasspath’: Could not resolve project :CordovaLib.

Could not resolve project :CordovaLib.
Required by:
project :

Project : declares a dependency from configuration ‘releaseCompile’ to configuration ‘release’ which is not declared in the descriptor for project :CordovaLib.

我真的不知道这意味着什么,谷歌没有任何真正的帮助.我需要做什么?

注意:发布此内容后发现此内容.在此将其转发,以防它可以帮助其他人.

Don’t upgrade to Android Studio 3

解决方法:

我在build.gradle文件中注释了下面的行:

//debugCompile project(path: 'CordovaLib', configuration: 'debug') 

//releaseCompile project(path: 'CordovaLib', configuration: 'release')

并补充说:

compile project(':CordovaLib')

这对我有用.

标签:android,gradle,cordova,ionic3
来源: https://codeday.me/bug/20190930/1834697.html