-
Notifications
You must be signed in to change notification settings - Fork 95
Troubleshooting
If you're seeing this build error with newArchEnabled=true, you're likely using a library that doesn't support autolinking TurboModule. Please file an issue in their repo.
Android NDK: ERROR:/~/node_modules/react-native-safe-area-context/android/src/main/jni/Android.mk:fb: LOCAL_SRC_FILES points to a missing file
Android NDK: Check that /~/android/app/build/react-ndk/exported/arm64-v8a/libfb.so exists or that its path is correct
For now, you can build libfb.so manually by invoking Gradle:
./gradlew packageReactNdkDebugLibsThen retry the command you were using earlier.
Error: Activity class {com.microsoft.reacttestapp/com.microsoft.reacttestapp.MainActivity} does not exist.
If you've changed the application id, react-native run-android will fail. You'll need to tell run-android which id to launch, e.g. to launch com.contoso.MyApp:
yarn react-native run-android --appId com.contoso.MyAppError: project.projectFile invalid. Error: No app project file found, please specify in react-native.config.
On react-native-windows 0.63, autolinking seems to no longer respect the --sln flag. We can work around this by manually specifying the project path:
const path = require("path");
const { windowsProjectPath } = require('react-native-test-app');
const windowsSourceDir = "windows";
module.exports = {
project: {
windows: {
sourceDir: windowsSourceDir,
project: windowsProjectPath(path.join(__dirname, windowsSourceDir)),
},
},
reactNativePath: "node_modules/react-native-windows",
};Failed to construct transformer : error : EBUSY: resource busy or locked, open '~\msbuild.ProjectImports.zip'
This is a known issue in MSBuild (/dotnet/msbuild/issues/5383). The workaround is to add this file to blacklistRE in metro.config.js:
module.exports = {
resolver: {
blacklistRE: blacklist([
/node_modules\/.*\/node_modules\/react-native\/.*/,
/node_modules\/react-native-macos\/.*/,
// Workaround for `EBUSY: resource busy or locked, open '~\msbuild.ProjectImports.zip'`
// when building with `yarn windows --release`
/.*\.ProjectImports\.zip/,
]),
},
transformer: {
getTransformOptions: async () => ({
transform: {
experimentalImportSupport: false,
inlineRequires: false,
},
}),
},
};This can occur if your package is iOS specific, i.e. it contains no ios folder with an Xcode project. react-native config cannot detect your package if this is missing. We can work around it by adding a dummy project to react-native.config.js at the root of the package:
module.exports = {
project: {
ios: {
project: "ReactTestApp-Dummy.xcodeproj",
},
},
};
For security reasons, Address Sanitizer is enabled by default. You can disable it by editing the scheme as documented in Diagnosing Memory, Thread, and Crash Issues Early.
This error may occur when with react-native-windows 0.68 and above. Add Directory.Build.props to the root of your repository with the following content:
<?xml version="1.0" encoding="utf-8"?>
<Project>
<PropertyGroup Label="NuGet" Condition="'$(MSBuildProjectExtension)' == '.vcxproj'">
<ResolveNuGetPackages>false</ResolveNuGetPackages>
</PropertyGroup>
</Project>