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

Add ndkVersion to Android project #1411

Conversation

maximzhemerenko
Copy link
Contributor

When I build Android app (react native 0.68.1) using arm based MacBook Pro M1, I receive 'Unknown host CPU architecture: arm64' error. This happens because library uses default ndkVersion, but not custom ndkVersion from 'ext'. I propose include this line in the build.gradle file to use globally specified ndkVersion if exists.

@WoLewicki
Copy link
Member

Shouldn't it be resolved with this commit's changes ? Or am I missing something and we need to do something in the library itself to correctly use it?

@maximzhemerenko
Copy link
Contributor Author

When I upgraded to react native 0.68.1 from 0.68.0, I added logic that choose ndkVersion in the root build.gradle file.

image

And when I build react native android app without added react-native-screens library it builds on arm based Android Studio.

When I add react-native-screens library I see 'Unknown host CPU architecture: arm64' error.

So my decision is to add line to the library build.gradle file that read ext variable from the root build.gradle file and set the ndkVersion of the library as well.

I did not worked with ndk before, this decision come from research.

@maximzhemerenko maximzhemerenko force-pushed the add-ndk-version-to-android-build-gradle branch from 0f88f56 to f738428 Compare April 19, 2022 12:19
@maximzhemerenko
Copy link
Contributor Author

I changed implementation as suggest me @j-piasecki software-mansion/react-native-gesture-handler#2012 (comment)

Copy link
Member

@WoLewicki WoLewicki left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for explanation and solving this problem 🎉

@WoLewicki WoLewicki merged commit 19565bc into software-mansion:main Apr 20, 2022
@maximzhemerenko maximzhemerenko deleted the add-ndk-version-to-android-build-gradle branch April 20, 2022 13:00
@gentrio
Copy link

gentrio commented Jun 22, 2022

Is there new version for this merge ?

@j-piasecki
Copy link
Member

@gentrio Not yet, but there will be very soon as we're waiting for the release of React Native 0.69.

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

Successfully merging this pull request may close these issues.

4 participants