gpt4 book ai didi

Android 应用程序在开发手机上安装和运行良好,但在 Google Play 上显示 "Unfortunately app has stopped"

转载 作者:行者123 更新时间:2023-11-29 21:21:35 25 4
gpt4 key购买 nike

好的,当我通过 USB 连接时,我的应用程序在开发期间可以在 Android 手机上正常安装和运行。但是,当我部署到生产环境时,现在每次打开应用程序时都会显示“不幸的是应用程序已停止”。

我尝试了其他人的建议,我清除了数据和缓存,但没有为我禁用那些按钮。似乎没有要清除的缓存或数据。

我如何找出导致问题的原因?以前有人遇到过这个问题吗?

NEW UPDATE:

so I commented out the
proguard.cfg as shown in the project.properties and then it worked.
so there is something wrong in the proguard.cfg
Can some one see if there is anything obvisous please?
I am using exactly what urban airship suggested on their sample proguard.cfg

Appreciate all your helps

这是来自 Google Play 的日志:

java.lang.RuntimeException: Unable to create application com.rccw.android.MyApplication: 
java.lang.IllegalArgumentException: Application configuration is invalid.
at android.app.ActivityThread.handleBindApplication(ActivityThread.java:4828)
at android.app.ActivityThread.access$1300(ActivityThread.java:151)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1397)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:155)
at android.app.ActivityThread.main(ActivityThread.java:5454)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:511)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1029)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:796)
at dalvik.system.NativeStart.main(Native Method)
Caused by: java.lang.IllegalArgumentException: Application configuration is invalid.
at com.urbanairship.m.b(Unknown Source)
at com.urbanairship.m.a(Unknown Source)
at com.redcarpetcarwash.android.MyApplication.onCreate(Unknown Source)
at android.app.Instrumentation.callApplicationOnCreate(Instrumentation.java:1011)
at android.app.ActivityThread.handleBindApplication(ActivityThread.java:4825)




Heres my project.properties
# This file is automatically generated by Android Tools.
# Do not modify this file -- YOUR CHANGES WILL BE ERASED!
#
# This file must be checked in Version Control Systems.
#
# To customize properties used by the Ant build system edit
# "ant.properties", and override values to adapt the script to your
# project structure.
#
# To enable ProGuard to shrink and obfuscate your code, uncomment this (available properties: sdk.dir, user.home):

proguard.config=${sdk.dir}/tools/proguard/proguard-android.txt:proguard-project.txt

#proguard.config=proguard.cfg

# Project target.
target=Google Inc.:Google APIs:17

在此处输入代码这是 Proguard.cfg

-optimizationpasses 5
-dontusemixedcaseclassnames
-dontskipnonpubliclibraryclasses
-dontpreverify
-verbose
-optimizations !code/simplification/arithmetic,!field/*,!class/merging/*

-keep public class * extends android.app.Activity
-keep public class * extends android.app.Application
-keep public class * extends android.app.Service
-keep public class * extends android.content.BroadcastReceiver
-keep public class * extends android.content.ContentProvider
-keep public class * extends android.app.backup.BackupAgentHelper
-keep public class * extends android.preference.Preference
-keep public class com.android.vending.licensing.ILicensingService

# Suppress warnings if you are NOT using IAP:
-dontwarn com.urbanairship.iap.**

# Required if you are using Autopilot
-keep public class * extends com.urbanairship.Autopilot

# Required if you are using the airshipconfig.properties file
-keepclasseswithmembers public class * extends com.urbanairship.Options {
public *;
}

-keepclasseswithmembers class * {
native <methods>;
}

-keepclasseswithmembers class * {
public <init>(android.content.Context, android.util.AttributeSet);
}

-keepclasseswithmemberns class * {
public <init>(android.content.Context, android.util.AttributeSet, int);
}

-keepclassmembers enum * {
public static **[] values();
public static ** valueOf(java.lang.String);
}

-keep class * implements android.os.Parcelable {
public static final android.os.Parcelable$Creator *;
}

最佳答案

从另一个问题 ( Urban Airship crashes at take off. Illegal Argument Exception ) 听起来你的 configuration is invalid 这会让我认为你需要检查你的 keysecret键是正确的。

来自 docs :

airshipconfig.properties

gcmSender = Your Google API Project Number (allows multiple senders separated by commas)
transport = gcm
developmentAppKey = Your Development App Key
developmentAppSecret = Your Development App Secret
productionAppKey = Your Production App Key
productionAppSecret = Your Production App Secret
inProduction = false

确保您的 productionAppKeyproductionAppSecret 是正确的(并且可能与您开发的不一样)

关于Android 应用程序在开发手机上安装和运行良好,但在 Google Play 上显示 "Unfortunately app has stopped",我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/20663628/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com