jerson / react-native-fast-openpgp

OpenPGP for react native made with golang for fast performance
https://www.npmjs.com/package/react-native-fast-openpgp
MIT License
45 stars 18 forks source link

Android build crashes #43

Closed thegreatkoe closed 2 years ago

thegreatkoe commented 2 years ago

Hi,

after adding react-native-fast-opengpg when i try to run npx react-native run-android the build fails with:

Execution failed for task ':react-native-fast-openpgp:generateJsonModelDebug'.
> java.lang.NullPointerException (no error message)

I already tried to run the build:

My Env is as follows:

System:
    OS: macOS 12.0.1
    CPU: (10) arm64 Apple M1 Max
  Binaries:
    Node: 17.2.0 - /opt/homebrew/bin/node
    Yarn: 1.22.17 - /opt/homebrew/bin/yarn
    npm: 8.1.4 - /opt/homebrew/bin/npm
    Watchman: 2021.11.15.00 - /opt/homebrew/bin/watchman
  Managers:
    CocoaPods: 1.11.2 - /opt/homebrew/bin/pod
  SDKs:
    iOS SDK:
      Platforms: DriverKit 21.0.1, iOS 15.0, macOS 12.0, tvOS 15.0, watchOS 8.0
    Android SDK:
      API Levels: 26, 29, 30, 31
      Build Tools: 28.0.3, 29.0.0, 29.0.2, 30.0.0, 30.0.2, 31.0.0
      System Images: android-29 | Google APIs ARM 64 v8a, android-29 | Google Play ARM 64 v8a, android-30 | ARM 64 v8a, android-30 | Google APIs ARM 64 v8a, android-30 | Google Play ARM 64 v8a, android-31 | ARM 64 v8a, android-31 | Google APIs ARM 64 v8a, android-31 | Google Play ARM 64 v8a
      Android NDK: Not Found
  IDEs:
    Android Studio: 2020.3 AI-203.7717.56.2031.7784292
    Xcode: 13.1/13A1030d - /usr/bin/xcodebuild
  Languages:
    Java: 1.8.0_312 - /Users/.jenv/shims/javac
    Python: 2.7.18 - /usr/bin/python
  npmPackages:
    @react-native-community/cli: Not Found
    react: 16.13.1 => 16.13.1
    react-native: 0.63.4 => 0.63.4
    react-native-macos: Not Found
  npmGlobalPackages:
    *react-native*: Not Found

If someone could point me in the right direction on how to fix this, i would be more than thankful (:

se1exin commented 2 years ago

I had the same issue, after hours of messing around trying to get it to work, I came across this similar Stack Overflow post: https://stackoverflow.com/questions/67120904/cannot-properly-link-c-project-with-gradle-exception-during-working-with-exte

In short, it appears the issue seems to be that this lib is incompatible with newer versions of CMake.

I now have it compiling on Android, here's what I did to get it working:

@jerson I have no idea about CMake, but from this I assume something needs to be updated in the repo to work with newer versions of CMake

jerson commented 2 years ago

Wow @se1exin thank you so much, yeah has been a while since I Updated cmake, I will take a look on weekend