- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
好的,当我通过 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
这会让我认为你需要检查你的 key
和 secret键
是正确的。
来自 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
确保您的 productionAppKey
和 productionAppSecret
是正确的(并且可能与您开发的不一样)
关于Android 应用程序在开发手机上安装和运行良好,但在 Google Play 上显示 "Unfortunately app has stopped",我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/20663628/
我是一个初学者,我需要一些建议。当我尝试在 Android 模拟器中运行以下 Android 应用程序时,当我尝试运行它时,它显示“不幸的是,再次已关闭”。 我不确定为什么它不起作用。 有人可以给我建
我正在尝试在 Android Studio 中制作一个应用程序,它要求您将文件下载到用户设备上的 sdcard/Download/文件夹中。问题是,当我输入要下载的 URL 并单击“下载”时,应用程序
自上次更新我的 Android Studio 和我的 SDK 包以来,每当我启动模拟器时都会收到此错误。请检查下面的屏幕截图。 我的 logcat 将这些报告为错误语句: 06-11 05:18:22
很难说出这里要问什么。这个问题模棱两可、含糊不清、不完整、过于宽泛或夸夸其谈,无法以目前的形式得到合理的回答。如需帮助澄清此问题以便重新打开,visit the help center . 关闭 1
这个问题在这里已经有了答案: Unfortunately MyApp has stopped. How can I solve this? (22 个回答) 3年前关闭。 我用我在 github 上找
在我的应用程序中单击图像按钮时,我总是收到消息:“不幸的是,myapp已停止”。问题是什么??? 这是我的代码。单击图像按钮将调用showImageDialog方法: public class Rem
我是个新人,正在从新的波士顿学习编码。 MainActivity.java: package com.tipsoftech.fastfart; import android.app.Activity;
我是 Android 应用程序和 Java 的新手,一直在制作一个简单的应用程序,一切都很顺利,直到我打开模拟器并出现以下错误“不幸的是,您的应用程序已停止”。这是我的主要 Activity.java
我是 Android 应用程序开发新手,我尝试编写我的第一个简单应用程序来尝试在 Activity 之间发送数据。代码已编译,我尝试在虚拟设备上启动它,但正如标题所示,它停止了。 这是 logcat
这是我的第一个应用程序。我所需要的只是五个按钮,其中两个用于调用某些电话号码(到目前为止只创建了一个),三个按钮用于将用户带到某个 URL。我没有收到任何错误或警告,也没有任何有关如何导航 LogCa
运行应用程序时收到以下错误: 02-09 18:01:19.582: D/AndroidRuntime(1306): Shutting down VM 02-09 18:01:19.582: W/da
我是 Android 编程新手。我正在遵循 youtube 上的 Android 教程指南。这是我们的论文。 这是主 Activity package com.example.abrico.viola
我正在尝试为 android 编写一个基本的绘图 Android 应用程序并在 Genymotion 上测试它,但我无法单击应用程序图标(它显示“不幸的是 [app] 已停止。”) 我不确定这三个私有
你好,我在运行应用程序时遇到问题,当它运行不正常时,它会打开,但是当我按下按钮时,告诉我应用程序已停止并且无法运行:“不幸的是,应用程序已停止”。这是我的简单代码,我希望我能尽快得到答案......谢
我的应用程序只工作一次,在第二次运行时(和其他...)我得到“不幸的是,我的应用程序已停止”。我已经尝试了很多,但对我没有任何影响。这是代码: 主要 Activity : 包 com.example.
你好,我是新编程,这是我的第一个应用程序,我试图重新创建一个我找到教程的应用程序。是一个小费计算器,应用程序打开没有问题,但当我尝试使用它时,它停止工作并关闭。 XML代码是 package com.
当我使用模拟器运行我的 Android 应用程序时,它运行良好,在我的手机上也是如此,但在另一部手机上,尝试运行该应用程序时,我总是得到“不幸的是 [...] 已停止”错误。我如何找出这个错误的原因(
我想将位图实现到surfaceview,并尝试在单击时通过按钮编辑图像。但有一个问题。当我在模拟器上运行它时,一切都是正确的,直到按下按钮。 “不幸的是,......停止......”出现在屏幕上,程
我的应用程序运行正常! 当运行android应用程序编译无误,但在显示时返回消息。 Unfortunately, application has stopped 当我安装并链接这两个包时发生了 rea
这是一个食物食谱应用程序,我只是在学习,所以如果你能帮我纠正我的错误并解释,我将非常感激。提前致谢 主要 Activity package rice.recipe; import android.ap
我是一名优秀的程序员,十分优秀!