Reputation: 11
The problem is when I try to create a build the build fail. I have "expo": "~51.0.8" "react": "18.2.0", "react-native": "0.74.1" NDK used in the app: "21.4.7075529"
On SDK Tools: I have installed Android SDK Build tools 35-rc4 "34.0.0" NDK (Side by side) installed versions 27.0.11718014 and 21.4.7075529 CMake version 3.22.1 I have installed Android Emulator version 34.2.14 Android SDK Platform-Tools 35.0.1
On SDK Platforms: Android 14.0 ("upsideDownCake") 34 that includes: *Google Play Intel x86_64 Atom System Image *Google APIs ATD Intel x86_64 Atom System Image
The problems: 1.Virtual phone is not loading the app using the command npx expo run:android 2.Physical phone is giving a different error and I could not correctly pinpoint what it means
Virtual phone: Is opening, and opening two command line windows(should only open one) giving this error: The code execution cannot proceed because libandroid-emu-metrics.dll was not found. Renstalling the program may fix this problem this message opens on the qemu-system-x86_64.exe - System Error
On android studio the first fail is : > Task :expo-modules-core:buildCMakeDebug[arm64-v8a] FAILED
The reason I wrote about weak_ptr is beacuse all the other things written are about that like the errors are in the place of weak_ptr another build error is: BUILD FAILED in 39s 178 actionable tasks: 12 executed, 166 up-to-date Error: C:\Users\shays\Desktop\noteapp\android\gradlew.bat app:assembleDebug -x lint -x test --configure-on-demand --build-cache -PreactNativeDevServerPort=8081 -PreactNativeArchitectures=x86_64,arm64-v8a exited with non-zero code: 1
and another error is as follows: C++ build system [build] failed while executing: @echo off "C:\Users\shays\AppData\Local\Android\Sdk\cmake\3.22.1\bin\ninja.exe" ^ -C ^ "C:\Users\shays\Desktop\noteapp\node_modules\expo-modules-core\android\.cxx\Debug\169382tg\arm64-v8a" ^ expo-modules-core from C:\Users\shays\Desktop\noteapp\node_modules\expo-modules-core\android
Physical phone The error is:
Task :expo-modules-core:buildCMakeDebug[arm64-v8a] FAILED FAILURE: Build failed with an exception.
com.android.ide.common.process.ProcessException: ninja: Entering directory `C:\Users\shays\Desktop\noteapp\node_modules\expo-modules-core\android.cxx\Debug\169382tg\arm64-v8a'
1 error generated. ninja: build stopped: subcommand failed.
C++ build system [build] failed while executing: @echo off "C:\Users\shays\AppData\Local\Android\Sdk\cmake\3.22.1\bin\ninja.exe" ^ -C ^ "C:\Users\shays\Desktop\noteapp\node_modules\expo-modules-core\android\.cxx\Debug\169382tg\arm64-v8a" ^ expo-modules-core from C:\Users\shays\Desktop\noteapp\node_modules\expo-modules-core\android
This are the errors and the problems I encountered that I was not able to fix
As I faced this problem I tried everything that I found on the internet. I deleted the sdk file on my system. Installed CMake updated my project to "expo": "~51.0.8" "react": "18.2.0", "react-native": "0.74.1" ánd at the end I reinstalled android studio and deleted the saved instances of it as was written on the internet. I tried different versions of NDK (what could work) and installed more sdk and ndk's
For better understanding, I already did try opening a new project so I believe the problem is with android studio somehow.
Update: I get a visible error called: No viable constructor or deduction guide for deduction of template of 'weak_ptr'
Update2: This is the error from trying to run on android studio: Execution failed for task ':expo-modules-core:buildCMakeDebug[x86_64]'.
com.android.ide.common.process.ProcessException: ninja: Entering directory `C:\Users\shays\Desktop\noteapp\node_modules\expo-modules-core\android.cxx\Debug\169382tg\x86_64' [1/31] Building CXX object CMakeFiles/expo-modules-core.dir/C_/Users/shays/Desktop/noteapp/node_modules/expo-modules-core/common/cpp/ObjectDeallocator.cpp.o [2/31] Building CXX object CMakeFiles/expo-modules-core.dir/src/main/cpp/JNIDeallocator.cpp.o [3/31] Building CXX object CMakeFiles/expo-modules-core.dir/C_/Users/shays/Desktop/noteapp/node_modules/expo-modules-core/common/cpp/LazyObject.cpp.o [4/31] Building CXX object CMakeFiles/expo-modules-core.dir/C_/Users/shays/Desktop/noteapp/node_modules/expo-modules-core/common/cpp/SharedObject.cpp.o [5/31] Building CXX object CMakeFiles/expo-modules-core.dir/C_/Users/shays/Desktop/noteapp/node_modules/expo-modules-core/common/cpp/JSIUtils.cpp.o [6/31] Building CXX object CMakeFiles/expo-modules-core.dir/src/main/cpp/JavaReferencesCache.cpp.o [7/31] Building CXX object CMakeFiles/expo-modules-core.dir/C_/Users/shays/Desktop/noteapp/node_modules/expo-modules-core/common/cpp/TypedArray.cpp.o [8/31] Building CXX object CMakeFiles/expo-modules-core.dir/src/main/cpp/JNIFunctionBody.cpp.o [9/31] Building CXX object CMakeFiles/expo-modules-core.dir/C_/Users/shays/Desktop/noteapp/node_modules/expo-modules-core/common/cpp/EventEmitter.cpp.o [10/31] Building CXX object CMakeFiles/expo-modules-core.dir/src/main/cpp/JNIInjector.cpp.o [11/31] Building CXX object CMakeFiles/expo-modules-core.dir/src/main/cpp/JSReferencesCache.cpp.o [12/31] Building CXX object CMakeFiles/expo-modules-core.dir/src/main/cpp/Exceptions.cpp.o [13/31] Building CXX object CMakeFiles/expo-modules-core.dir/C_/Users/shays/Desktop/noteapp/node_modules/expo-modules-core/common/cpp/NativeModule.cpp.o [14/31] Building CXX object CMakeFiles/expo-modules-core.dir/src/main/cpp/JavaScriptObject.cpp.o [15/31] Building CXX object CMakeFiles/expo-modules-core.dir/src/main/cpp/JSIContext.cpp.o [16/31] Building CXX object CMakeFiles/expo-modules-core.dir/src/main/cpp/JavaScriptTypedArray.cpp.o [17/31] Building CXX object CMakeFiles/expo-modules-core.dir/src/main/cpp/ExpoModulesHostObject.cpp.o [18/31] Building CXX object CMakeFiles/expo-modules-core.dir/src/main/cpp/WeakRuntimeHolder.cpp.o [19/31] Building CXX object CMakeFiles/expo-modules-core.dir/src/main/cpp/types/AnyType.cpp.o [20/31] Building CXX object CMakeFiles/expo-modules-core.dir/src/main/cpp/JavaScriptValue.cpp.o [21/31] Building CXX object CMakeFiles/expo-modules-core.dir/src/main/cpp/JavaScriptFunction.cpp.o [22/31] Building CXX object CMakeFiles/expo-modules-core.dir/src/main/cpp/JavaScriptWeakObject.cpp.o [23/31] Building CXX object CMakeFiles/expo-modules-core.dir/src/main/cpp/types/ExpectedType.cpp.o [24/31] Building CXX object CMakeFiles/expo-modules-core.dir/src/main/cpp/JavaScriptRuntime.cpp.o [25/31] Building CXX object CMakeFiles/expo-modules-core.dir/src/main/cpp/JavaCallback.cpp.o [26/31] Building CXX object CMakeFiles/expo-modules-core.dir/src/main/cpp/types/FrontendConverterProvider.cpp.o [27/31] Building CXX object CMakeFiles/expo-modules-core.dir/src/main/cpp/JavaScriptModuleObject.cpp.o FAILED: CMakeFiles/expo-modules-core.dir/src/main/cpp/JavaScriptModuleObject.cpp.o C:\Users\shays\AppData\Local\Android\Sdk\ndk\21.4.7075529\toolchains\llvm\prebuilt\windows-x86_64\bin\clang++.exe --target=x86_64-none-linux-android23 --gcc-toolchain=C:/Users/shays/AppData/Local/Android/Sdk/ndk/21.4.7075529/toolchains/llvm/prebuilt/windows-x86_64 --sysroot=C:/Users/shays/AppData/Local/Android/Sdk/ndk/21.4.7075529/toolchains/llvm/prebuilt/windows-x86_64/sysroot -Dexpo_modules_core_EXPORTS -IC:/Users/shays/.gradle/caches/transforms-4/9bfd8d8ccf6aec4b45fb273f99ca2fd0/transformed/jetified-react-android-0.74.1-debug/prefab/modules/reactnativejni/include/react -IC:/Users/shays/Desktop/noteapp/node_modules/react-native/ReactAndroid/src/main/jni/react/turbomodule -IC:/Users/shays/Desktop/noteapp/node_modules/expo-modules-core/android/../common/cpp -IC:/Users/shays/Desktop/noteapp/node_modules/expo-modules-core/android/src/fabric -isystem C:/Users/shays/.gradle/caches/transforms-4/f5f8d15972c06a076ab931e4935a95b1/transformed/jetified-fbjni-0.6.0/prefab/modules/fbjni/include -isystem C:/Users/shays/.gradle/caches/transforms-4/9bfd8d8ccf6aec4b45fb273f99ca2fd0/transformed/jetified-react-android-0.74.1-debug/prefab/modules/jsi/include -isystem C:/Users/shays/.gradle/caches/transforms-4/9bfd8d8ccf6aec4b45fb273f99ca2fd0/transformed/jetified-react-android-0.74.1-debug/prefab/modules/reactnativejni/include -isystem C:/Users/shays/.gradle/caches/transforms-4/9bfd8d8ccf6aec4b45fb273f99ca2fd0/transformed/jetified-react-android-0.74.1-debug/prefab/modules/folly_runtime/include -isystem C:/Users/shays/.gradle/caches/transforms-4/9bfd8d8ccf6aec4b45fb273f99ca2fd0/transformed/jetified-react-android-0.74.1-debug/prefab/modules/react_nativemodule_core/include -g -DANDROID -fdata-sections -ffunction-sections -funwind-tables -fstack-protector-strong -no-canonical-prefixes -D_FORTIFY_SOURCE=2 -Wformat -Werror=format-security -DREACT_NATIVE_TARGET_VERSION=74 -O0 -fno-limit-debug-info -fPIC -DFOLLY_NO_CONFIG=1 -DFOLLY_HAVE_CLOCK_GETTIME=1 -DFOLLY_USE_LIBCPP=1 -DFOLLY_CFG_NO_COROUTINES=1 -DFOLLY_MOBILE=1 -DFOLLY_HAVE_RECVMMSG=1 -DFOLLY_HAVE_PTHREAD=1 -DFOLLY_HAVE_XSI_STRERROR_R=1 -O2 -frtti -fexceptions -Wall -fstack-protector-all -DUSE_HERMES=0 -DUNIT_TEST=0 -std=gnu++2a -MD -MT CMakeFiles/expo-modules-core.dir/src/main/cpp/JavaScriptModuleObject.cpp.o -MF CMakeFiles\expo-modules-core.dir\src\main\cpp\JavaScriptModuleObject.cpp.o.d -o CMakeFiles/expo-modules-core.dir/src/main/cpp/JavaScriptModuleObject.cpp.o -c C:/Users/shays/Desktop/noteapp/node_modules/expo-modules-core/android/src/main/cpp/JavaScriptModuleObject.cpp C:/Users/shays/Desktop/noteapp/node_modules/expo-modules-core/android/src/main/cpp/JavaScriptModuleObject.cpp:148:28: error: no viable constructor or deduction guide for deduction of template arguments of 'weak_ptr' auto weakConstructor = std::weak_ptr(constructor); ^ C:/Users/shays/AppData/Local/Android/Sdk/ndk/21.4.7075529/toolchains/llvm/prebuilt/windows-x86_64/sysroot/usr/include/c++/v1\memory:4883:51: note: candidate template ignored: couldn't infer template argument '_Tp' template _LIBCPP_INLINE_VISIBILITY weak_ptr(shared_ptr<_Yp> const& __r, ^ C:/Users/shays/AppData/Local/Android/Sdk/ndk/21.4.7075529/toolchains/llvm/prebuilt/windows-x86_64/sysroot/usr/include/c++/v1\memory:4872:28: note: candidate template ignored: could not match 'weak_ptr' against 'shared_ptr' class _LIBCPP_TEMPLATE_VIS weak_ptr ^ C:/Users/shays/AppData/Local/Android/Sdk/ndk/21.4.7075529/toolchains/llvm/prebuilt/windows-x86_64/sysroot/usr/include/c++/v1\memory:4887:5: note: candidate template ignored: could not match 'weak_ptr' against 'shared_ptr' weak_ptr(weak_ptr const& __r) _NOEXCEPT; ^ C:/Users/shays/AppData/Local/Android/Sdk/ndk/21.4.7075529/toolchains/llvm/prebuilt/windows-x86_64/sysroot/usr/include/c++/v1\memory:4888:51: note: candidate template ignored: could not match 'weak_ptr' against 'shared_ptr' template _LIBCPP_INLINE_VISIBILITY weak_ptr(weak_ptr<_Yp> const& __r, ^ C:/Users/shays/AppData/Local/Android/Sdk/ndk/21.4.7075529/toolchains/llvm/prebuilt/windows-x86_64/sysroot/usr/include/c++/v1\memory:4894:5: note: candidate template ignored: could not match 'weak_ptr' against 'shared_ptr' weak_ptr(weak_ptr&& __r) _NOEXCEPT; ^ C:/Users/shays/AppData/Local/Android/Sdk/ndk/21.4.7075529/toolchains/llvm/prebuilt/windows-x86_64/sysroot/usr/include/c++/v1\memory:4895:51: note: candidate template ignored: could not match 'weak_ptr' against 'shared_ptr' template _LIBCPP_INLINE_VISIBILITY weak_ptr(weak_ptr<_Yp>&& __r, ^ C:/Users/shays/AppData/Local/Android/Sdk/ndk/21.4.7075529/toolchains/llvm/prebuilt/windows-x86_64/sysroot/usr/include/c++/v1\memory:4882:23: note: candidate function template not viable: requires 0 arguments, but 1 was provided _LIBCPP_CONSTEXPR weak_ptr() _NOEXCEPT;
Will try to use different ndk after fixing the npx expo-doctor problems.
Upvotes: 1
Views: 497
Reputation: 1
That is a known software error that will be fixed in a release soon. https://github.com/expo/expo/commit/da05e4720417ddd8fcf19f392fb5914deba2bcb5
Upvotes: 0