Closed avioXD closed 1 year ago
:warning: | Newer Version of React Native is Available! |
---|---|
:information_source: | You are on a supported minor version, but it looks like there's a newer patch available. Please upgrade to the highest patch for your minor or latest and verify if the issue persists (alternatively, create a new project and repro the issue in it). If it does not repro, please let us know so we can close out this issue. This helps us ensure we are looking at issues that still exist in the most recent releases. |
Task :app:compileDebugJavaWithJavac FAILED D:\DATASPACE\Dataspace Academy Mobile APP\NEW-RELASE\DataspaceAcademy\android\app\build\generated\rncli\src\main\java\com\facebook\react\PackageList.java:37: error: package com.swmansion.reanimated does not exist import com.swmansion.reanimated.ReanimatedPackage; ^ D:\DATASPACE\Dataspace Academy Mobile APP\NEW-RELASE\DataspaceAcademy\android\app\build\generated\rncli\src\main\java\com\facebook\react\PackageList.java:108: error: cannot find symbol new ReanimatedPackage(), ^ symbol: class ReanimatedPackage location: class PackageList 2 errors w: Detected multiple Kotlin daemon sessions at build\kotlin\sessions
FAILURE: Build completed with 2 failures.
What went wrong: Execution failed for task ':app:compileDebugJavaWithJavac'.
Compilation failed; see the compiler error output for details.
Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
What went wrong: java.lang.StackOverflowError (no error message)
Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
Get more help at https://help.gradle.org
Deprecated Gradle features were used in this build, making it incompatible with Gradle 8.0.
You can use '--warning-mode all' to show the individual deprecation warnings and determine if they come from your own scripts or plugins.
See https://docs.gradle.org/7.5.1/userguide/command_line_interface.html#sec:command_line_warnings
Now getting this error
Have you turned on the New Architecture @avioXD ?
I am so new to it. I guess no. Can you help me?
package com.dataspaceacademy;
import com.facebook.react.defaults.DefaultNewArchitectureEntryPoint;
import com.facebook.react.defaults.DefaultReactActivityDelegate;
import com.facebook.react.ReactActivity;
import com.facebook.react.ReactActivityDelegate;
import com.swmansion.reanimated.ReanimatedJSIModulePackage;
public class MainActivity extends ReactActivity {
@Override
protected String getMainComponentName() {
return "YourAppName";
}
@Override
protected ReactActivityDelegate createReactActivityDelegate() {
return new ReactActivityDelegate(this, getMainComponentName(),
DefaultNewArchitectureEntryPoint.getFabricEnabled(), // fabricEnabled
// If you opted-in for the New Architecture, we enable Concurrent React (i.e.
// React 18).
DefaultNewArchitectureEntryPoint.getConcurrentReactEnabled() // concurrentRootEnabled
) {
@Override
protected ReactNativeHost getReactNativeHost() {
return new ReactNativeHost(MainActivity.this) {
@Override
protected boolean getUseDeveloperSupport() {
return BuildConfig.DEBUG;
}
@Override
protected List<ReactPackage> getPackages() {
List<ReactPackage> packages = new PackageList(this).getPackages();
packages.add(new ReanimatedJSIModulePackage()); // Add this line
return packages;
}
};
}
};
}
}
I am so new to it. I guess no. Can you help me?
I believe you did. The New Architecture is experimental at the moment. You can turn it off on Android by changing the:
-newArchEnabled=true
+newArchEnabled=false
in your android/app/gradle.properties
file.
I am encountering this error . actually I clone a project and after cloning when I run the project I encounter this error . I tried to rsolve it by using many ways but fail . Build failed with an exception.
What went wrong: Execution failed for task ':app:configureCMakeDebug[arm64-v8a]'.
[CXX1429] error when building with cmake using E:\mana_app\node_modules\react-native\ReactAndroid\cmake-utils\default-app-setup\CMakeLists.txt: -- The C compiler identification is Clang 12.0.8 -- The CXX compiler identification is Clang 12.0.8 -- Detecting C compiler ABI info -- Detecting C compiler ABI info - done -- Check for working C compiler: C:/Users/Welcome/AppData/Local/Android/Sdk/ndk/23.1.7779620/toolchains/llvm/prebuilt/windows-x86_64/bin/clang.exe - skipped -- Detecting C compile features -- Detecting C compile features - done -- Detecting CXX compiler ABI info -- Detecting CXX compiler ABI info - done -- Check for working CXX compiler: C:/Users/Welcome/AppData/Local/Android/Sdk/ndk/23.1.7779620/toolchains/llvm/prebuilt/windows-x86_64/bin/clang++.exe - skipped -- Detecting CXX compile features -- Detecting CXX compile features - done -- Configuring incomplete, errors occurred! See also "E:/mana_app/android/app/.cxx/Debug/3s3m254i/arm64-v8a/CMakeFiles/CMakeOutput.log".
C++ build system [configure] failed while executing: @echo off "C:\Users\Welcome\AppData\Local\Android\Sdk\cmake\3.22.1\bin\cmake.exe" ^ "-HE:\mana_app\node_modules\react-native\ReactAndroid\cmake-utils\default-app-setup" ^ "-DCMAKE_SYSTEM_NAME=Android" ^ "-DCMAKE_EXPORT_COMPILE_COMMANDS=ON" ^ "-DCMAKE_SYSTEM_VERSION=21" ^ "-DANDROID_PLATFORM=android-21" ^ "-DANDROID_ABI=arm64-v8a" ^ "-DCMAKE_ANDROID_ARCH_ABI=arm64-v8a" ^ "-DANDROID_NDK=C:\Users\Welcome\AppData\Local\Android\Sdk\ndk\23.1.7779620" ^ "-DCMAKE_ANDROID_NDK=C:\Users\Welcome\AppData\Local\Android\Sdk\ndk\23.1.7779620" ^ "-DCMAKE_TOOLCHAIN_FILE=C:\Users\Welcome\AppData\Local\Android\Sdk\ndk\23.1.7779620\build\cmake\android.toolchain.cmake" ^ "-DCMAKE_MAKE_PROGRAM=C:\Users\Welcome\AppData\Local\Android\Sdk\cmake\3.22.1\bin\ninja.exe" ^ "-DCMAKE_LIBRARY_OUTPUT_DIRECTORY=E:\mana_app\android\app\build\intermediates\cxx\Debug\3s3m254i\obj\arm64-v8a" ^ "-DCMAKE_RUNTIME_OUTPUT_DIRECTORY=E:\mana_app\android\app\build\intermediates\cxx\Debug\3s3m254i\obj\arm64-v8a" ^ "-DCMAKE_BUILD_TYPE=Debug" ^ "-DCMAKE_FIND_ROOT_PATH=E:\mana_app\android\app\.cxx\Debug\3s3m254i\prefab\arm64-v8a\prefab" ^ "-BE:\mana_app\android\app\.cxx\Debug\3s3m254i\arm64-v8a" ^ -GNinja ^ "-DPROJECT_BUILD_DIR=E:\mana_app\android\app\build" ^ "-DREACT_ANDROID_DIR=E:\mana_app\node_modules\react-native\ReactAndroid" ^ "-DANDROID_STL=c++_shared" ^ "-DANDROID_USE_LEGACY_TOOLCHAIN_FILE=ON" from E:\mana_app\android\app CMake Error at E:/mana_app/android/app/build/generated/rncli/src/main/jni/Android-rncli.cmake:7 (add_subdirectory): add_subdirectory given source "E:/mana_app/node_modules/@react-native-clipboard/clipboard/android/build/generated/source/codegen/jni/" which is not an existing directory. Call Stack (most recent call first): E:/mana_app/node_modules/react-native/ReactAndroid/cmake-utils/ReactNative-application.cmake:121 (include) CMakeLists.txt:31 (include)
CMake Error at E:/mana_app/node_modules/react-native/ReactAndroid/cmake-utils/ReactNative-application.cmake:124 (target_link_libraries): Cannot specify link libraries for target "react_codegen_RNCClipboard" which is not built by this project. Call Stack (most recent call first): CMakeLists.txt:31 (include)
Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
Get more help at https://help.gradle.org
BUILD FAILED in 53s error Failed to install the app. Command failed with exit code 1: gradlew.bat app:installDebug -PreactNativeDevServerPort=8081 FAILURE: Build failed with an exception. * What went wrong: Execution failed for task ':app:configureCMakeDebug[arm64-v8a]'. > [CXX1429] error when building with cmake using E:\mana_app\node_modules\react-native\ReactAndroid\cmake-utils\default-app-setup\CMakeLists.txt: -- The C compiler identification is Clang 12.0.8 -- The CXX compiler identification is Clang 12.0.8 -- Detecting C compiler ABI info -- Detecting C compiler ABI info - done -- Check for working C compiler: C:/Users/Welcome/AppData/Local/Android/Sdk/ndk/23.1.7779620/toolchains/llvm/prebuilt/windows-x86_64/bin/clang.exe - skipped -- Detecting C compile features -- Detecting C compile features - done -- Detecting CXX compiler ABI info -- Detecting CXX compiler ABI info - done -- Check for working CXX compiler: C:/Users/Welcome/AppData/Local/Android/Sdk/ndk/23.1.7779620/toolchains/llvm/prebuilt/windows-x86_64/bin/clang++.exe - skipped -- Detecting CXX compile features -- Detecting CXX compile features - done -- Configuring incomplete, errors occurred! See also "E:/mana_app/android/app/.cxx/Debug/3s3m254i/arm64-v8a/CMakeFiles/CMakeOutput.log". C++ build system [configure] failed while executing: @echo off "C:\Users\Welcome\AppData\Local\Android\Sdk\cmake\3.22.1\bin\cmake.exe" ^ "-HE:\mana_app\node_modules\react-native\ReactAndroid\cmake-utils\default-app-setup" ^ "-DCMAKE_SYSTEM_NAME=Android" ^ "-DCMAKE_EXPORT_COMPILE_COMMANDS=ON" ^ "-DCMAKE_SYSTEM_VERSION=21" ^ "-DANDROID_PLATFORM=android-21" ^ "-DANDROID_ABI=arm64-v8a" ^ "-DCMAKE_ANDROID_ARCH_ABI=arm64-v8a" ^ "-DANDROID_NDK=C:\Users\Welcome\AppData\Local\Android\Sdk\ndk\23.1.7779620" ^ "-DCMAKE_ANDROID_NDK=C:\Users\Welcome\AppData\Local\Android\Sdk\ndk\23.1.7779620" ^ "-DCMAKE_TOOLCHAIN_FILE=C:\Users\Welcome\AppData\Local\Android\Sdk\ndk\23.1.7779620\build\cmake\android.toolchain.cmake" ^ "-DCMAKE_MAKE_PROGRAM=C:\Users\Welcome\AppData\Local\Android\Sdk\cmake\3.22.1\bin\ninja.exe" ^ "-DCMAKE_LIBRARY_OUTPUT_DIRECTORY=E:\mana_app\android\app\build\intermediates\cxx\Debug\3s3m254i\obj\arm64-v8a" ^ "-DCMAKE_RUNTIME_OUTPUT_DIRECTORY=E:\mana_app\android\app\build\intermediates\cxx\Debug\3s3m254i\obj\arm64-v8a" ^ "-DCMAKE_BUILD_TYPE=Debug" ^ "-DCMAKE_FIND_ROOT_PATH=E:\mana_app\android\app\.cxx\Debug\3s3m254i\prefab\arm64-v8a\prefab" ^ "-BE:\mana_app\android\app\.cxx\Debug\3s3m254i\arm64-v8a" ^ -GNinja ^ "-DPROJECT_BUILD_DIR=E:\mana_app\android\app\build" ^ "-DREACT_ANDROID_DIR=E:\mana_app\node_modules\react-native\ReactAndroid" ^ "-DANDROID_STL=c++_shared" ^ "-DANDROID_USE_LEGACY_TOOLCHAIN_FILE=ON" from E:\mana_app\
Any One please help me how to resolve this.
Why was this closed? Issue still exists when new arc is enabled
Yea i am facing the same issue when newArchitecture is enabled
Description
React Native Version
0.71.4
Output of
npx react-native info
`` System: OS: Windows 10 10.0.22621 CPU: (12) ia32 Intel(R) Core(TM) i7-9750H CPU @ 2.60GHz Memory: 3.20 GB / 15.87 GB Binaries: Node: 18.15.0 - C:\Program Files (x86)\nodejs\node.EXE Yarn: 1.22.19 - ~\AppData\Roaming\npm\yarn.CMD npm: 9.5.0 - C:\Program Files (x86)\nodejs\npm.CMD Watchman: Not Found SDKs: Android SDK: Not Found Windows SDK: Not Found IDEs: Android Studio: AI-221.6008.13.2211.9514443 Visual Studio: Not Found Languages: Java: 11.0.17 npmPackages: @react-native-community/cli: Not Found react: 18.2.0 => 18.2.0 react-native: 0.71.4 => 0.71.4 react-native-windows: Not Found npmGlobalPackages: react-native: Not Found
apply plugin: "com.android.application" apply plugin: "com.facebook.react"
import com.android.build.OutputFile
/**
By default you don't need to apply any configuration, just uncomment the lines you need. / react { / Folders */ // The root of your project, i.e. where "package.json" lives. Default is '..' // root = file("../") // The folder where the react-native NPM package is. Default is ../node_modules/react-native // reactNativeDir = file("../node_modules/react-native") // The folder where the react-native Codegen package is. Default is ../node_modules/react-native-codegen // codegenDir = file("../node_modules/react-native-codegen") // The cli.js file which is the React Native CLI entrypoint. Default is ../node_modules/react-native/cli.js // cliFile = file("../node_modules/react-native/cli.js")
/ Variants / // The list of variants to that are debuggable. For those we're going to // skip the bundling of the JS bundle and the assets. By default is just 'debug'. // If you add flavors like lite, prod, etc. you'll have to list your debuggableVariants. // debuggableVariants = ["liteDebug", "prodDebug"]
/ Bundling / // A list containing the node command and its flags. Default is just 'node'. // nodeExecutableAndArgs = ["node"] // // The command to run when bundling. By default is 'bundle' // bundleCommand = "ram-bundle" // // The path to the CLI configuration file. Default is empty. // bundleConfig = file(../rn-cli.config.js) // // The name of the generated asset file containing your JS bundle // bundleAssetName = "MyApplication.android.bundle" // // The entry file for bundle generation. Default is 'index.android.js' or 'index.js' // entryFile = file("../js/MyApplication.android.js") // // A list of extra flags to pass to the 'bundle' commands. // See https://github.com/react-native-community/cli/blob/main/docs/commands.md#bundle // extraPackagerArgs = []
/ Hermes Commands / // The hermes compiler command to run. By default it is 'hermesc' // hermesCommand = "$rootDir/my-custom-hermesc/bin/hermesc" // // The list of flags to pass to the Hermes compiler. By default is "-O", "-output-source-map" // hermesFlags = ["-O", "-output-source-map"] }
/**
/**
/**
def jscFlavor = 'org.webkit:android-jsc-intl:+'
Date.toLocaleString
andString.localeCompare
that/**
android { ndkVersion rootProject.ext.ndkVersion compileSdkVersion rootProject.ext.compileSdkVersion compileOptions { sourceCompatibility 1.8 targetCompatibility 1.8 } namespace "com.dataspaceacademy" defaultConfig { applicationId "com.dataspaceacademy" minSdkVersion rootProject.ext.minSdkVersion targetSdkVersion rootProject.ext.targetSdkVersion versionCode 1 versionName "1.0" multiDexEnabled true }
}
dependencies { // The version of react-native is set by the React Native Gradle Plugin implementation("com.facebook.react:react-android") implementation 'com.android.support:multidex:2.0.1' implementation("androidx.swiperefreshlayout:swiperefreshlayout:1.0.0") implementation platform('com.google.firebase:firebase-bom:31.5.0') implementation 'com.google.firebase:firebase-analytics' debugImplementation("com.facebook.flipper:flipper:${FLIPPER_VERSION}") debugImplementation("com.facebook.flipper:flipper-network-plugin:${FLIPPER_VERSION}") { exclude group:'com.squareup.okhttp3', module:'okhttp' }
} project.ext.vectoricons = [ iconFontNames: [ 'MaterialIcons.ttf', 'EvilIcons.ttf' , 'FontAwesome.ttf' ,"MaterialCommunityIcons", "Ionicons.ttf", "Feather.ttf", "FontAwesome5.ttf", "AntDesign.ttf", "Entypo.ttf", "SimpleLineIcons.ttf", "Octicons.ttf", "Foundation.ttf", ] // Name of the font files you want to copy ] apply from: file("../../node_modules/@react-native-community/cli-platform-android/native_modules.gradle"); applyNativeModulesAppBuildGradle(project) apply from: "../../node_modules/react-native-vector-icons/fonts.gradle"