-
Notifications
You must be signed in to change notification settings - Fork 14
Troubleshooting Guide
If you are seeing the following error when trying to build or install pod, then you have to update your cocoapod version. Error: DT_TOOLCHAIN_DIR cannot be used to evaluate LIBRARY_SEARCH_PATHS, use TOOLCHAIN_DIR instead
To update the DT_TOOLCHAIN_DIR to TOOLCHAIN_DIR, add below in your podfile,
installer.aggregate_targets.each do |target|
target.xcconfigs.each do |variant, xcconfig|
xcconfig_path = target.client_root + target.xcconfig_relative_path(variant)
IO.write(xcconfig_path, IO.read(xcconfig_path).gsub("DT_TOOLCHAIN_DIR", "TOOLCHAIN_DIR"))
end
end
installer.pods_project.targets.each do |target|
target.build_configurations.each do |config|
if config.base_configuration_reference.is_a? Xcodeproj::Project::Object::PBXFileReference
xcconfig_path = config.base_configuration_reference.real_path
IO.write(xcconfig_path, IO.read(xcconfig_path).gsub("DT_TOOLCHAIN_DIR", "TOOLCHAIN_DIR"))
end
end
Please run the below command to update your cocoapod.
brew upgrade cocoapods
Then run pod update with,
pod install --repo-update
To install pod manually, follow the below series of commands,
cd ios
rm Podfile.lock
rm -rf Pods
pod cache clean --all
pod deintegrate
pod setup
pod install
If you still encounter similar error, then you have to replace the DT_TOOLCHAIN_DIR with TOOLCHAIN_DIR manually. Go to project search and search for DT_TOOLCHAIN_DIR and replace manually one by one with TOOLCHAIN_DIR.
If might see the below error while building your React-Native on Android on Mac on or after azure-communication-ui-calling:1.6.0 Error: dlopen: failed to load __emutls_get_address
This error generates in React-Native version 0.69 and if you are using ui library version on or after 1.6.0
This is a common issue from React-Native JNI9 linking error.
You can refer or relate to the issue more here.
Another way you can successfully avoid such issue if you try to build on any other machine except apple's silicon based M1/M2 chipset.
The gradle sync failure depends on the expected minimum gradle version for different React-Native versions. For example, gradle version 0.69, please update the gradle version on the build.gradle of android.
classpath("com.android.tools.build:gradle:7.4.2")
Please update the gradle-wrapper properties as well. For example,
distributionUrl=https\://services.gradle.org/distributions/gradle-7.5-all.zip
Also please make sure to update your gradle jdk version to JDK-17 for React-Native 0.69 or later versions.
The native android ./gradlew build command executes successfully but the react-native sample app fails when trying to run on android device. One potentially gets the following error-
Execution failed for task ':app:installDebug'.
> java.util.concurrent.ExecutionException: com.android.builder.testing.api.DeviceException: com.android.ddmlib.InstallException: Connection reset by peer
Potential solutions could be for above scenario are:
- Please check if there is a physical android device connected. To check run
adb devicescommand. - Restart the adb server. To do so first run
kill adb-serverthenstart adb-server. - Check if there is already a debug application installed in the device. In that case, uninstall the application then run the install or run-android command.