Closed Bayramito closed 1 week ago
Hey @Bayramito we would love some repro (a link to repo or expo snack) so that we could see the error ourselves or help you with the setup in case it was done wrongly
Hey @Bayramito we would love some repro (a link to repo or expo snack) so that we could see the error ourselves or help you with the setup in case it was done wrongly
Hi, I have upgraded from 3.13.0-rc2 to 3.13.0 and have the same issue. Using react-native-tvos 0.72.6-1.
Hi, I have upgraded from 3.13.0-rc2 to 3.13.0 and have the same issue. Using react-native-tvos 0.72.6-1.
Yea, on reproducable RN version is also 0.72...
Hey I have a similar Issue with RN 0.72.15 and reanimated version 3.13.0
It appeared after updating the Target SDK Level of the Android Application to 34 (Also updated Gradle and Build Tools)
[0/2] Re-checking globbed directories...
[1/5] Building CXX object
...
/Users/sja/Projects/Mobile/xxx/xxx/node_modules/react-native-reanimated/android/src/main/cpp/AndroidUIScheduler.cpp:58:7: error: must specify at least one argument for '...' parameter of variadic macro [-Werror,-Wgnu-zero-variadic-macro-arguments]
makeNativeMethod("initHybrid", AndroidUIScheduler::initHybrid),
^
/Users/sja/.gradle/caches/transforms-3/b5f4192f75b34dfaaee200c23072fe25/transformed/jetified-fbjni-0.3.0/prefab/modules/fbjni/include/fbjni/detail/Registration.h:97:85: note: expanded from macro 'makeNativeMethod'
#define makeNativeMethod(...) FBJNI_MACRO_EXPAND(makeNativeMethodN(__VA_ARGS__, 3, 2)(__VA_ARGS__))
^
/Users/sja/.gradle/caches/transforms-3/b5f4192f75b34dfaaee200c23072fe25/transformed/jetified-fbjni-0.3.0/prefab/modules/fbjni/include/fbjni/detail/Registration.h:96:9: note: macro 'makeNativeMethodN' defined here
#define makeNativeMethodN(a, b, c, count, ...) makeNativeMethod ## count
^
Same for me, using React Native 0.72.10, after switching target sdk from 33 to 34:
i tried rm -rf ~/.gradle, rm -rf node_modules yarn.lock, re install and gradlew clean, same error :/
Same for me. Upon further investigation I managed to find the issue, but not sure if that's expected behavior.
Here the flag -Wpedantic
was added, without it Android builds properly. Though removing it looks like a hack
Same for me. Upon further investigation I managed to find the issue, but not sure if that's expected behavior.
Here the flag
-Wpedantic
was added, without it Android builds properly.
is everything fine after the build ?
Same for me. Upon further investigation I managed to find the issue, but not sure if that's expected behavior. b4a8837 Here the flag
-Wpedantic
was added, without it Android builds properly.is everything fine after the build ?
Seems ok, but got to do a bit more testing.
Hi @Bayramito, thanks for opening this issue.
Can you confirm that you're using C++17 for building the C++ part of Reanimated?
I know that this error happens when building with C++14, can you confirm that?
Hi @Bayramito, thanks for opening this issue.
Can you confirm that you're using C++17 for building the C++ part of Reanimated?
I know that this error happens when building with C++14, can you confirm that?
On my local setup it might be 14 but not sure, bur i am using Azure as well. It crashes on both places
@tomekzaw
@Bayramito
The easiest way to check this would be to add the following somewhere in Reanimated C++ codebase:
#if __cplusplus != 201703L
#error "Not using C++17"
#endif
Same issue since upgrading to React Native 0.71.4.
@Bayramito
The easiest way to check this would be to add the following somewhere in Reanimated C++ codebase:
#if __cplusplus != 201703L #error "Not using C++17" #endif
Ism’t there anything to do to fix it @tomekzaw
Same issue for me as well, My 2 days are wasted because of this error.
React-Native = 0.71.3 "react-native-reanimated": "^3.13.0", Target sdk from 34, not working with 33 also.
Same for me, after switching target SDK from 33 to 34.
The same for me. Just after upgrading react-native-reanimated
from 3.12.1
to 3.13.0
(react-native = 0.73.9
)
app/build.gradle
` android {
afterEvaluate {
def file = file('../../node_modules/react-native-reanimated/android/CMakeLists.txt')
if (!file.exists()) {
println "[Fix-CMakeLists] File not found: ${file}"
return
}
def content = file.text
def Wpedantic = "-Wpedantic -Werror"
if (content.contains(Wpedantic)) {
def modifiedContent = content.replace(Wpedantic, "-Werror")
file.withWriter('UTF-8') { writer ->
writer.write(modifiedContent)
}
println "[Fix-CMakeLists] Modified ${file}"
} else {
println "[Fix-CMakeLists] No changes needed in ${file}"
}
}
}`
app/build.gradle
` android {
afterEvaluate { def file = file('../../node_modules/react-native-reanimated/android/CMakeLists.txt') if (!file.exists()) { println "[Fix-CMakeLists] File not found: ${file}" return } def content = file.text def Wpedantic = "-Wpedantic -Werror" if (content.contains(Wpedantic)) { def modifiedContent = content.replace(Wpedantic, "-Werror") file.withWriter('UTF-8') { writer -> writer.write(modifiedContent) } println "[Fix-CMakeLists] Modified ${file}" } else { println "[Fix-CMakeLists] No changes needed in ${file}" } }
}`
It's worked. thanks
app/build.gradle
` android {
afterEvaluate { def file = file('../../node_modules/react-native-reanimated/android/CMakeLists.txt') if (!file.exists()) { println "[Fix-CMakeLists] File not found: ${file}" return } def content = file.text def Wpedantic = "-Wpedantic -Werror" if (content.contains(Wpedantic)) { def modifiedContent = content.replace(Wpedantic, "-Werror") file.withWriter('UTF-8') { writer -> writer.write(modifiedContent) } println "[Fix-CMakeLists] Modified ${file}" } else { println "[Fix-CMakeLists] No changes needed in ${file}" } }
}`
Thanks for the effort but i think editing this file in reanimated module and patching it temporarily, is easier task to do
app/build.gradle
` android {
afterEvaluate { def file = file('../../node_modules/react-native-reanimated/android/CMakeLists.txt') if (!file.exists()) { println "[Fix-CMakeLists] File not found: ${file}" return } def content = file.text def Wpedantic = "-Wpedantic -Werror" if (content.contains(Wpedantic)) { def modifiedContent = content.replace(Wpedantic, "-Werror") file.withWriter('UTF-8') { writer -> writer.write(modifiedContent) } println "[Fix-CMakeLists] Modified ${file}" } else { println "[Fix-CMakeLists] No changes needed in ${file}" } }
}`
Where to add it exactly in build.gradle?
app/build.gradle ` android {
afterEvaluate { def file = file('../../node_modules/react-native-reanimated/android/CMakeLists.txt') if (!file.exists()) { println "[Fix-CMakeLists] File not found: ${file}" return } def content = file.text def Wpedantic = "-Wpedantic -Werror" if (content.contains(Wpedantic)) { def modifiedContent = content.replace(Wpedantic, "-Werror") file.withWriter('UTF-8') { writer -> writer.write(modifiedContent) } println "[Fix-CMakeLists] Modified ${file}" } else { println "[Fix-CMakeLists] No changes needed in ${file}" } }
}`
Where to add it exactly in build.gradle?
Just open CMakeList.txt in node_modules/react-native-reanimated/android in line 18 remove the keyword -Wpedantic then npx patch-package react-native-reanimated thats it.
But this is a temporary fix,
Should be fixed in https://github.com/software-mansion/react-native-reanimated/pull/6250, will be released in 3.13.1.
Description
Cannot build release apk after i upgrade version from
3.10.1
to3.13.0
. The issue is not existing in3.10.1
I get this error
Steps to reproduce
none
Snack or a link to a repository
https://github.com/Bayramito/reanimated-build-error)
Reanimated version
3.13.0
React Native version
0.72.14
Platforms
Android
JavaScript runtime
Hermes
Workflow
React Native
Architecture
Paper (Old Architecture)
Build type
Release app & production bundle
Device
None
Device model
No response
Acknowledgements
Yes