无法解析配置“:_armv7DebugCompile”的所有依赖项

Could not resolve all dependencies for configuration ':_armv7DebugCompile'

尝试使用 cordova 和 cordova-crosswalk 插件构建 android 应用程序时出现以下错误:

FAILURE: Build failed with an exception.

* What went wrong:
A problem occurred configuring root project 'android'.
> Could not resolve all dependencies for configuration ':_armv7DebugCompile'.
   > Could not find any version that matches com.android.support:support-v4:+.
     Searched in the following locations:
         https://repo1.maven.org/maven2/com/android/support/support-v4/maven-metadata.xml
         https://repo1.maven.org/maven2/com/android/support/support-v4/
         https://download.01.org/crosswalk/releases/crosswalk/android/maven2/com/android/support/support-v4/maven-metadata.xml
         https://download.01.org/crosswalk/releases/crosswalk/android/maven2/com/android/support/support-v4/
     Required by:
         :android:unspecified

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.

BUILD FAILED

Total time: 2.918 secs

/home/remi/dev/git/gitlab/sirap-sas/tereo-mobile/platforms/android/cordova/node_modules/q/q.js:126
                    throw e;
                          ^
Error code 1 for command: /home/remi/dev/git/gitlab/sirap-sas/tereo-mobile/platforms/android/gradlew with args: cdvBuildDebug,-b,/home/remi/dev/git/gitlab/sirap-sas/tereo-mobile/platforms/android/build.gradle,-PcdvBuildArch=arm,-Dorg.gradle.daemon=true
ERROR running one or more of the platforms: Error: /home/remi/dev/git/gitlab/sirap-sas/tereo-mobile/platforms/android/cordova/run: Command failed with exit code 1
You may not have the required environment or OS to run this project

请注意该部分:

Could not resolve all dependencies for configuration ':_armv7DebugCompile'.

这可能是因为使用 crosswalk 插件 构建一个 android 项目试图构建两个 apks:一个用于 ARM,其他 x86.

解决方案是安装 Android 支持存储库:

  • 打开 SDK 管理器(从命令行输入 android)。
  • Extras 下,确保您已下载 Android Support RepositoryGoogle Repository

对我来说解决方案是: 我将人行横道更新为@15.44.384.13

ionic browser add crosswalk@15.44.384.13

然后我改了config.xml:

<preference name="xwalkVersion" value="15+" />

因为版本 “16+” - “18+” 不适合我

更新答案

似乎从 人行横道 16Android Support RepositoryGoogle Repository 开始还不够。

You need to install Local Maven repository for Support Libraries from Extras as well.

当您没有在 extras 下包含 google 支持存储库和 android 支持存储库时,可能是问题所在。以及当您不使用 cordova platform.because 更新 cordova 时,cordova 和 cordova 平台必须使用最新的 version.update 您的 Cordova 与 npm update cordova -g --save 和 cordova 平台与 cordova 平台更新 platform_name(如 android)。

This worked for me 

1.goto platforms\android\cordova-plugin-crosswalk-webview folder

2.Open .gradle file

3.find


    dependencies { compile xwalkSpec }

and replace with 

dependencies {
compile 'org.xwalk:xwalk_core_library:22.52.561.4' 
}

**

注意:22.52.561.4 是您机器上的人行横道版本 要知道它,打开 ionic 应用程序,chrome://inspect 然后

window.navigator.userAgent

这将打印一些行,从那里复制 xwalk 详细信息

我知道现在添加答案有点晚了。但我面对这个问题很长时间了,none 这些步骤解决了它。如果您的 IP 来自伊朗,那么您应该使用 VPN 构建您的项目。似乎某些国家/地区禁止依赖项。