构建Android应用程序时出错(cordova-plugin-crosswalk-webview)

时间:2017-09-03 17:40:49

标签: android cordova ionic-framework webview

λ cordova build android
ANDROID_HOME=C:\Users\yiiwe\AppData\Local\Android\sdk
JAVA_HOME=C:\Program Files\Java\jdk1.8.0_131
Subproject Path: CordovaLib
null
The Task.leftShift(Closure) method has been deprecated and is scheduled to be removed in Gradle 5.0. Please use Task.doLast(Action) instead.
        at build_a8zaoms8z5a2cue9ld42c2tqy.run(C:\Users\yiiwe\Desktop\crypt2\platforms\android\build.gradle:138)
org.xwalk:xwalk_core_library:23+
The JavaCompile.setDependencyCacheDir() method has been deprecated and is scheduled to be removed in Gradle 4.0.
Incremental java compilation is an incubating feature.
The TaskInputs.source(Object) method has been deprecated and is scheduled to be removed in Gradle 4.0. Please use TaskInputs.file(Object).skipWhenEmpty() instead.


BUILD FAILED

Total time: 10.564 secs
FAILURE: Build failed with an exception.

* What went wrong:
A problem occurred configuring root project 'android'.
> Could not resolve all dependencies for configuration ':_armv7DebugApkCopy'.
   > Could not resolve org.xwalk:xwalk_core_library:23+.
     Required by:
         project :
      > Could not resolve org.xwalk:xwalk_core_library:23+.
         > Failed to list versions for org.xwalk:xwalk_core_library.
            > Unable to load Maven meta-data from https://download.01.org/crosswalk/releases/crosswalk/android/maven2/org/xwalk/xwalk_core_library/maven-metadata.xml.
               > Could not GET 'https://download.01.org/crosswalk/releases/crosswalk/android/maven2/org/xwalk/xwalk_core_library/maven-metadata.xml'. Received status code 503 from server: Service Unavailable

问题开始了。

https://download.01.org/crosswalk/releases/crosswalk/android/maven2/org/xwalk/xwalk_core_library/maven-metadata.xml无法使用。

  • 更新插件cordova-plugin-crosswalk-webview没有帮助。
  • 编写变量名=" XWALK_VERSION"值=" 17 +"在config.xml没有帮助。
  • 安装了Android支持存储库和Google存储库。

当我删除该插件时,移动设备上的无限加载。

3 个答案:

答案 0 :(得分:2)

  1. 在项目根目录中运行obj_stringify('text', 'font_size', element_name, fontsize);
  2. 打开find . -name "*xwalk_core_library*"并将行preview-xwalk.gradle替换为compile xwalkSpec,其中compile 'org.xwalk:xwalk_core_library:VERSION'是步骤1中命令返回的版本。
  3. 实施例: 当我运行VERSION时,我得到的结果是: find . -name "*xwalk_core_library*"

    基于此,./android/.idea/libraries/xwalk_core_library_20_50_533_12.xml中的行似乎如下:

    preview-xwalk.gradle

答案 1 :(得分:2)

更改android项目中的gradle文件* .gradle ...

在xWALK部分..

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

答案 2 :(得分:1)

我收到了相同的错误消息,并按照本指南修正了它:https://forum.ionicframework.com/t/server-error-with-crosswalk-when-running-ionic-run-android/104009/7