我的android应用运行良好,广告出现并正常工作等,在模拟器上,当我在使用eclipse adt的手机上测试它时,但当它从play store下载时,立即崩溃,并给出logcat输出:

09-28 18:50:21.280: E/AndroidRuntime(17895): FATAL EXCEPTION: main
09-28 18:50:21.280: E/AndroidRuntime(17895): Process: com.jakebarnby.pop, PID: 17895
09-28 18:50:21.280: E/AndroidRuntime(17895): java.lang.AssertionError
09-28 18:50:21.280: E/AndroidRuntime(17895):    at com.startapp.android.publish.i.b.a.bf.<init>(Unknown Source)
09-28 18:50:21.280: E/AndroidRuntime(17895):    at com.startapp.android.publish.i.b.a.as.a(Unknown Source)
09-28 18:50:21.280: E/AndroidRuntime(17895):    at com.startapp.android.publish.i.j.a(Unknown Source)
09-28 18:50:21.280: E/AndroidRuntime(17895):    at com.startapp.android.publish.i.b.a.q.<init>(Unknown Source)
09-28 18:50:21.280: E/AndroidRuntime(17895):    at com.startapp.android.publish.i.b.a.p.a(Unknown Source)
09-28 18:50:21.280: E/AndroidRuntime(17895):    at com.startapp.android.publish.i.b.a.p.a(Unknown Source)
09-28 18:50:21.280: E/AndroidRuntime(17895):    at com.startapp.android.publish.i.b.a.p.a(Unknown Source)
09-28 18:50:21.280: E/AndroidRuntime(17895):    at com.startapp.android.publish.i.j.a(Unknown  Source)
09-28 18:50:21.280: E/AndroidRuntime(17895):    at com.startapp.android.publish.i.j.a(Unknown Source)
09-28 18:50:21.280: E/AndroidRuntime(17895):    at com.startapp.android.publish.i.j.a(Unknown Source)
09-28 18:50:21.280: E/AndroidRuntime(17895):    at com.startapp.android.publish.i.j.a(Unknown Source)
09-28 18:50:21.280: E/AndroidRuntime(17895):    at com.startapp.android.publish.i.j.a(Unknown   Source)
09-28 18:50:21.280: E/AndroidRuntime(17895):    at com.startapp.android.publish.o.b(Unknown Source)
09-28 18:50:21.280: E/AndroidRuntime(17895):    at com.startapp.android.publish.o.a(Unknown Source)
09-28 18:50:21.280: E/AndroidRuntime(17895):    at com.startapp.android.publish.o.a(Unknown Source)
09-28 18:50:21.280: E/AndroidRuntime(17895):    at jakebarnby.pop.MainActivity.onCreate(Unknown Source)
09-28 18:50:21.280: E/AndroidRuntime(17895):    at android.app.Activity.performCreate(Activity.java:5312)
09-28 18:50:21.280: E/AndroidRuntime(17895):    at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1087)
09-28 18:50:21.280: E/AndroidRuntime(17895):    at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2181)
09-28 18:50:21.280: E/AndroidRuntime(17895):    at     android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2276)
09-28 18:50:21.280: E/AndroidRuntime(17895):    at android.app.ActivityThread.access$800(ActivityThread.java:144)
09-28 18:50:21.280: E/AndroidRuntime(17895):    at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1205)
09-28 18:50:21.280: E/AndroidRuntime(17895):    at android.os.Handler.dispatchMessage(Handler.java:102)
09-28 18:50:21.280: E/AndroidRuntime(17895):    at android.os.Looper.loop(Looper.java:136)
09-28 18:50:21.280: E/AndroidRuntime(17895):    at android.app.ActivityThread.main(ActivityThread.java:5146)
09-28 18:50:21.280: E/AndroidRuntime(17895):    at java.lang.reflect.Method.invokeNative(Native Method)
09-28 18:50:21.280: E/AndroidRuntime(17895):    at java.lang.reflect.Method.invoke(Method.java:515)
09-28 18:50:21.280: E/AndroidRuntime(17895):    at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:796)
09-28 18:50:21.280: E/AndroidRuntime(17895):    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:612)
09-28 18:50:21.280: E/AndroidRuntime(17895):    at dalvik.system.NativeStart.main(Native Method)

我也不知道为什么。任何帮助都将不胜感激

最佳答案

你的proguard启动了吗?如果是,则必须添加startapp的混淆代码。这是他们的文件。Here是链接。从那里复制代码。

-keep class com.startapp.** {
      *;
}

-keepattributes Exceptions, InnerClasses, Signature, Deprecated, SourceFile,
LineNumberTable, *Annotation*, EnclosingMethod
-dontwarn android.webkit.JavascriptInterface
-dontwarn com.startapp.**

10-08 09:13