-
-
Notifications
You must be signed in to change notification settings - Fork 195
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
Multi arch support for Android #1392
Comments
This comment was marked as abuse.
This comment was marked as abuse.
In the fourth case: "If a pluging is missing requested architecture, stop the build. This does not apply when only jars or aars are used [Android runtime]"
|
@Plamen5kov - updated the text, thank you! |
👍 |
@teobugslayer some notes We need to think support for all scenarios in http://developer.android.com/google/play/publishing/multiple-apks.html Also if there is no 64bit libs in my app why the option is mandatory. A 32bit app will run fine on 64 bit devices. I think we should package a single apk by default (and as per the guidance) and introduce complexity only when user wants it. And If he wants it allow all possible options. The tns build tools should not constrain the developer. |
@blagoev, when we switch to using combined 32 and 64 bit {N} runtime, there always will be 64 bit code in the APK. We can either make the option mandatory (again, only for the "publish" command"), or default to something which we consider "safe", like, 32-bit only build, all build, or something else. Opinions? |
@teobugslayer for the publish command only it is ok to have this to be mandatory. If there are no other 64bit libs in the project we can build against a 32bit only runtime. We just need to make sure the build fails if there is one plugin which does not have a 64bit library on 64 builds. |
This comment was marked as abuse.
This comment was marked as abuse.
👍 |
Hello. I was wondering if there is still no way to make tns build for a specific android architecture? In an app we're currently working on we want to use libVLC through a plugin. But it really slows down our development process that we arent able to build for one architecture at a time. If anyone knows of a manual fix to the build.gradle file it would be very much appreciated. Maybe something like abiFilters? |
Hey @Plamen5kov, Do you know such manual fix? |
@enchev
But it doesn't seem like it's possible anymore in the latest version of Nativescript CLI. |
Hi @dfg-nota |
@Plamen5kov I just checked my
ndk abiFilters was removed. It seems the |
Hi @dfg-nota, |
I am facing the same issue. Is there any work around available? |
Hi @ansarizafar, |
@Plamen5kov Any chance this will get in 3.0? It's a pain having to double my build time and run commands twice, compiling arm and x86 separately, especially at scale |
Hi @vbresults you can use this PR, where abi split configuration is respected and once
I can't tell if there will be functionality enabled in cli to help with the workflow for 3.0, but you would be able to edit the |
Starting with android runtime v3.0.0 when abi split configuration is provided in the Please refer to the Publishing for Android article if you want to learn how to setup ABI splits. Closing this as resolved. |
@Plamen5kov @Pip3r4o The splits code sample/doc doesn't set a different Please update the docs, this is what I use (
|
@vbresults Thanks for reporting that behavior. What you point out is indeed the case with the APKs, they don't have a distinct version code themselves. The respective code configuring the apks can be found here - https://github.com/NativeScript/android-runtime/blob/master/build-artifacts/project-template-gradle/build.gradle#L162 . Do you have a suggestion on general naming of apks configured with separate ABIs? The Would you be willing to submit a PR? |
@Pip3r4o The official guide (where I got 95% of my code) shows a convention but I personally don't want to be locked into their |
Multi arch support for Android
Overview
Users of NativeScript face conflicting goals when using architecture-dependant native code (*.so files).
During development they want to build their program very quickly to iterate very fast. They usually develop for x86 emulator (like Genymotion or Visual Studio) and arm-based testing devices.
When publishing to Google Play Store, they may need to split the archive to avoid the 100 MB file size limit currently imposed.
Additional obstacle is that 64-bit Android does not allow mixing 64-bit and 32-bit architecture-dependent native code. When a single dependency introduces a 64-bit .so file, all dependencies must be 64-bit as well. This can easily slip during development, when people usually use 32-bit devices and emulators.
Proposed work flow
We need to solve these problems in couple of places: The CLI, the Docs and the Gradle scripts
I propose this behavior:
publish
command. It is also mandatory forbuild --release
(but see bellow for comments). When building without--release
, it is not mandatory. [CLI]iOS
Apple has different requirements for publishing to App Store. I believe that build and publish commands can differ in this case. iOS specific functionality should be addressed in a dedicated issue.
Comments:
--arch
mandatory for building in release mode, AppBuilder team will need to revise the BpcTooling to introduce it. Also, this may not be the optimal behavior for the user.The text was updated successfully, but these errors were encountered: