如何在我的Android应用程序中解决此错误?

时间:2013-07-18 07:28:22

标签: android

07-18 10:20:54.213: E/Trace(21962): error opening trace file: No such file or directory (2)
07-18 10:20:54.273: D/dalvikvm(21962): GC_FOR_ALLOC freed 77K, 8% free 9365K/10179K, paused 15ms, total 15ms
07-18 10:20:54.278: I/dalvikvm-heap(21962): Grow heap (frag case) to 12.093MB for 2457616-byte allocation
07-18 10:20:54.303: D/dalvikvm(21962): GC_CONCURRENT freed <1K, 7% free 11765K/12615K, paused 12ms+1ms, total 24ms
07-18 10:20:54.388: D/dalvikvm(21962): GC_FOR_ALLOC freed 0K, 7% free 11765K/12615K, paused 10ms, total 10ms
07-18 10:20:54.398: I/dalvikvm-heap(21962): Grow heap (frag case) to 17.366MB for 5529616-byte allocation
07-18 10:20:54.423: D/dalvikvm(21962): GC_CONCURRENT freed 0K, 5% free 17165K/18055K, paused 12ms+2ms, total 24ms
07-18 10:20:54.543: D/libEGL(21962): loaded /system/lib/egl/libEGL_mali.so
07-18 10:20:54.553: D/libEGL(21962): loaded /system/lib/egl/libGLESv1_CM_mali.so
07-18 10:20:54.553: D/libEGL(21962): loaded /system/lib/egl/libGLESv2_mali.so
07-18 10:20:54.558: D/(21962): Device driver API match
07-18 10:20:54.558: D/(21962): Device driver API version: 10
07-18 10:20:54.558: D/(21962): User space API version: 10 
07-18 10:20:54.558: D/(21962): mali: REVISION=Linux-r2p4-02rel0 BUILD_DATE=Thu Oct 25 08:43:05 KST 2012 
07-18 10:20:54.573: D/OpenGLRenderer(21962): Enabling debug mode 0
07-18 10:21:06.303: E/dalvikvm(21962): Could not find class 'com.google.ads.AdView', referenced from method com.innobee.finddifferences.PlayActivity.LoadAds
07-18 10:21:06.303: W/dalvikvm(21962): VFY: unable to resolve new-instance 76 (Lcom/google/ads/AdView;) in Lcom/innobee/finddifferences/PlayActivity;
07-18 10:21:06.303: D/dalvikvm(21962): VFY: replacing opcode 0x22 at 0x0009
07-18 10:21:06.313: I/dalvikvm(21962): DexOpt: unable to optimize static field ref 0x000c at 0x0b in Lcom/innobee/finddifferences/PlayActivity;.LoadAds
07-18 10:21:06.313: D/dalvikvm(21962): DexOpt: unable to opt direct call 0x0091 at 0x18 in Lcom/innobee/finddifferences/PlayActivity;.LoadAds
07-18 10:21:06.313: D/dalvikvm(21962): DexOpt: unable to opt direct call 0x008f at 0x20 in Lcom/innobee/finddifferences/PlayActivity;.LoadAds
07-18 10:21:06.333: D/dalvikvm(21962): GC_FOR_ALLOC freed 2839K, 19% free 15626K/19143K, paused 14ms, total 14ms
07-18 10:21:06.333: I/dalvikvm-heap(21962): Grow heap (frag case) to 18.207MB for 2457616-byte allocation
07-18 10:21:06.363: D/dalvikvm(21962): GC_CONCURRENT freed <1K, 6% free 18025K/19143K, paused 11ms+1ms, total 28ms
07-18 10:21:06.428: D/dalvikvm(21962): GC_FOR_ALLOC freed 0K, 6% free 18025K/19143K, paused 10ms, total 10ms
07-18 10:21:06.438: I/dalvikvm-heap(21962): Grow heap (frag case) to 23.480MB for 5529616-byte allocation
07-18 10:21:06.468: D/dalvikvm(21962): GC_CONCURRENT freed 0K, 5% free 23425K/24583K, paused 11ms+2ms, total 32ms
07-18 10:21:06.598: D/AndroidRuntime(21962): Shutting down VM
07-18 10:21:06.598: W/dalvikvm(21962): threadid=1: thread exiting with uncaught exception (group=0x410e92a0)
07-18 10:21:06.603: E/AndroidRuntime(21962): FATAL EXCEPTION: main
07-18 10:21:06.603: E/AndroidRuntime(21962): java.lang.NoClassDefFoundError: com.google.ads.AdView
07-18 10:21:06.603: E/AndroidRuntime(21962):    at com.innobee.finddifferences.PlayActivity.LoadAds(PlayActivity.java:229)
07-18 10:21:06.603: E/AndroidRuntime(21962):    at com.innobee.finddifferences.PlayActivity.onCreate(PlayActivity.java:113)
07-18 10:21:06.603: E/AndroidRuntime(21962):    at android.app.Activity.performCreate(Activity.java:5206)
07-18 10:21:06.603: E/AndroidRuntime(21962):    at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1094)
07-18 10:21:06.603: E/AndroidRuntime(21962):    at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2074)
07-18 10:21:06.603: E/AndroidRuntime(21962):    at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2135)
07-18 10:21:06.603: E/AndroidRuntime(21962):    at android.app.ActivityThread.access$700(ActivityThread.java:140)
07-18 10:21:06.603: E/AndroidRuntime(21962):    at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1237)
07-18 10:21:06.603: E/AndroidRuntime(21962):    at android.os.Handler.dispatchMessage(Handler.java:99)
07-18 10:21:06.603: E/AndroidRuntime(21962):    at android.os.Looper.loop(Looper.java:137)
07-18 10:21:06.603: E/AndroidRuntime(21962):    at android.app.ActivityThread.main(ActivityThread.java:4921)
07-18 10:21:06.603: E/AndroidRuntime(21962):    at java.lang.reflect.Method.invokeNative(Native Method)
07-18 10:21:06.603: E/AndroidRuntime(21962):    at java.lang.reflect.Method.invoke(Method.java:511)
07-18 10:21:06.603: E/AndroidRuntime(21962):    at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1038)
07-18 10:21:06.603: E/AndroidRuntime(21962):    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:805)
07-18 10:21:06.603: E/AndroidRuntime(21962):    at dalvik.system.NativeStart.main(Native Method)

运行应用时出现此错误,请帮我解决此问题。 我从网站上购买了这个代码,但是当我运行它时它崩溃了。所以我想找到一个解决这个问题的方法来发布我的应用程序。

2 个答案:

答案 0 :(得分:1)

只需手动创建“libs”文件夹,然后在那里添加库。默认情况下,它们不存在。错误是“无法找到类”com.google.ads.AdView“。

答案 1 :(得分:0)

您还应该在Manifest中声明您正在使用AdActivity
我建议您阅读开发者页面上的广告页面:http://developer.android.com/training/monetization/ads-and-ux.html