react-native-async-storage / async-storage

An asynchronous, persistent, key-value storage system for React Native.
https://react-native-async-storage.github.io/async-storage/
MIT License
4.61k stars 458 forks source link

[Android] expected buildFiles file CMakeLists.txt to exist #1070

Closed bulkinav closed 6 days ago

bulkinav commented 3 months ago

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?

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
saczx commented 3 months ago

Same issue here

tido64 commented 3 months ago

What versions of the following packages are installed?

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?

saczx commented 3 months ago

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
saczx commented 3 months ago

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

tido64 commented 3 months ago

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

saczx commented 3 months ago

Yes

Sacha Spinelli | Head of Engineering - Frontend (web & mobile) - Growth

(+598) 92 911 386 | www.frubana.com

WE ARE HIRING | jobs.frubana.com

*Los datos personales que se compartan por este medio, serán recolectados y tratados por FRUBANA S.A.S., en calidad de responsable del tratamiento de datos personales, en los términos de nuestra política de privacidad y protección de datos personales, la cual se encuentra disponible para consulta en la página web https://files.frubana.com/documents/co-policies-frubana.pdf

On Fri, 15 Mar 2024 at 10:46 Tommy Nguyen @.***> wrote:

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

— Reply to this email directly, view it on GitHub https://github.com/react-native-async-storage/async-storage/issues/1070#issuecomment-1999702391, or unsubscribe https://github.com/notifications/unsubscribe-auth/A2WNGKJQMS3NHBPSN2FY623YYL3UBAVCNFSM6AAAAABEVY3OUCVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSOJZG4YDEMZZGE . You are receiving this because you commented.Message ID: @.*** com>

tido64 commented 3 months ago

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.

devethan commented 2 months ago

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?

github-actions[bot] commented 2 weeks ago

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.