如何通过cordova-plugin-crosswalk-webview 2.4.0仅生成armv7版本APK
Got it, let's sort this out for you! Since you're using version 2.4.0 of the crosswalk webview plugin, there are two straightforward ways to restrict your build to only generate the armv7 (armeabi-v7a) APK:
1. Set a Preference in config.xml (Persistent Solution)
This method saves your setting so you don't have to specify it every time you build:
- Open your project's
config.xmlfile - Inside the
<platform name="android">block, add this preference:
<preference name="xwalkArch" value="armeabi-v7a" />
This tells the crosswalk plugin to only compile for the armeabi-v7a architecture, skipping the other four targets you mentioned.
2. Specify the ABI Directly in Build Command (One-Time/Ad-Hoc)
If you only want to build armv7 occasionally, you can pass the ABI as a command-line argument when running the build:
cordova build android -- --abi armeabi-v7a
This overrides any default settings for that single build.
Verify the Result
After running the build, check the output directory at platforms/android/app/build/outputs/apk/ — you should only see APK files labeled with armeabi-v7a instead of the full set of five architectures.
内容的提问来源于stack exchange,提问作者upupup

