我是 Mopub 的新手。只是想在 Android 中添加 Mopub 广告。所以,我一直在关注这个文档: https://developers.mopub.com/publishers/android/initialize/
文档建议这样写:
MoPub.initializeSdk(context, new SdkConfiguration.Builder("AD_UNIT_ID")
.build(), null);
Run Code Online (Sandbox Code Playgroud)
但我不清楚,AD_UNIT_ID代码中该写什么?横幅广告、插页式广告或奖励广告单元 ID?或者我每次都必须在显示任何类型的广告之前进行初始化?
我想制作一个类似 CLI 的小型项目,可以在其中执行一系列命令。所以,我写了这段代码:
let commands = ["cd C:\\Users\\MegaMind\\Documents\\dynamodb_local_latest","dir","echo rust"];
for ccc in &commands {
let rc = Command::new("cmd")
.arg("/C")
.arg(ccc)
.output()
.expect("there was an error");
io::stdout().write_all(&rc.stdout).unwrap();
// io::stdout().write_all(&rc.stderr).unwrap();
}
Run Code Online (Sandbox Code Playgroud)
看起来它dir在源代码的文件夹中运行命令,而不是在C:\\Users\\MegaMind\\Documents\\dynamodb_local_latest. 我怎样才能使其cd生效?