我的Android应用程序在模拟器上运行良好,广告出现并正常工作等,当我在使用eclipse adt的手机上测试时,但是当它从Play商店下载时,它会立即崩溃并给出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)
我不明白为什么。任何帮助将不胜感激
答案 0 :(得分:3)
你的proguard是否已启用?如果是,则必须添加startapp的obfustication代码。它写的是他们的文档。 Here是链接。代码从那里复制。
-keep class com.startapp.** {
*;
}
-keepattributes Exceptions, InnerClasses, Signature, Deprecated, SourceFile,
LineNumberTable, *Annotation*, EnclosingMethod
-dontwarn android.webkit.JavascriptInterface
-dontwarn com.startapp.**