Skip to content

build android 64bit error #7705

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

Closed
peppeg85 opened this issue Aug 21, 2019 · 6 comments
Closed

build android 64bit error #7705

peppeg85 opened this issue Aug 21, 2019 · 6 comments

Comments

@peppeg85
Copy link

hello, i followed many discussion about building for android 64bit, i can run on device and my app works fine, but whrn i upload the .aab file i have the error about my app is not 64bit compliant, but only 32, how can i fix this? i have these gradle files an this package.json:

before-plugins.gradle:

project.ext { googlePlayServicesVersion = "15.0.+" }
app.gradle:

`
android {
defaultConfig {
generatedDensities = []
applicationId = "net.uappo.carservice"
ndk.abiFilters 'armeabi-v7a','arm64-v8a','x86','x86_64'
}
aaptOptions {
additionalParameters "--no-version-vectors"
}
}
def settingsGradlePath

if(project.hasProperty("appResourcesPath")){
settingsGradlePath = "$project.appResourcesPath/Android/settings.gradle";
} else {
settingsGradlePath = "$rootDir/../../app/App_Resources/Android/settings.gradle";
}

def settingsGradleFile = new File(settingsGradlePath);

if(settingsGradleFile.exists())
{
apply from: settingsGradleFile;
}

`
package.json:

{ "description": "Generic Application", "license": "SEE LICENSE IN <your-license-filename>", "readme": "Generic Application", "repository": "<fill-your-repository-here>", "nativescript": { "id": "xxxxxxx", "tns-ios": { "version": "5.4.2" }, "tns-android": { "version": "5.4.0" } }, "dependencies": { "moment": "^2.22.2", "nativescript-background-http": "^3.3.1", "nativescript-camera": "^4.1.1", "nativescript-checkbox": "^3.0.3", "nativescript-floatingactionbutton": "^4.1.3", "nativescript-google-maps-sdk": "^2.7.0", "nativescript-iqkeyboardmanager": "^1.5.1", "nativescript-loading-indicator": "^2.5.2", "nativescript-masked-text-field": "^4.0.1", "nativescript-modal-datetimepicker": "^1.1.12", "nativescript-phone": "^1.4.0", "nativescript-plugin-firebase": "^8.3.0", "nativescript-theme-core": "~1.0.4", "nativescript-ui-listview": "^3.7.3", "nativescript-ui-sidedrawer": "^4.3.1", "tns-core-modules": "^5.4.3" }, "devDependencies": { "babel-traverse": "6.4.5", "babel-types": "6.4.5", "babylon": "6.4.5", "lazy": "1.0.11" } }
thank you

@peppeg85
Copy link
Author

edit:
following this page: https://developer.android.com/distribute/best-practices/develop/64-bit
analyzing the bundle i have this files:
Immagine

so i have 32bit package, how can i change to be 64 bit compliant?

@NickIliev
Copy link
Contributor

NickIliev commented Aug 21, 2019

@peppeg85 you are hitting this issue.

The CLI team is already working on a fix and as of this very moment the fix is included in the RC version of tns-android and nativescript-dev-webpack.. The fix will include the missing architecture x86_64 by default in all produced builds.

To apply the fix do the following:

rm -rf node_modules platforms hooks webpack.config.js

npm i nativescript-dev-webpack@rc --save-dev

tns platform add android@rc 

npm i 

Then build for release and publish the produced files.

@peppeg85
Copy link
Author

sorry, but this means i have to use webpack build? for this project i still dont migrate to NS 6

@NickIliev
Copy link
Contributor

@peppeg85 yes you will need NativeScript 6 which works with Webpack builds only.

If you want to resolve the issue on lower version then you could exclude the x86 architecture and this way Google won't complain about missing x86_64 arch.

See this comment for details on how to achieve that

@peppeg85
Copy link
Author

peppeg85 commented Aug 21, 2019 via email

@VitorHFLopes
Copy link

@NickIliev my HUGE thanks for the team!

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

No branches or pull requests

3 participants