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

Build fail on android #78

Open
ronickg opened this issue Sep 2, 2023 · 1 comment
Open

Build fail on android #78

ronickg opened this issue Sep 2, 2023 · 1 comment

Comments

@ronickg
Copy link

ronickg commented Sep 2, 2023

FAILURE: Build failed with an exception.

  • Where:
    Build file 'C:\Users\user\Documents\Programming\ReactLatest\node_modules@animo-id\react-native-bbs-signatures\android\build.gradle' line: 159

  • What went wrong:
    A problem occurred evaluating project ':animo-id_react-native-bbs-signatures'.

Expected directory 'C:\Users\user\Documents\Programming\ReactLatest\node_modules\react-native\android' to contain exactly one file, however, it contains no files.

BUILD FAILED in 3s

@JJMoon
Copy link

JJMoon commented Aug 21, 2024

It's been almost a year since this issue started.

I am also digging to solve this issue. I solved this (line 159) issue, but there's another. So I share the solutions for this issue.

Add maven central. (optional)

    maven {
      mavenCentral() // You might need this..
      url "https://plugins.gradle.org/m2/"
    }

In dependency

dependencies {
  // noinspection GradleDynamicVersion
  implementation("com.facebook.react:react-android") // this is optional
  implementation 'com.facebook.react:react-native:+'

  implementation 'com.facebook.fbjni:fbjni:0.2.2' // Add this line

  // Comment out all those lines.
  //noinspection GradleDynamicVersion. 
  // extractHeaders("com.facebook.fbjni:fbjni:+:headers")
  //noinspection GradleDynamicVersion
  // extractJNI("com.facebook.fbjni:fbjni:+")

  // if (!sourceBuild) {
  //   def rnAAR = fileTree("${defaultDir.toString()}").matching({ it.include "**/**/*.aar" }).singleFile
  //   extractJNI(files(rnAAR))
  // }

And set the third party versions manually.
The version numbers can be imported (refer to the cradle.build.kts file).
So these are temporary.

def BOOST_VERSION = "1_86_0"


task downloadBoost(dependsOn: createNativeDepsDirectories, type: Download) {
  // src("https://github.com/react-native-community/boost-for-react-native/releases/download/v${BOOST_VERSION.replace("_", ".")}-0/boost_${BOOST_VERSION}.tar.gz")
  src("https://archives.boost.io/release/1.86.0/source/boost_1_86_0.tar.gz")
  onlyIfNewer(true)
  overwrite(false)
  dest(boost_file)
}

...

task downloadDoubleConversion(dependsOn: createNativeDepsDirectories, type: Download) {
  src("https://github.com/google/double-conversion/archive/v1.1.6.tar.gz")

  // src("https://github.com/facebook/folly/archive/v${FOLLY_VERSION}.tar.gz")
  src("https://github.com/facebook/folly/releases/download/v2024.08.19.00/folly-v2024.08.19.00.tar.gz")

  // src("https://github.com/google/glog/archive/v${GLOG_VERSION}.tar.gz")
  src("https://github.com/google/glog/archive/refs/tags/v0.7.1.tar.gz")

But, after this new error comes.

* What went wrong:
Execution failed for task ':animo-id_react-native-bbs-signatures:configureCMakeDebug[arm64-v8a]'.
> [CXX1306] /Volumes/.../node_modules/@animo-id/react-native-bbs-signatures/android/CMakeLists.txt debug|arm64-v8a : CMake Error: The following variables are used in this project, but they are set to NOTFOUND.
  Please set them or make sure they are set and tested correctly in the CMake files:
  JSI_LIB
      linked by target "reactnativebbssignatures" in directory /Volumes/.../node_modules/@animo-id/react-native-bbs-signatures/android
  REACT_NATIVE_JNI_LIB
      linked by target "reactnativebbssignatures" in directory /Volumes/.../node_modules/@animo-id/react-native-bbs-signatures/android

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

2 participants