Ionic 3 project and plugin crosswalk error

后端 未结 4 1483
你的背包
你的背包 2021-02-07 10:47

I have a Ionic 3 project, when I run \"ionic cordova run android --prod\" I see

This error:

ANDROID_HOME=C:\\Users\\asus\\AppData\\Loca         


        
4条回答
  •  有刺的猬
    2021-02-07 11:14

    1 Get crosswalk version

    There are another two ways to get xwalk_core_library version, you can use either of them:

    • Go to platforms/android/build/intermediates/exploded-aar/org.xwalk‌​/xwalk_core_library/‌​, then you can see version like 19.49.514.5

    • In the Google cache, you can select a version number

    2 Change the gradle

    Just like @hemantv said, in file platforms\android\cordova-plugin-crosswalk-webview*-xwalk.gradle

    Change the file form

    dependencies {
        compile xwalkSpec
    }
    

    to

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

    19.49.514.5 is the version get from the step one.


    Another way, you can use this plugin temporarily:

    cordova plugin add https://github.com/zhouzhongyuan/cordova-plugin-crosswalk-webview
    

    It just fixed this error.

提交回复
热议问题