问题描述
我添加了 Google 移动广告。添加 MoPub 中介包后,它开始出现构建错误。
iOS 错误:
Android 错误:
解决方法
提到您的项目中没有快速桥接来创建快速桥接的错误,请按照以下步骤操作。
- 在 xcode 项目中创建新文件
- 选择swift文件保留文件名
var input = document.getElementById("cmd"); var output = document.getElementById("demo"); var commands = ['command1','commands2']; input.addEventListener("input",function() { var result = null; // indexOf() returns -1 when the supplied value isn't present if(commands.indexOf(cmd.value.toLowerCase()) > -1){ // your logic to change color,or do whatever result = "yes"; } else { result = "no"; } output.textContent = result; });
- 创建 swift 文件后,xcode 会要求
<input id="cmd"> <p id="demo"></p>
点击创建桥
创建桥接后现在尝试构建项目