Build error after adding Crosswalk plugin to a Cordova Android project

前端 未结 4 977
爱一瞬间的悲伤
爱一瞬间的悲伤 2020-12-28 09:37

I\'m using the latest cordova android (5.1.0). The project is building and running fine without crosswalk, but after I add the crosswalk plugin using

cordov         


        
相关标签:
4条回答
  • 2020-12-28 10:03

    try this it's working for me.

    You must add the plugin before adding the android platform.

    cordova -version ==> 5.1.1
    
    1. Navigate to the project directory

      cd cordova/

    2. Remove the android platform

      cordova platform rm android

    3. Check the crosswalk plugin is not installed

      cordova plugin ls

    4. Add the crosswalk plugin with npm

      cordova plugin add cordova-plugin-crosswalk-webview

    5. Add the android platform

      cordova platform add android

    6. Build the android project

      cordova build android

    7. Run android project

      cordova run android

    0 讨论(0)
  • 2020-12-28 10:07

    I was having issues after installing Crosswalk, and I found a solution that worked for me here: https://crosswalk-project.org/jira/si/jira.issueviews:issue-html/XWALK-5965/XWALK-5965.html

    tl;dr: install the "Android support libraries" from the extras repository (from the Android SDK manager)

    0 讨论(0)
  • 2020-12-28 10:12

    If using Ionic (not sure if another platform of framework does the same), the root config.xml template includes the following reference:

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

    By removing it and firing a

    cordova build android 
    

    (and also following @badboyunited 's answer) causes the plugin to be downloaded with the latest version.

    0 讨论(0)
  • 2020-12-28 10:20

    Change xwalkVersion preference to 18+

    https://crosswalk-project.org/jira/browse/XWALK-7043

    0 讨论(0)
提交回复
热议问题