我最近一直在以真实的本地方式制作应用程序。我还使用谷歌的admob 放置了一个广告横幅,直到几天前才出现曾经出现过的广告。设置下面的 admob 道具会导致错误。
<AdMobBanner
bannerSize="banner"
adUnitID="ca-app-pub-@@@@@@@"
testDeviceID="EMULATOR"
servePersonalizedAds = {true}
onDidFailToReceiveAdWithError={this.bannerError}
/>
Run Code Online (Sandbox Code Playgroud)
错误如下。
The `testDeviceID` prop of AdMobBanner is deprecated. Test device IDs are now set globally. Use AdMob.setTestDeviceIDAsync instead.
Run Code Online (Sandbox Code Playgroud)
如果你能帮助我,我将不胜感激。
我尝试通过 expo 构建应用程序但失败了,我尝试重新安装 expo-cli。因此,我输入了下面的代码来删除 expo-cli。
npm -g uninstall expo-cli --save
Run Code Online (Sandbox Code Playgroud)
和
(base) Bongui-MacBookPro:expo-firebase-master bong$ npm uninstall expo-cli -g
up to date in 0.042s
Run Code Online (Sandbox Code Playgroud)
但是,如果我输入 expo,它就会运行。
所以如果你再次忽略它并尝试重新安装expo-cli,则会出现以下错误:
npm ERR! code EEXIST
npm ERR! syscall symlink
npm ERR! path ../lib/node_modules/expo-cli/bin/expo.js
npm ERR! dest /Users/bong/npm-global/bin/expo-cli
npm ERR! errno -17
npm ERR! EEXIST: file already exists, symlink '../lib/node_modules/expo-cli/bin/expo.js' -> '/Users/bong/npm-global/bin/expo-cli'
npm ERR! File exists: /Users/bong/npm-global/bin/expo-cli
npm ERR! Remove the existing file and try again, or run npm
npm ERR! with --force to overwrite files …Run Code Online (Sandbox Code Playgroud)