Unity Google Mobile Ads Mediatiod MoPub 构建错误 Android 和 iOS

问题描述

添加了 Google 移动广告。添加 MoPub 中介包后,它开始出现构建错误

iOS 错误

enter image description here

Android 错误

enter image description here

解决方法

提到您的项目中没有快速桥接来创建快速桥接的错误,请按照以下步骤操作。

  1. 在 xcode 项目中创建新文件
  2. 选择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; });
  3. 创建 swift 文件后,xcode 会要求 <input id="cmd"> <p id="demo"></p> 点击创建桥

创建桥接后现在尝试构建项目