Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Please Support x64 (64bit devices) #3

Closed
writeosahon opened this issue Jan 21, 2018 · 9 comments
Closed

Please Support x64 (64bit devices) #3

writeosahon opened this issue Jan 21, 2018 · 9 comments

Comments

@writeosahon
Copy link

@MBuchalik Thank you for this excellent pluign.
Please is it possible to add a preference to support x64 (64bit) apk builds?

Thank you so much

@MBuchalik
Copy link
Owner

I haven't generated a x64 build using Crosswalk so far. Isn't there a setting (sth like a command line parameter) that has to be set while adding Crosswalk to the project?

Right now (as far as I know) only arm and x86 builds are generated by the Crosswalk plugin.

So, for my plugin to support the x64 version, you need to somehow tell Crosswalk to output an x64 file.
Then it is possible for this plugin to fetch the correct file.

I don't have much time right now. So if you could do some testing, we can maybe add the correct functions into this plugin.

Basically, what we need is to find a way to tell Crosswalk that it should generate the x64 file.
I saw the following command in Crosswalk's readme:

 cordova build android --xwalk64bit

Could you try if it is possible to use this setting on PGB e.g. by using

<preference name="xwalkCommandLine" value="--xwalk64bit" />

?
If it works, a x64 file should be created by PGB.

Probably, some more testing/research has to be made here. This ist just a setting I found in the readme - don't know if it will work properly...

Simply tell me if you have found a way to produce an x64 build of Crosswalk. Then, I can try to extend this plugin. 😃

@writeosahon
Copy link
Author

@MBuchalik Hello.
I tried your suggestion without success 😢 .
I read and searched extensively and finally came up with this merged pull request from crosswalk github repo crosswalk-project/cordova-plugin-crosswalk-webview#75 .
The repo stated that the --xwalk64bit option can only be used at build time; and cannot be set from config.xml .

So is there anything that can be done done from your plugin??
Thanks for the help

@MBuchalik
Copy link
Owner

Looks like they are using a hook to define a setting in config.xml. We can do this as well:

<preference name="xwalk64bit" value="true" />

Then, you can (in theory) use my plugin with

<preference name="buildArchitecture" value="arm64" />

to output the arm 64 bit version or

<preference name="buildArchitecture" value="x86_64" />

if you want the x86 64bit one.

Could you test this? It would especially be interesting whether the app can actually be installed on a device or if something is missing here.

The whole configuration could look like this:

<plugin name="cordova-plugin-crosswalk-webview" source="npm" spec="(The Crosswalk version you are using should be inserted here)" />
<preference name="xwalkMultipleApk" value="true" />
<preference name="xwalk64bit" value="true" />
<plugin name="cordova-build-architecture" spec="https://github.com/MBuchalik/cordova-build-architecture.git#v1.0.3" source="git" />
<preference name="buildArchitecture" value="x86_64" />

@writeosahon
Copy link
Author

@MBuchalik Thank you so so much 👍👍 .
It worked perfectly as directed.
Thanks again for this plugin (my clients thank you as well 😊) .

Please, one more thing; can you please include these instructions for supporting 64bit devices to the plugin readme.md . This feature is extremely useful and noteworthy.

Thank you

@MBuchalik
Copy link
Owner

Sounds great! 😃
I have updated the readme: 23bf209

@xale76
Copy link

xale76 commented Jun 16, 2019

Hello, facing same issues. Is it possible to have 1 APK containing
x86
armeabi-v7a
x86_64
arm64-v8a

that's why Google encourages to publish ONLY 1 APK.
Please help

@MBuchalik
Copy link
Owner

MBuchalik commented Jun 17, 2019

@xale76
This is a Crosswalk related problem and cannot be solved by my plugin.
You should have a look at the official Crosswalk documentation. My plugin is only intended for the exact opposite case: If you have configured Crosswalk to output multiple .apk files, then you can use my plugin. But if you configure Crosswalk to generate one single .apk file, then my plugin serves no purpose at all.

I believe there was a setting called "xwalkMultipleApk" or so that could be a good starting point for your issue. 😃

Btw: I personally wouldn't package every single native binary into one .apk. Size will increase dramatically.

@pastinyala
Copy link

Looks like they are using a hook to define a setting in config.xml. We can do this as well:

<preference name="xwalk64bit" value="true" />

Then, you can (in theory) use my plugin with

<preference name="buildArchitecture" value="arm64" />

to output the arm 64 bit version or

<preference name="buildArchitecture" value="x86_64" />

if you want the x86 64bit one.

Could you test this? It would especially be interesting whether the app can actually be installed on a device or if something is missing here.

The whole configuration could look like this:

<plugin name="cordova-plugin-crosswalk-webview" source="npm" spec="(The Crosswalk version you are using should be inserted here)" />
<preference name="xwalkMultipleApk" value="true" />
<preference name="xwalk64bit" value="true" />
<plugin name="cordova-build-architecture" spec="https://github.com/MBuchalik/cordova-build-architecture.git#v1.0.3" source="git" />
<preference name="buildArchitecture" value="x86_64" />

hye i have put the codes into my config.xml but when i upload it to playstore to publish it showa only 24 devices compatible to my apk.. can you help me please?

@MBuchalik
Copy link
Owner

@pastinyala Please provide a minimal config.xml so that I can try to reproduce your problem. In this config.xml, please only include the absolute minimum of required plugins that lead to this problem.

Btw: Have you maybe defined the settings in a way so that the app is built for x86 processors only? I don't believe there are more than 24 Android devices running on a x86 CPU.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants