我正在尝试将 Reanimated 2.0 集成到 iOS React Native swift 项目中并收到以下错误。Android 应用程序工作正常,但无法解决 iOS 问题。
https://docs.swmansion.com/react-native-reanimated/docs/
Error: Requiring module "node_modules/react-native-reanimated/src/Animated.js", which threw an exception: TypeError: Cannot read property 'installCoreFunctions' of undefined, js engine: hermes
包装信息:
“反应”:“17.0.2”,
“反应本机”:“0.67.0”,
“react-native-reanimated”:“2.3.1”
Hermes 已启用。
Babel 插件已设置为复活
完成多次node_module清除和缓存重置。
我的目标是检测广告拦截器.我找到了几个很好的例子,比如FuckAdBlock.
广告服务调用被广告拦截阻止后,我们会收到错误"err_blocked_by_client".
我想通过以下方式处理此错误:
var xhr = new XMLHttpRequest();
try
{
xhr.open("GET","http://static.adzerk.net/ados.js", false);
xhr.onreadystatechange = function (oEvent) {
if (xhr.readyState === 4) {
if (xhr.status === 200) {
console.log(xhr.responseText)
} else {
console.log("Error", xhr.statusText);
}
}
};
xhr.send();
}
catch(error)
{
console.log("ConsoleLog \n " + JSON.stringify(xhr));
console.log("Error Catched" + error);
}
Run Code Online (Sandbox Code Playgroud)
但在这种情况下,我无法识别catch块的错误原因.
请让我知道在此代码中处理此错误或错误的更好选项.
谢谢
react-native ×2
adblock ×1
ajax ×1
android ×1
ios ×1
javascript ×1
jquery ×1
swift ×1
youtube ×1