我正在尝试将AdWhirl集成到我的一个应用程序中,当我尝试运行它时,它总是崩溃。我已经将它设置为测试模式,试图让它在模拟器中工作,但它只工作了一部分时间。没有Adwhirl就不会坠毁。我已经把我的日志放在里面了,以防有人知道我该如何改正我的错误。谢谢你的帮助。
I/MillennialMediaAdSDK( 541): Last ad name is null. Call for new ad.
D/MillennialMediaAdSDK( 541): *********** Advertising test mode is deprecated.
D/MillennialMediaAdSDK( 541): Calling for an advertisement: http://androidsdk.a
ds.mp.mydas.mobi/getAd.php5?sdkapid=37786&auid=000000000000000&ua=Mozilla%2F5.0+
%28Linux%3B+U%3B+Android+2.3.1%3B+en-us%3B+sdk+Build%2FGSI11%29+AppleWebKit%2F53
3.1+%28KHTML%2C+like+Gecko%29+Version%2F4.0+Mobile+Safari%2F533.1sdk&dm=sdk&dv=A
ndroid2.3.1&mmisdk=4.1.0-11.03.04.a&cachedvideo=true&adtype=MMBannerAdTop
D/dalvikvm( 541): GC_CONCURRENT freed 340K, 51% free 2894K/5831K, external 1022
K/1038K, paused 5ms+4ms
W/dalvikvm( 541): JNI WARNING: jarray 0x40572640 points to non-array object (Lj
ava/lang/String;)
I/dalvikvm( 541): "WebViewCoreThread" prio=5 tid=10 NATIVE
I/dalvikvm( 541): | group="main" sCount=0 dsCount=0 obj=0x40570320 self=0x206
450
I/dalvikvm( 541): | sysTid=553 nice=0 sched=0/0 cgrp=default handle=2158264
I/dalvikvm( 541): | schedstat=( 244795849 86489457 35 )
I/dalvikvm( 541): at android.webkit.JWebCoreJavaBridge.sharedTimerFired(Nativ
e Method)
I/dalvikvm( 541): at android.webkit.JWebCoreJavaBridge.sharedTimerFired(Nativ
e Method)
I/dalvikvm( 541): at android.webkit.JWebCoreJavaBridge.fireSharedTimer(JWebCo
reJavaBridge.java:91)
I/dalvikvm( 541): at android.webkit.JWebCoreJavaBridge.handleMessage(JWebCore
JavaBridge.java:108)
I/dalvikvm( 541): at android.os.Handler.dispatchMessage(Handler.java:99)
I/dalvikvm( 541): at android.os.Looper.loop(Looper.java:123)
I/dalvikvm( 541): at android.webkit.WebViewCore$WebCoreThread.run(WebViewCore
.java:629)
I/dalvikvm( 541): at java.lang.Thread.run(Thread.java:1019)
I/dalvikvm( 541):
E/dalvikvm( 541): VM aborting
I/DEBUG ( 540): *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *
**
I/DEBUG ( 540): Build fingerprint: 'generic/sdk/generic:2.3.1/GSI11/93351:eng
/test-keys'
I/DEBUG ( 540): pid: 541, tid: 553 >>> org.paceacademy <<<
I/DEBUG ( 540): signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr deadd00
d
I/DEBUG ( 540): r0 fffffebc r1 deadd00d r2 00000026 r3 00000000
I/DEBUG ( 540): r4 81da45c8 r5 40572640 r6 81d859ec r7 0020efa8
I/DEBUG ( 540): r8 439c1b58 r9 42ddbf1c 10 42ddbf04 fp 4168d82c
I/DEBUG ( 540): ip 81da4728 sp 439c0e90 lr afd19375 pc 81d45a02 cpsr 200
00030
I/DEBUG ( 540): #00 pc 00045a02 /system/lib/libdvm.so
I/DEBUG ( 540): #01 pc 000376fc /system/lib/libdvm.so
I/DEBUG ( 540): #02 pc 000399c4 /system/lib/libdvm.so
I/DEBUG ( 540): #03 pc 0003a4a0 /system/lib/libdvm.so
I/DEBUG ( 540): #04 pc 0032b6e6 /system/lib/libwebcore.so
I/DEBUG ( 540): #05 pc 002a4db4 /system/lib/libwebcore.so
I/DEBUG ( 540): #06 pc 001a6146 /system/lib/libwebcore.so
I/DEBUG ( 540): #07 pc 002a5880 /system/lib/libwebcore.so
I/DEBUG ( 540): #08 pc 00359e5e /system/lib/libwebcore.so
I/DEBUG ( 540): #09 pc 0035d336 /system/lib/libwebcore.so
I/DEBUG ( 540): #10 pc 003638ea /system/lib/libwebcore.so
I/DEBUG ( 540): #11 pc 0019f70a /system/lib/libwebcore.so
I/DEBUG ( 540): #12 pc 0019f790 /system/lib/libwebcore.so
I/DEBUG ( 540): #13 pc 001a3d9a /system/lib/libwebcore.so
I/DEBUG ( 540): #14 pc 000d0dca /system/lib/libwebcore.so
I/DEBUG ( 540): #15 pc 000d1b7a /system/lib/libwebcore.so
I/DEBUG ( 540): #16 pc 000d1dee /system/lib/libwebcore.so
I/DEBUG ( 540): #17 pc 000d2dae /system/lib/libwebcore.so
I/DEBUG ( 540): #18 pc 000d31d4 /system/lib/libwebcore.so
I/DEBUG ( 540): #19 pc 000e260a /system/lib/libwebcore.so
I/DEBUG ( 540): #20 pc 000e2634 /system/lib/libwebcore.so
I/DEBUG ( 540): #21 pc 001a8f06 /system/lib/libwebcore.so
I/DEBUG ( 540): #22 pc 000dfcfe /system/lib/libwebcore.so
I/DEBUG ( 540): #23 pc 00271980 /system/lib/libwebcore.so
I/DEBUG ( 540): #24 pc 002719b4 /system/lib/libwebcore.so
I/DEBUG ( 540): #25 pc 000e1a08 /system/lib/libwebcore.so
I/DEBUG ( 540): #26 pc 00272e0a /system/lib/libwebcore.so
I/DEBUG ( 540): #27 pc 000eb132 /system/lib/libwebcore.so
I/DEBUG ( 540): #28 pc 00272de6 /system/lib/libwebcore.so
I/DEBUG ( 540): #29 pc 0027322e /system/lib/libwebcore.so
I/DEBUG ( 540): #30 pc 002732d6 /system/lib/libwebcore.so
I/DEBUG ( 540): #31 pc 00273418 /system/lib/libwebcore.so
I/DEBUG ( 540):
I/DEBUG ( 540): code around pc:
I/DEBUG ( 540): 81d459e0 447a4479 ed0cf7d1 20004c09 ee34f7d1
I/DEBUG ( 540): 81d459f0 447c4808 6bdb5823 d0002b00 49064798
I/DEBUG ( 540): 81d45a00 700a2226 eea0f7d1 0004361f 000451dd
I/DEBUG ( 540): 81d45a10 0005ebd2 fffffebc deadd00d b510b40e
I/DEBUG ( 540): 81d45a20 4c0a4b09 447bb083 aa05591b 6b5bca02
I/DEBUG ( 540):
I/DEBUG ( 540): code around lr:
I/DEBUG ( 540): afd19354 b0834a0d 589c447b 26009001 686768a5
I/DEBUG ( 540): afd19364 220ce008 2b005eab 1c28d003 47889901
I/DEBUG ( 540): afd19374 35544306 d5f43f01 2c006824 b003d1ee
I/DEBUG ( 540): afd19384 bdf01c30 000281a8 ffffff88 1c0fb5f0
I/DEBUG ( 540): afd19394 43551c3d a904b087 1c16ac01 604d9004
I/DEBUG ( 540):
I/DEBUG ( 540): stack:
I/DEBUG ( 540): 439c0e50 00000015
I/DEBUG ( 540): 439c0e54 afd18407 /system/lib/libc.so
I/DEBUG ( 540): 439c0e58 afd4270c /system/lib/libc.so
I/DEBUG ( 540): 439c0e5c afd426b8 /system/lib/libc.so
I/DEBUG ( 540): 439c0e60 00000000
I/DEBUG ( 540): 439c0e64 afd19375 /system/lib/libc.so
I/DEBUG ( 540): 439c0e68 00206450 [heap]
I/DEBUG ( 540): 439c0e6c afd183d9 /system/lib/libc.so
I/DEBUG ( 540): 439c0e70 0020efa8 [heap]
I/DEBUG ( 540): 439c0e74 0005ebd2 [heap]
I/DEBUG ( 540): 439c0e78 40572640 /dev/ashmem/dalvik-heap (deleted)
I/DEBUG ( 540): 439c0e7c 81d859ec /system/lib/libdvm.so
I/DEBUG ( 540): 439c0e80 0020efa8 [heap]
I/DEBUG ( 540): 439c0e84 afd18437 /system/lib/libc.so
I/DEBUG ( 540): 439c0e88 df002777
I/DEBUG ( 540): 439c0e8c e3a070ad
I/DEBUG ( 540): #00 439c0e90 00000001
I/DEBUG ( 540): 439c0e94 81d37701 /system/lib/libdvm.so
I/DEBUG ( 540): #01 439c0e98 00000001
I/DEBUG ( 540): 439c0e9c 81d399c9 /system/lib/libdvm.so
I/BootReceiver( 60): Copying /data/tombstones/tombstone_00 to DropBox (SYSTEM_
TOMBSTONE)
D/Zygote ( 32): Process 541 terminated by signal (11)
I/ActivityManager( 60): Process org.paceacademy (pid 541) has died.
E/InputDispatcher( 60): channel '406ec328 org.paceacademy/org.paceacademy.Yach
tMain (server)' ~ Consumer closed input channel or an error occurred. events=0x
8
E/InputDispatcher( 60): channel '406ec328 org.paceacademy/org.paceacademy.Yach
tMain (server)' ~ Channel is unrecoverably broken and will be disposed!
I/WindowManager( 60): WIN DEATH: Window{406ec328 org.paceacademy/org.paceacade
my.YachtMain paused=false}
D/dalvikvm( 60): GC_CONCURRENT freed 910K, 51% free 4257K/8519K, external 2269
K/3469K, paused 6ms+5ms
D/dalvikvm( 60): GC_FOR_MALLOC freed 777K, 51% free 4190K/8519K, external 2269
K/3469K, paused 48ms
W/InputManagerService( 60): Got RemoteException sending setActive(false) notif
ication to pid 541 uid 10031
I/ActivityManager( 60): Starting: Intent { act=android.intent.action.MAIN cat=
[android.intent.category.LAUNCHER] flg=0x10200000 cmp=org.paceacademy/.YachtMain
} from pid 132
I/ActivityManager( 60): Start proc org.paceacademy for activity org.paceacadem
y/.YachtMain: pid=558 uid=10031 gids={3003}
I/AdWhirl SDK( 558): Creating adWhirlManager...
D/AdWhirl SDK( 558): Locale is: en_US
D/AdWhirl SDK( 558): Hashed device ID is: 7d1dd13a2fa91c0ad174cb69a11549a3
I/AdWhirl SDK( 558): Finished creating adWhirlManager
D/AdWhirl SDK( 558): Prefs{dc2a61bb5f3e4b09bfe540337f6b3169}: {"config": "{"ext
ra":{"location_on":0,"background_color_rgb":{"red":255,"green":255,"blue":255,"a
lpha":1},"text_color_rgb":{"red":0,"green":0,"blue":0,"alpha":1},"cycle_time":30
,"transition":8},"rations":[{"nid":"e3b8017b430843b5a029b3ec810578f6","type":1,"
nname":"admob","weight":50,"priority":1,"key":"a14d79bee7a2b3a"},{"nid":"c59db85
5942646f899f70286a04a9819","type":6,"nname":"millennial","weight":50,"priority":
2,"key":"37786"}]}
D/AdWhirl SDK( 558): ", "timestamp": 1300642235582}
I/AdWhirl SDK( 558): Using stored config data
D/AdWhirl SDK( 558): Received jsonString: {"extra":{"location_on":0,"background
_color_rgb":{"red":255,"green":255,"blue":255,"alpha":1},"text_color_rgb":{"red"
:0,"green":0,"blue":0,"alpha":1},"cycle_time":30,"transition":8},"rations":[{"ni
d":"e3b8017b430843b5a029b3ec810578f6","type":1,"nname":"admob","weight":50,"prio
rity":1,"key":"a14d79bee7a2b3a"},{"nid":"c59db855942646f899f70286a04a9819","type
":6,"nname":"millennial","weight":50,"priority":2,"key":"37786"}]}
I/AdWhirl SDK( 558): Rotating Ad
D/AdWhirl SDK( 558): Dart is <72.10939745113429> of <100.0>
I/ActivityManager( 60): Displayed org.paceacademy/.YachtMain: +1s263ms
D/AdWhirl SDK( 558): Showing ad:
D/AdWhirl SDK( 558): nid: c59db855942646f899f70286a04a9819
D/AdWhirl SDK( 558): name: millennial
D/AdWhirl SDK( 558): type: 6
D/AdWhirl SDK( 558): key: 37786
D/AdWhirl SDK( 558): key2:
D/AdWhirl SDK( 558): Valid adapter, calling handle()
D/MillennialMediaAdSDK( 558): New MMAdView Started
I/MillennialMediaAdSDK( 558): Activity: ActivityInfo{40532bf8 com.millennialmed
ia.android.VideoPlayer}
I/MillennialMediaAdSDK( 558): Activity: ActivityInfo{405336e0 com.millennialmed
ia.android.MMAdViewOverlayActivity}
D/MillennialMediaAdSDK( 558): callForAd
D/MillennialMediaAdSDK( 558): Automatic ad fetching is off with -1. You must ma
nually call for ads.
I/MillennialMediaAdSDK( 558): No download in progress.
I/MillennialMediaAdSDK( 558): Pending download?: false
I/MillennialMediaAdSDK( 558): No incomplete downloads.
I/MillennialMediaAdSDK( 558): Last ad name is null. Call for new ad.
D/MillennialMediaAdSDK( 558): *********** Advertising test mode is deprecated.
D/MillennialMediaAdSDK( 558): Calling for an advertisement: http://androidsdk.a
ds.mp.mydas.mobi/getAd.php5?sdkapid=37786&auid=000000000000000&ua=Mozilla%2F5.0+
%28Linux%3B+U%3B+Android+2.3.1%3B+en-us%3B+sdk+Build%2FGSI11%29+AppleWebKit%2F53
3.1+%28KHTML%2C+like+Gecko%29+Version%2F4.0+Mobile+Safari%2F533.1sdk&dm=sdk&dv=A
ndroid2.3.1&mmisdk=4.1.0-11.03.04.a&cachedvideo=true&adtype=MMBannerAdTop
W/dalvikvm( 558): JNI WARNING: jarray 0x4058f070 points to non-array object (Lj
ava/lang/String;)
I/dalvikvm( 558): "WebViewCoreThread" prio=5 tid=10 NATIVE
I/dalvikvm( 558): | group="main" sCount=0 dsCount=0 obj=0x40536d08 self=0x1f0
d48
I/dalvikvm( 558): | sysTid=567 nice=0 sched=0/0 cgrp=default handle=2035328
I/dalvikvm( 558): | schedstat=( 212422317 125415498 40 )
I/dalvikvm( 558): at android.webkit.JWebCoreJavaBridge.sharedTimerFired(Nativ
e Method)
I/dalvikvm( 558): at android.webkit.JWebCoreJavaBridge.sharedTimerFired(Nativ
e Method)
I/dalvikvm( 558): at android.webkit.JWebCoreJavaBridge.fireSharedTimer(JWebCo
reJavaBridge.java:91)
I/dalvikvm( 558): at android.webkit.JWebCoreJavaBridge.handleMessage(JWebCore
JavaBridge.java:108)
I/dalvikvm( 558): at android.os.Handler.dispatchMessage(Handler.java:99)
I/dalvikvm( 558): at android.os.Looper.loop(Looper.java:123)
I/dalvikvm( 558): at android.webkit.WebViewCore$WebCoreThread.run(WebViewCore
.java:629)
I/dalvikvm( 558): at java.lang.Thread.run(Thread.java:1019)
I/dalvikvm( 558):
E/dalvikvm( 558): VM aborting
I/DEBUG ( 540): *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *
**
I/DEBUG ( 540): Build fingerprint: 'generic/sdk/generic:2.3.1/GSI11/93351:eng
/test-keys'
I/DEBUG ( 540): pid: 558, tid: 567 >>> org.paceacademy <<<
I/DEBUG ( 540): signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr deadd00
d
I/DEBUG ( 540): r0 fffffebc r1 deadd00d r2 00000026 r3 00000000
I/DEBUG ( 540): r4 81da45c8 r5 4058f070 r6 81d859ec r7 001f0f48
I/DEBUG ( 540): r8 43868b58 r9 42ddbf1c 10 42ddbf04 fp 4168d82c
I/DEBUG ( 540): ip 81da4728 sp 43867e90 lr afd19375 pc 81d45a02 cpsr 200
00030
I/DEBUG ( 540): #00 pc 00045a02 /system/lib/libdvm.so
I/DEBUG ( 540): #01 pc 000376fc /system/lib/libdvm.so
I/DEBUG ( 540): #02 pc 000399c4 /system/lib/libdvm.so
I/DEBUG ( 540): #03 pc 0003a4a0 /system/lib/libdvm.so
I/DEBUG ( 540): #04 pc 0032b6e6 /system/lib/libwebcore.so
I/DEBUG ( 540): #05 pc 002a4db4 /system/lib/libwebcore.so
I/DEBUG ( 540): #06 pc 001a6146 /system/lib/libwebcore.so
I/DEBUG ( 540): #07 pc 002a5880 /system/lib/libwebcore.so
I/DEBUG ( 540): #08 pc 00359e5e /system/lib/libwebcore.so
I/DEBUG ( 540): #09 pc 0035d336 /system/lib/libwebcore.so
I/DEBUG ( 540): #10 pc 003638ea /system/lib/libwebcore.so
I/DEBUG ( 540): #11 pc 0019f70a /system/lib/libwebcore.so
I/DEBUG ( 540): #12 pc 0019f790 /system/lib/libwebcore.so
I/DEBUG ( 540): #13 pc 001a3d9a /system/lib/libwebcore.so
I/DEBUG ( 540): #14 pc 000d0dca /system/lib/libwebcore.so
I/DEBUG ( 540): #15 pc 000d1b7a /system/lib/libwebcore.so
I/DEBUG ( 540): #16 pc 000d1dee /system/lib/libwebcore.so
I/DEBUG ( 540): #17 pc 000d2dae /system/lib/libwebcore.so
I/DEBUG ( 540): #18 pc 000d31d4 /system/lib/libwebcore.so
I/DEBUG ( 540): #19 pc 000e260a /system/lib/libwebcore.so
I/DEBUG ( 540): #20 pc 000e2634 /system/lib/libwebcore.so
I/DEBUG ( 540): #21 pc 001a8f06 /system/lib/libwebcore.so
I/DEBUG ( 540): #22 pc 000dfcfe /system/lib/libwebcore.so
I/DEBUG ( 540): #23 pc 00271980 /system/lib/libwebcore.so
I/DEBUG ( 540): #24 pc 002719b4 /system/lib/libwebcore.so
I/DEBUG ( 540): #25 pc 000e1a08 /system/lib/libwebcore.so
I/DEBUG ( 540): #26 pc 00272e0a /system/lib/libwebcore.so
I/DEBUG ( 540): #27 pc 000eb132 /system/lib/libwebcore.so
I/DEBUG ( 540): #28 pc 00272de6 /system/lib/libwebcore.so
I/DEBUG ( 540): #29 pc 0027322e /system/lib/libwebcore.so
I/DEBUG ( 540): #30 pc 002732d6 /system/lib/libwebcore.so
I/DEBUG ( 540): #31 pc 00273418 /system/lib/libwebcore.so
I/DEBUG ( 540):
I/DEBUG ( 540): code around pc:
I/DEBUG ( 540): 81d459e0 447a4479 ed0cf7d1 20004c09 ee34f7d1
I/DEBUG ( 540): 81d459f0 447c4808 6bdb5823 d0002b00 49064798
I/DEBUG ( 540): 81d45a00 700a2226 eea0f7d1 0004361f 000451dd
I/DEBUG ( 540): 81d45a10 0005ebd2 fffffebc deadd00d b510b40e
I/DEBUG ( 540): 81d45a20 4c0a4b09 447bb083 aa05591b 6b5bca02
I/DEBUG ( 540):
I/DEBUG ( 540): code around lr:
I/DEBUG ( 540): afd19354 b0834a0d 589c447b 26009001 686768a5
I/DEBUG ( 540): afd19364 220ce008 2b005eab 1c28d003 47889901
I/DEBUG ( 540): afd19374 35544306 d5f43f01 2c006824 b003d1ee
I/DEBUG ( 540): afd19384 bdf01c30 000281a8 ffffff88 1c0fb5f0
I/DEBUG ( 540): afd19394 43551c3d a904b087 1c16ac01 604d9004
I/DEBUG ( 540):
I/DEBUG ( 540): stack:
I/DEBUG ( 540): 43867e50 00000015
I/DEBUG ( 540): 43867e54 afd18407 /system/lib/libc.so
I/DEBUG ( 540): 43867e58 afd4270c /system/lib/libc.so
I/DEBUG ( 540): 43867e5c afd426b8 /system/lib/libc.so
I/DEBUG ( 540): 43867e60 00000000
I/DEBUG ( 540): 43867e64 afd19375 /system/lib/libc.so
I/DEBUG ( 540): 43867e68 001f0d48 [heap]
I/DEBUG ( 540): 43867e6c afd183d9 /system/lib/libc.so
I/DEBUG ( 540): 43867e70 001f0f48 [heap]
I/DEBUG ( 540): 43867e74 0005ebd2 [heap]
I/DEBUG ( 540): 43867e78 4058f070 /dev/ashmem/dalvik-heap (deleted)
I/DEBUG ( 540): 43867e7c 81d859ec /system/lib/libdvm.so
I/DEBUG ( 540): 43867e80 001f0f48 [heap]
I/DEBUG ( 540): 43867e84 afd18437 /system/lib/libc.so
I/DEBUG ( 540): 43867e88 df002777
I/DEBUG ( 540): 43867e8c e3a070ad
I/DEBUG ( 540): #00 43867e90 00000001
I/DEBUG ( 540): 43867e94 81d37701 /system/lib/libdvm.so
I/DEBUG ( 540): #01 43867e98 00000001
I/DEBUG ( 540): 43867e9c 81d399c9 /system/lib/libdvm.so
I/BootReceiver( 60): Copying /data/tombstones/tombstone_01 to DropBox (SYSTEM_
TOMBSTONE)
D/Zygote ( 32): Process 558 terminated by signal (11)
E/InputDispatcher( 60): channel '406df298 org.paceacademy/org.paceacademy.Yach
tMain (server)' ~ Consumer closed input channel or an error occurred. events=0x
8
E/InputDispatcher( 60): channel '406df298 org.paceacademy/org.paceacademy.Yach
tMain (server)' ~ Channel is unrecoverably broken and will be disposed!
D/dalvikvm( 60): GC_FOR_MALLOC freed 800K, 51% free 4213K/8519K, external 2269
K/3469K, paused 80ms
I/ActivityManager( 60): Process org.paceacademy (pid 558) has died.
I/WindowManager( 60): WIN DEATH: Window{406df298 org.paceacademy/org.paceacade
my.YachtMain paused=false}
D/dalvikvm( 60): GC_FOR_MALLOC freed 773K, 51% free 4184K/8519K, external 2269
K/3469K, paused 51ms
W/InputManagerService( 60): Got RemoteException sending setActive(false) notif
ication to pid 558 uid 10031
最佳答案
有两个好消息。
这只会影响千禧一代适配器——其他所有适配器都工作正常
它只出现在模拟器中,并且只出现在2.3版本中。在真正的设备上,这不是问题。
你可以阅读这个Millennial Media's Android developer wiki。他们回答了一个问题:“为什么我的应用程序会在android 2.3仿真器中崩溃?”以下方式:
MMADVIEW类依赖WebVIEW的JavaScript到Java桥。不幸的是,这座桥在android模拟器的2.3实现中被打破了,很可能永远不会被修复。作为替代方案,您可以使用其他版本的模拟器进行测试,或使用物理android 2.3设备。http://code.google.com/p/android/issues/detail?id=12987
为了解决这个问题,允许我在2.3仿真器中测试我的应用程序,而无需在AdWhirl Web界面中停用Millennial,我已经修补了AdWhirl的Millennial适配器,以便在2.3仿真器中优雅地跳过。这可以通过以下方式完成:
使用7-zip或类似工具从com.adwhirl.adapters.MillennialAdapter
中删除AdWhirlSDK_Android_2.6.3.jar
。
从AdWhirl code repository下载MillennialAdapter
的Java文件,并将其放置在项目中的正确文件夹结构(com.adwhirl.adapters
)中。
调整适配器handle()
方法的开头,使其看起来如下所示:
@覆盖
public void handle(){
log.d(adwhirlutil.adwhirl,“使用特定于好消息的MillennialAdapter”);
/ *
*防止2.3仿真器崩溃
*/
if(“google牱sdk.equals(build.product)&&“9.equals(build.version.sdk)){
log.d(adwhirlutil.adwhirl,“检测到的姜饼模拟器”);
引发新的运行时异常(
“姜饼模拟器不支持Millenialadapter”);
}
…
如果你现在在2.3仿真器中启动你的应用程序,那么每当你试图请求姜饼广告并使用回填料列表中的下一个网络时,AdWhirl就会滚动。如果你在2.2仿真器或真实设备上启动你的应用,千禧一代的广告就会出现。