问题描述
当我尝试初始化 Appsflyer(或例如 Appmetrica)时,我看到相同的渲染错误:“null is not an object (Evaluating RNAppsflyer.initSdkWithCallback)”
import appsFlyer from "react-native-appsflyer";
import React,{useEffect,useState} from 'react';
import {
SafeAreaView,StyleSheet,Text
} from 'react-native';
const InitAppsFlyer = () => {
useEffect(() => {
appsFlyer.initSdk(
{
devKey: 'DevKeyHere1234',isDebug: false,appId: '0000000'
},(result) => {
console.log(result);
},(error) => {
console.log(error);
}
);
return (
<Text> random text</Text>
);
};
const App = () => {
return (
<SafeAreaView>
<InitAppsFlyer/>
</SafeAreaView>
);
};
export default App;
我按照此处的说明操作https://github.com/AppsFlyerSDK/appsflyer-react-native-plugin 尝试了“npm install”、“pod install”、重新启动应用程序、使现金无效、重建项目,但似乎没有任何效果。
我刚刚开始使用 React Native,所以我希望我正确地表述了这个问题。
感谢您的帮助!
解决方法
暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!
如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。
小编邮箱:dio#foxmail.com (将#修改为@)