我在这里听到了关于这个错误的许多答案,但我的问题没有解决.每次我运行我的应用程序时都没有广告出现,我在Logcat中收到此错误消息:
"获取广告响应时出现问题.错误代码:0无法加载广告:0"
这是我的java代码.我错过了什么?
private void LoadAds() {
AdView mAdView = (AdView) findViewById(R.id.linearLayoutAdmob);
AdRequest adRequest = new AdRequest.Builder().build();
mAdView.loadAd(adRequest);
Run Code Online (Sandbox Code Playgroud)
在这里我的xml布局与最后一行的admob
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:ads="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:orientation="vertical"
android:background="@drawable/background_play"
tools:context=".MainActivity" >
<RelativeLayout
android:id="@+id/rlayout1"
android:layout_width="fill_parent"
android:layout_height="0px"
android:padding="5dip"
android:layout_weight="2.3" >
<com.aapps.find.TouchImage
android:id="@+id/gameimage1"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:scaleType="fitXY"
android:src="@drawable/ic_launcher" />
<ImageView
android:id="@+id/hitimage1"
android:layout_width="50dp"
android:layout_height="50dp"
android:src="@drawable/hit"
android:visibility="invisible" />
<ImageView
android:id="@+id/errorimage1"
android:layout_width="30dp"
android:layout_height="30dp"
android:src="@drawable/miss1"
android:visibility="invisible" />
</RelativeLayout>
<RelativeLayout
android:id="@+id/rlayoutprogress"
android:layout_width="fill_parent"
android:layout_height="0px"
android:layout_weight="0.1" >
<com.aapps.find.utility.SaundProgressBar
android:id="@+id/progressBar"
style="@style/Widget.ProgressBar.RegularProgressBar"
android:layout_width="fill_parent"
android:layout_height="fill_parent"/>
</RelativeLayout>
<RelativeLayout
android:id="@+id/rlayout2"
android:padding="5dip"
android:layout_width="fill_parent"
android:layout_height="0px"
android:layout_weight="2.3" >
<com.aapps.find.TouchImage
android:id="@+id/gameimage2"
android:layout_width="fill_parent" …Run Code Online (Sandbox Code Playgroud) 我已经升级到Xcode 10对High Sierra现在的回报广告示例项目来自AdMob抱怨说,com.apple.commcenter.coretelephony.xpc不能正常工作.
我必须启用新的权利吗?我正在寻找几个小时没有任何线索.
更新: 这只发生在模拟器上.在设备上它工作正常.他们必须增加一个新的限制.
2018-09-22 10:59:39.730813+0100 RewardedVideoExample[1449:26168] libMobileGestalt MobileGestalt.c:890: MGIsDeviceOneOfType is not supported on this platform.
2018-09-22 10:59:40.031746+0100 RewardedVideoExample[1449:26281] Failed to create remote object proxy: Error Domain=NSCocoaErrorDomain Code=4099 "The connection to service named com.apple.commcenter.coretelephony.xpc was invalidated." UserInfo={NSDebugDescription=The connection to service named com.apple.commcenter.coretelephony.xpc was invalidated.}
2018-09-22 10:59:40.031865+0100 RewardedVideoExample[1449:26261] Failed to ping server after delegate was set
2018-09-22 10:59:40.031938+0100 RewardedVideoExample[1449:26262] Failed to create synchronous remote object proxy: Error Domain=NSCocoaErrorDomain Code=4099 "The connection …Run Code Online (Sandbox Code Playgroud) 我在google和stackoverflow上看到了几个与此错误相关的帖子,我已经阅读了所有这些帖子但仍然提到了问题,我很乐意找到解决方案.这是我在编译时收到的错误消息...
找不到选项'-L/Users/somefolder/Documents/Bharat/MyApp copy/GoogleAdMobAdsSDK'重复符号_OBJC_CLASS _ $ _ AppDelegate:/ Users/madept/Library/Developer/Xcode/DerivedData/Alpha-dvvymdlmzseytagllsmbbrxdgutz/Build/Intermediates/Alpha.build/Debug-iphonesimulator/Alpha.build/Objects-normal/i386/AppDelegate-56890B6B994A4284.o
谢谢.
我已经安装了AdMob SDK 6.2.0(Xcode 4.5(4G182),我正在iPhone 4S和模拟器上进行测试).我按照教程进行操作,只想让AdMob显示一次横幅.但它在最后一行崩溃了:
self.bannerView = [[GADBannerView alloc]
initWithFrame:CGRectMake(0.0,
self.view.frame.size.height -
GAD_SIZE_320x50.height,
GAD_SIZE_320x50.width,
GAD_SIZE_320x50.height)];
self.bannerView.delegate = self;
self.bannerView.adUnitID = @"xREMOVEDBYMEx";
self.bannerView.rootViewController = self;
[self.view addSubview:self.bannerView];
GADRequest * request = [GADRequest request];
request.testing = YES;
[self.bannerView loadRequest:request];
Run Code Online (Sandbox Code Playgroud)
崩溃是
2012-09-28 09:03:58.268 NewProject [1467:c07] - [GADObjectPrivate changeState:]:无法识别的选择器发送到实例0x95c17d0 2012-09-28 09:03:58.276 NewProject [1467:c07] *终止应用程序未捕获的异常'NSInvalidArgumentException',原因:' - [GADObjectPrivate changeState:]:无法识别的选择器发送到实例0x95c17d0'
对我来说,这看起来像图书馆中的一个错误,但我认为这不太可能.有什么想法吗?
编辑:完全相同的代码在示例项目中工作.我的项目文件有什么问题可以导致错误吗?
在最近的一个版本中,我通过 Admob 广告中介添加了 MoPub,我在崩溃日志中看到了一堆 ConcurrentModificationException。这一切似乎都是本机代码,我正在使用所有与广告相关和 google/android 相关库的最新版本。有人遇到过这个吗?
java.lang.RuntimeException:
at android.app.ActivityThread.performLaunchActivity (ActivityThread.java:3121)
at android.app.ActivityThread.handleLaunchActivity (ActivityThread.java:3264)
at android.app.servertransaction.LaunchActivityItem.execute (LaunchActivityItem.java:78)
at android.app.servertransaction.TransactionExecutor.executeCallbacks (TransactionExecutor.java:108)
at android.app.servertransaction.TransactionExecutor.execute (TransactionExecutor.java:68)
at android.app.ActivityThread$H.handleMessage (ActivityThread.java:1955)
at android.os.Handler.dispatchMessage (Handler.java:106)
at android.os.Looper.loop (Looper.java:214)
at android.app.ActivityThread.main (ActivityThread.java:7078)
at java.lang.reflect.Method.invoke (Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run (RuntimeInit.java:494)
at com.android.internal.os.ZygoteInit.main (ZygoteInit.java:964)
Caused by: java.util.ConcurrentModificationException:
at androidx.c.g.put (SimpleArrayMap.java:482)
at com.google.android.gms.measurement.internal.hs.a
at com.google.android.gms.measurement.internal.hi.onActivityCreated
at android.app.Application.dispatchActivityCreated (Application.java:245)
at android.app.Activity.onCreate (Activity.java:1108)
at androidx.core.app.e.onCreate (ComponentActivity.java:81)
at androidx.activity.b.onCreate (ComponentActivity.java:149)
at androidx.fragment.app.c.onCreate (FragmentActivity.java:313)
at androidx.appcompat.app.e.onCreate (AppCompatActivity.java:106)
at com.teamtol.livedota.BaseActivity.onCreate (BaseActivity.java:21)
at com.teamtol.livedota.RecentGameActivity.onCreate (RecentGameActivity.java:70)
at …Run Code Online (Sandbox Code Playgroud) 我的Phonegap Build应用程序中的所有内容都在运行,包括Analytics和FacebookConnect插件.但是,现在我想添加AdMob广告.
Phonegap Build不为AdMob提供内置插件,但根据Phonegap Build Plugins页面,您现在可以添加自己的自定义插件(请参阅页面底部的Contributing Plugins).
PhoneGap插件可以通过使用plugin.xml文件与PhoneGap Build兼容...
Phonegap Build Plugins页面引用GitHub上的Child Browser plugins.xml作为如何设置自定义plugin.xml的示例.以下是Child Browser plugin.xml的内容.
我不确定我需要修改此文件的哪些方面以及修改它们的内容.我想我已经为iOS和Android正确设置了Phonegap AdMob插件的文件结构(参见下面的文件结构),但我不确定如何在plugin.xml文件中正确引用这些文件.
<?xml version="1.0" encoding="UTF-8"?>
<plugin xmlns="http://www.phonegap.com/ns/plugins/1.0"
xmlns:android="http://schemas.android.com/apk/res/android"
id="com.phonegap.plugins.childbrowser"
version="3.0.4">
<name>Child Browser</name>
<asset src="www/childbrowser.js" target="childbrowser.js" />
<asset src="www/childbrowser" target="childbrowser" />
<!-- android -->
<platform name="android">
<config-file target="AndroidManifest.xml" parent="/manifest/application">
<activity android:name="com.phonegap.plugins.childBrowser.ChildBrowser"
android:label="@string/app_name">
<intent-filter>
</intent-filter>
</activity>
</config-file>
<!-- Cordova 1.5 - 1.9 -->
<config-file target="res/xml/plugins.xml" parent="/plugins">
<plugin name="ChildBrowser"
value="com.phonegap.plugins.childBrowser.ChildBrowser"/>
</config-file>
<!-- Cordova 2.0.0 -->
<config-file target="res/xml/config.xml" …Run Code Online (Sandbox Code Playgroud) admob phonegap-plugins cordova phonegap-build phonegap-admob
我在我的主xml文件中有这个:
<com.google.android.gms.ads.AdView
xmlns:ads="http://schemas.android.com/apk/lib/com.google.ads"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
ads:adUnitId="******************"
ads:adSize="BANNER"
android:id="@+id/adView"/>
Run Code Online (Sandbox Code Playgroud)
我已经设置了广告尺寸和单位ID,但是当它运行时(来自MainActivity.java),
AdView adView = (AdView)this.findViewById(com.example.lovetestactual.R.id.adView);
AdRequest adRequest = new AdRequest.Builder().build();
adView.loadAd(adRequest);
Run Code Online (Sandbox Code Playgroud)
它抛出了标题中的例外情况.
您可能知道,Google开始使用Firebase作为分析,因此我想在我当前的项目中使用它.我成功完成了实施并将项目上传到iTunes Connect.但是我收到了下面的邮件.我不想使用Firebase的push notificaiton选项,但它包含在SDK中.我需要将其删除吗?怎么样?它会导致被拒绝审查吗?
亲爱的开发者,
我们发现了您最近发布的"即时宝贝梦"的一个或多个问题.您的投放成功,但您可能希望在下次投放时更正以下问题:
缺少推送通知权利 - 您的应用似乎包含用于向Apple推送通知服务注册的API,但应用签名的权利不包括"aps-environment"权利.如果您的应用使用Apple推送通知服务,请确保在配置门户中为推送通知启用了您的应用ID,并在使用包含"aps-environment"权利的配置配置文件对应用进行签名后重新提交.有关详细信息,请参阅"本地和推送通知编程指南"中的"供应和开发".如果您的应用不使用Apple推送通知服务,则无需执行任何操作.您可以从将来的提交中删除API以停止此警告.如果您使用第三方框架,则可能需要与开发人员联系以获取有关删除API的信息.
纠正问题后,您可以使用Xcode或Application Loader将新二进制文件上传到iTunes Connect.
问候,
App Store团队
我已经下载了最新版本的googles admob sdk.但是现在我在使用最新的sdk编译xcode 4.5时会遇到以下错误.
Undefined symbols for architecture i386:
"_OBJC_CLASS_$_ASIdentifierManager", referenced from:
objc-class-ref in libGoogleAdMobAds.a(GADIdentifierUtilities.o)
ld: symbol(s) not found for architecture i386
clang: error: linker command failed with exit code 1 (use -v to see invocation)
Run Code Online (Sandbox Code Playgroud)
什么可能是错的?
AdMob收益如何计算?它仅取决于点击次数吗?或者它取决于展示的广告?或两者兼而有之?
有一天,我有11次点击,赚了我0.12美元,第二天我有14次点击,赚了我0.51美元,然后有一天我只赚了0.07美元,11次点击.
以下是我从AdMob获得的收入截图...
