react-native-async-storage/async-storage

[Android] expected buildFiles file CMakeLists.txt to exist

bulkinav opened this issue · 11 comments

What happened?

Hello,

When I'm trying to build the my project (release or begug - it does not matter) with IS_NEW_ARCHITECTURE_ENABLED = TRUE, the following error occurs:

[CXX1409] /app-react/android/app/.cxx/RelWithDebInfo/152f6h3q/arm64-v8a/android_gradle_build.json appRelease|arm64-v8a : expected buildFiles file 'app-react/node_modules/@react-native-async-storage/async-storage/android/build/generated/source/codegen/jni/CMakeLists.txt' to exist

Version

1.22.3

What platforms are you seeing this issue on?

  • Android
  • iOS
  • macOS
  • Windows
  • web

System Information

"react-native": "0.73.6"

IS_NEW_ARCHITECTURE_ENABLED = TRUE
bridgelessEnabled = FALSE

macOS 14.4
Android Studio 2023.2.1

buildToolsVersion = "34.0.0"
minSdkVersion = 23 // Android 6.0 and above
compileSdkVersion = 34 // Android 14 (gives access to new APIs)
targetSdkVersion = 33 // Android 13
ndkVersion = "25.1.8937393"
kotlinVersion = "1.8.22"

Steps to Reproduce

  1. Enable NEW ARCHITECTURE
  2. Build the own project

Same issue here

What versions of the following packages are installed?

  • @react-native-community/cli
  • @react-native-community/cli-platform-android
  • @react-native-community/cli-platform-ios
  • @react-native/gradle-plugin
  • Gradle
  • JDK

I've tested this with 1.22.3 and React Native 0.73 locally and it builds just fine. Do you have a repro we can check out and investigate?

Hi @tido64 ! The versions of the packages are these:

@react-native-community/cli => 12.3.6
@react-native-community/cli-platform-android => 12.3.6
@react-native-community/cli-platform-ios => 12.3.6
@react-native/gradle-plugin => 0.73.4 
Gradle => distributionUrl=https\://services.gradle.org/distributions/gradle-8.3-all.zip (Android gradle plugin: 8.1.1, Gradle: 8.3)
JDK => openjdk17

Workaround: I've had manually run ./gradlew generateCodegenArtifactsFromSchema in the android folder and now it seems to be working...

Is @react-native-async-storage/async-storage in the package.json where you're running run-android from?

If you have a minimal repro, we can try and have a look. This looks like an issue with codegen, though it's hard to say whether it's a setup issue or a bug. In any case, it has nothing to do with AsyncStorage.

Workaround: I've had manually run ./gradlew generateCodegenArtifactsFromSchema in the android folder and now it seems to be working...

Also it worked for me. Thanks.
What does this mean?

This issue has been marked as stale due to inactivity. Please respond or otherwise resolve the issue within 7 days or it will be closed.