- Java 双重比较
- java - 比较器与 Apache BeanComparator
- Objective-C 完成 block 导致额外的方法调用?
- database - RESTful URI 是否应该公开数据库主键?
我有一个有 ScrollView 和 MediaPlayer 的 Activity ,当音乐正在播放并且我按下主页时,它正常关闭,但是当我在没有音乐或其他任何东西的情况下按下主页按钮时,应用程序停止运行,请帮助,有避免此问题的代码或方法?我是安卓新手
这是我的日志
01-15 18:05:39.713: W/Trace(795): Unexpected value from nativeGetEnabledTags: 0
01-15 18:05:39.992: W/Trace(795): Unexpected value from nativeGetEnabledTags: 0
01-15 18:05:39.992: W/Trace(795): Unexpected value from nativeGetEnabledTags: 0
01-15 18:05:40.462: D/dalvikvm(795): GC_FOR_ALLOC freed 39K, 7% free 2425K/2584K, paused 65ms, total 76ms
01-15 18:05:40.502: I/dalvikvm-heap(795): Grow heap (frag case) to 3.945MB for 1536016-byte allocation
01-15 18:05:40.571: D/dalvikvm(795): GC_FOR_ALLOC freed <1K, 4% free 3924K/4088K, paused 68ms, total 68ms
01-15 18:05:40.682: D/dalvikvm(795): GC_CONCURRENT freed <1K, 4% free 3924K/4088K, paused 18ms+19ms, total 116ms
01-15 18:05:41.272: D/dalvikvm(795): GC_FOR_ALLOC freed <1K, 5% free 3924K/4088K, paused 46ms, total 46ms
01-15 18:05:41.332: I/dalvikvm-heap(795): Grow heap (frag case) to 7.239MB for 3456016-byte allocation
01-15 18:05:41.443: D/dalvikvm(795): GC_CONCURRENT freed 0K, 3% free 7299K/7464K, paused 24ms+17ms, total 110ms
01-15 18:05:41.711: W/Trace(795): Unexpected value from nativeGetEnabledTags: 0
01-15 18:05:41.711: W/Trace(795): Unexpected value from nativeGetEnabledTags: 0
01-15 18:05:41.741: W/Trace(795): Unexpected value from nativeGetEnabledTags: 0
01-15 18:05:41.782: W/Trace(795): Unexpected value from nativeGetEnabledTags: 0
01-15 18:05:41.932: W/Trace(795): Unexpected value from nativeGetEnabledTags: 0
01-15 18:05:41.942: W/Trace(795): Unexpected value from nativeGetEnabledTags: 0
01-15 18:05:41.961: W/Trace(795): Unexpected value from nativeGetEnabledTags: 0
01-15 18:05:42.021: W/Trace(795): Unexpected value from nativeGetEnabledTags: 0
01-15 18:05:42.021: W/Trace(795): Unexpected value from nativeGetEnabledTags: 0
01-15 18:05:42.071: W/Trace(795): Unexpected value from nativeGetEnabledTags: 0
01-15 18:05:42.071: W/Trace(795): Unexpected value from nativeGetEnabledTags: 0
01-15 18:05:42.071: W/Trace(795): Unexpected value from nativeGetEnabledTags: 0
01-15 18:05:42.091: W/Trace(795): Unexpected value from nativeGetEnabledTags: 0
01-15 18:05:42.131: D/gralloc_goldfish(795): Emulator without GPU emulation detected.
01-15 18:05:42.302: W/Trace(795): Unexpected value from nativeGetEnabledTags: 0
01-15 18:05:42.411: W/Trace(795): Unexpected value from nativeGetEnabledTags: 0
01-15 18:05:45.321: W/Trace(795): Unexpected value from nativeGetEnabledTags: 0
01-15 18:05:45.331: W/Trace(795): Unexpected value from nativeGetEnabledTags: 0
01-15 18:05:45.352: W/Trace(795): Unexpected value from nativeGetEnabledTags: 0
01-15 18:05:45.352: W/Trace(795): Unexpected value from nativeGetEnabledTags: 0
01-15 18:05:45.422: W/Trace(795): Unexpected value from nativeGetEnabledTags: 0
01-15 18:05:45.431: W/Trace(795): Unexpected value from nativeGetEnabledTags: 0
01-15 18:05:45.461: W/Trace(795): Unexpected value from nativeGetEnabledTags: 0
01-15 18:05:45.492: W/Trace(795): Unexpected value from nativeGetEnabledTags: 0
01-15 18:05:45.601: W/Trace(795): Unexpected value from nativeGetEnabledTags: 0
01-15 18:05:45.711: W/Trace(795): Unexpected value from nativeGetEnabledTags: 0
01-15 18:05:45.711: W/Trace(795): Unexpected value from nativeGetEnabledTags: 0
01-15 18:05:45.711: W/Trace(795): Unexpected value from nativeGetEnabledTags: 0
01-15 18:05:45.981: W/Trace(795): Unexpected value from nativeGetEnabledTags: 0
01-15 18:05:45.981: W/Trace(795): Unexpected value from nativeGetEnabledTags: 0
01-15 18:05:45.991: W/Trace(795): Unexpected value from nativeGetEnabledTags: 0
01-15 18:05:46.681: W/Trace(795): Unexpected value from nativeGetEnabledTags: 0
01-15 18:05:46.721: W/Trace(795): Unexpected value from nativeGetEnabledTags: 0
01-15 18:05:46.751: W/Trace(795): Unexpected value from nativeGetEnabledTags: 0
01-15 18:05:46.812: W/Trace(795): Unexpected value from nativeGetEnabledTags: 0
01-15 18:05:47.031: W/Trace(795): Unexpected value from nativeGetEnabledTags: 0
01-15 18:05:47.041: W/Trace(795): Unexpected value from nativeGetEnabledTags: 0
01-15 18:05:47.061: W/Trace(795): Unexpected value from nativeGetEnabledTags: 0
01-15 18:05:47.061: W/Trace(795): Unexpected value from nativeGetEnabledTags: 0
01-15 18:05:47.081: W/Trace(795): Unexpected value from nativeGetEnabledTags: 0
01-15 18:05:47.221: W/Trace(795): Unexpected value from nativeGetEnabledTags: 0
01-15 18:05:47.221: W/Trace(795): Unexpected value from nativeGetEnabledTags: 0
01-15 18:05:47.273: I/Choreographer(795): Skipped 70 frames! The application may be doing too much work on its main thread.
01-15 18:05:47.281: W/Trace(795): Unexpected value from nativeGetEnabledTags: 0
01-15 18:05:47.301: W/Trace(795): Unexpected value from nativeGetEnabledTags: 0
01-15 18:05:47.321: W/Trace(795): Unexpected value from nativeGetEnabledTags: 0
01-15 18:05:47.321: W/Trace(795): Unexpected value from nativeGetEnabledTags: 0
01-15 18:05:47.332: W/Trace(795): Unexpected value from nativeGetEnabledTags: 0
01-15 18:05:47.332: W/Trace(795): Unexpected value from nativeGetEnabledTags: 0
01-15 18:05:47.631: W/Trace(795): Unexpected value from nativeGetEnabledTags: 0
01-15 18:05:47.781: W/Trace(795): Unexpected value from nativeGetEnabledTags: 0
01-15 18:05:47.843: W/Trace(795): Unexpected value from nativeGetEnabledTags: 0
01-15 18:05:48.081: W/Trace(795): Unexpected value from nativeGetEnabledTags: 0
01-15 18:05:48.081: W/Trace(795): Unexpected value from nativeGetEnabledTags: 0
01-15 18:05:48.091: W/Trace(795): Unexpected value from nativeGetEnabledTags: 0
01-15 18:05:48.121: W/Trace(795): Unexpected value from nativeGetEnabledTags: 0
01-15 18:05:48.471: W/Trace(795): Unexpected value from nativeGetEnabledTags: 0
01-15 18:05:48.481: W/Trace(795): Unexpected value from nativeGetEnabledTags: 0
01-15 18:05:48.481: W/Trace(795): Unexpected value from nativeGetEnabledTags: 0
01-15 18:05:48.492: W/Trace(795): Unexpected value from nativeGetEnabledTags: 0
01-15 18:05:48.543: W/Trace(795): Unexpected value from nativeGetEnabledTags: 0
01-15 18:05:48.871: W/Trace(795): Unexpected value from nativeGetEnabledTags: 0
01-15 18:05:48.871: W/Trace(795): Unexpected value from nativeGetEnabledTags: 0
01-15 18:05:48.911: W/Trace(795): Unexpected value from nativeGetEnabledTags: 0
01-15 18:05:48.911: W/Trace(795): Unexpected value from nativeGetEnabledTags: 0
01-15 18:05:48.991: W/Trace(795): Unexpected value from nativeGetEnabledTags: 0
01-15 18:05:48.991: W/Trace(795): Unexpected value from nativeGetEnabledTags: 0
01-15 18:05:49.221: W/Trace(795): Unexpected value from nativeGetEnabledTags: 0
01-15 18:05:49.251: W/Trace(795): Unexpected value from nativeGetEnabledTags: 0
01-15 18:05:49.431: W/Trace(795): Unexpected value from nativeGetEnabledTags: 0
01-15 18:05:49.441: W/Trace(795): Unexpected value from nativeGetEnabledTags: 0
01-15 18:05:49.461: W/Trace(795): Unexpected value from nativeGetEnabledTags: 0
01-15 18:05:49.471: W/Trace(795): Unexpected value from nativeGetEnabledTags: 0
01-15 18:05:49.471: W/Trace(795): Unexpected value from nativeGetEnabledTags: 0
01-15 18:05:49.471: W/Trace(795): Unexpected value from nativeGetEnabledTags: 0
01-15 18:05:49.551: W/Trace(795): Unexpected value from nativeGetEnabledTags: 0
01-15 18:05:49.551: W/Trace(795): Unexpected value from nativeGetEnabledTags: 0
01-15 18:05:49.662: W/Trace(795): Unexpected value from nativeGetEnabledTags: 0
01-15 18:05:49.751: W/Trace(795): Unexpected value from nativeGetEnabledTags: 0
01-15 18:05:49.751: W/Trace(795): Unexpected value from nativeGetEnabledTags: 0
01-15 18:05:49.761: W/Trace(795): Unexpected value from nativeGetEnabledTags: 0
01-15 18:05:49.852: W/Trace(795): Unexpected value from nativeGetEnabledTags: 0
01-15 18:05:49.852: W/Trace(795): Unexpected value from nativeGetEnabledTags: 0
01-15 18:05:49.852: W/Trace(795): Unexpected value from nativeGetEnabledTags: 0
01-15 18:05:50.751: D/dalvikvm(795): GC_FOR_ALLOC freed 1578K, 21% free 6643K/8340K, paused 265ms, total 293ms
01-15 18:05:50.761: I/dalvikvm-heap(795): Grow heap (frag case) to 8.063MB for 1536016-byte allocation
01-15 18:05:51.052: D/dalvikvm(795): GC_CONCURRENT freed 5K, 3% free 8138K/8340K, paused 8ms+66ms, total 270ms
01-15 18:05:51.582: D/dalvikvm(795): GC_FOR_ALLOC freed <1K, 3% free 8138K/8340K, paused 229ms, total 229ms
01-15 18:05:51.812: I/dalvikvm-heap(795): Grow heap (frag case) to 11.354MB for 3456016-byte allocation
01-15 18:05:52.143: D/dalvikvm(795): GC_CONCURRENT freed 0K, 2% free 11513K/11716K, paused 88ms+58ms, total 330ms
01-15 18:05:52.773: W/Trace(795): Unexpected value from nativeGetEnabledTags: 0
01-15 18:05:52.802: W/Trace(795): Unexpected value from nativeGetEnabledTags: 0
01-15 18:05:52.872: W/Trace(795): Unexpected value from nativeGetEnabledTags: 0
01-15 18:05:52.962: W/Trace(795): Unexpected value from nativeGetEnabledTags: 0
01-15 18:05:53.182: W/Trace(795): Unexpected value from nativeGetEnabledTags: 0
01-15 18:05:53.202: W/Trace(795): Unexpected value from nativeGetEnabledTags: 0
01-15 18:05:53.212: W/Trace(795): Unexpected value from nativeGetEnabledTags: 0
01-15 18:05:53.222: W/Trace(795): Unexpected value from nativeGetEnabledTags: 0
01-15 18:05:53.222: W/Trace(795): Unexpected value from nativeGetEnabledTags: 0
01-15 18:05:53.343: W/Trace(795): Unexpected value from nativeGetEnabledTags: 0
01-15 18:05:53.343: W/Trace(795): Unexpected value from nativeGetEnabledTags: 0
01-15 18:05:53.362: I/Choreographer(795): Skipped 148 frames! The application may be doing too much work on its main thread.
01-15 18:05:53.362: W/Trace(795): Unexpected value from nativeGetEnabledTags: 0
01-15 18:05:53.393: W/Trace(795): Unexpected value from nativeGetEnabledTags: 0
01-15 18:05:53.922: W/Trace(795): Unexpected value from nativeGetEnabledTags: 0
01-15 18:05:54.022: W/Trace(795): Unexpected value from nativeGetEnabledTags: 0
01-15 18:05:54.102: W/Trace(795): Unexpected value from nativeGetEnabledTags: 0
01-15 18:05:54.102: W/Trace(795): Unexpected value from nativeGetEnabledTags: 0
01-15 18:05:54.182: W/Trace(795): Unexpected value from nativeGetEnabledTags: 0
01-15 18:05:54.182: W/Trace(795): Unexpected value from nativeGetEnabledTags: 0
01-15 18:05:54.212: W/Trace(795): Unexpected value from nativeGetEnabledTags: 0
01-15 18:05:54.212: W/Trace(795): Unexpected value from nativeGetEnabledTags: 0
01-15 18:05:54.593: W/Trace(795): Unexpected value from nativeGetEnabledTags: 0
01-15 18:05:54.852: W/Trace(795): Unexpected value from nativeGetEnabledTags: 0
01-15 18:05:54.852: W/Trace(795): Unexpected value from nativeGetEnabledTags: 0
01-15 18:05:55.042: W/Trace(795): Unexpected value from nativeGetEnabledTags: 0
01-15 18:05:55.132: W/Trace(795): Unexpected value from nativeGetEnabledTags: 0
01-15 18:05:55.132: W/Trace(795): Unexpected value from nativeGetEnabledTags: 0
01-15 18:05:55.252: W/Trace(795): Unexpected value from nativeGetEnabledTags: 0
01-15 18:05:55.281: W/Trace(795): Unexpected value from nativeGetEnabledTags: 0
01-15 18:05:55.281: W/Trace(795): Unexpected value from nativeGetEnabledTags: 0
01-15 18:05:55.322: W/Trace(795): Unexpected value from nativeGetEnabledTags: 0
01-15 18:05:55.392: W/Trace(795): Unexpected value from nativeGetEnabledTags: 0
01-15 18:05:55.392: W/Trace(795): Unexpected value from nativeGetEnabledTags: 0
01-15 18:05:55.392: W/Trace(795): Unexpected value from nativeGetEnabledTags: 0
01-15 18:05:55.392: W/Trace(795): Unexpected value from nativeGetEnabledTags: 0
01-15 18:05:55.422: W/Trace(795): Unexpected value from nativeGetEnabledTags: 0
01-15 18:05:55.422: W/Trace(795): Unexpected value from nativeGetEnabledTags: 0
01-15 18:05:55.472: W/Trace(795): Unexpected value from nativeGetEnabledTags: 0
01-15 18:05:55.483: W/Trace(795): Unexpected value from nativeGetEnabledTags: 0
01-15 18:05:55.492: W/Trace(795): Unexpected value from nativeGetEnabledTags: 0
01-15 18:05:55.492: W/Trace(795): Unexpected value from nativeGetEnabledTags: 0
01-15 18:06:06.813: W/Trace(795): Unexpected value from nativeGetEnabledTags: 0
01-15 18:06:06.842: D/AndroidRuntime(795): Shutting down VM
01-15 18:06:06.842: W/dalvikvm(795): threadid=1: thread exiting with uncaught exception (group=0x40a70930)
01-15 18:06:06.991: E/AndroidRuntime(795): FATAL EXCEPTION: main
01-15 18:06:06.991: E/AndroidRuntime(795): java.lang.RuntimeException: Unable to pause activity {com.example.storyteller/com.example.storyteller.Ricitos}: java.lang.NullPointerException
01-15 18:06:06.991: E/AndroidRuntime(795): at android.app.ActivityThread.performPauseActivity(ActivityThread.java:3016)
01-15 18:06:06.991: E/AndroidRuntime(795): at android.app.ActivityThread.performPauseActivity(ActivityThread.java:2971)
01-15 18:06:06.991: E/AndroidRuntime(795): at android.app.ActivityThread.handlePauseActivity(ActivityThread.java:2949)
01-15 18:06:06.991: E/AndroidRuntime(795): at android.app.ActivityThread.access$800(ActivityThread.java:141)
01-15 18:06:06.991: E/AndroidRuntime(795): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1245)
01-15 18:06:06.991: E/AndroidRuntime(795): at android.os.Handler.dispatchMessage(Handler.java:99)
01-15 18:06:06.991: E/AndroidRuntime(795): at android.os.Looper.loop(Looper.java:137)
01-15 18:06:06.991: E/AndroidRuntime(795): at android.app.ActivityThread.main(ActivityThread.java:5039)
01-15 18:06:06.991: E/AndroidRuntime(795): at java.lang.reflect.Method.invokeNative(Native Method)
01-15 18:06:06.991: E/AndroidRuntime(795): at java.lang.reflect.Method.invoke(Method.java:511)
01-15 18:06:06.991: E/AndroidRuntime(795): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:793)
01-15 18:06:06.991: E/AndroidRuntime(795): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:560)
01-15 18:06:06.991: E/AndroidRuntime(795): at dalvik.system.NativeStart.main(Native Method)
01-15 18:06:06.991: E/AndroidRuntime(795): Caused by: java.lang.NullPointerException
01-15 18:06:06.991: E/AndroidRuntime(795): at com.example.storyteller.Ricitos.onPause(Ricitos.java:63)
01-15 18:06:06.991: E/AndroidRuntime(795): at android.app.Activity.performPause(Activity.java:5206)
01-15 18:06:06.991: E/AndroidRuntime(795): at android.app.Instrumentation.callActivityOnPause(Instrumentation.java:1226)
01-15 18:06:06.991: E/AndroidRuntime(795): at android.app.ActivityThread.performPauseActivity(ActivityThread.java:3002)
01-15 18:06:06.991: E/AndroidRuntime(795): ... 12 more
01-15 18:06:11.002: I/Process(795): Sending signal. PID: 795 SIG: 9
最佳答案
我想,“主页按钮”是您手机的主页按钮。您的 onPause 或 onDestroy 方法可能有错误。将您的错误日志发送给我们。
关于android - 我的 Android 应用程序在按下主页按钮后崩溃,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/14343834/
如果应用程序是通过企业签名分发的,那么是否有任何框架允许我在后台接收Home 或Power 按下事件? 最佳答案 iOS 中的所有事件都是 UIEvent,它是 GSEvent 的包装器。通过一些技巧
版本为 1.4.1.4 的 Prestashop 网站使用 category.php 文件作为类别页面。不幸的是,1.6.0.6 的更新删除了该文件,因为它已被视为已弃用。 ( URL structu
我最近在 Github 存储库中为我的公司创建了一个全局 wiki。这是一个空的存储库,我创建它只是为了使用它的 wiki。 我的问题:在这个 wiki 存储库的首页上,显示了自述文件。这个自述文件是
我有一个非常简单的体育网站,主页上有不同运动的链接,如足球、篮球、无挡板篮球等。我想要的是当用户点击 Football 时,要存储的值,以便下次访问者访问该页面时它将打开足球页面。 到目前为止,我已经
我已经实现了onOptionsItemSelected来控制主页按钮: override fun onOptionsItemSelected(item: MenuItem): Boolean {
我不知道如何为匿名用户隐藏主页选项卡,Plone 版本是 4.3.7。最好隐藏导航栏,我发现可以通过 ZMI Portal_actions/portal_tabs/index_html 来做到这一点,
我正在尝试通过修改注册表来更改 IE 主页。我已经使用 bat 文件成功完成了此操作; REG ADD "HKCU\SOFTWARE\MICROSOFT\INTERNET EXPLORER\MAIN"
我已经使用 Spring Roo 生成了一些页面,我需要在应用程序的主页上显示数据库中的一些项目。那么我如何将带有数据的模型传递到主页,Roo 添加了以下行,我已注释掉 我使用 Roo 创建
我有 HomeController 类: @Controller public class HomeController { @RequestMapping("/") public S
用户按下“主页”按钮时,我需要显示退出确认对话框。如果是,则需要退出该应用程序。 按下“主页”按钮时是否可以显示? 最佳答案 这可能会导致您的应用被拒绝 从Apple HIG: 总是准备停止 当人们按
我只是想知道是否有人在Magento中格式化面包屑有任何经验? 我想用图片替换当前显示文本“HOME”的链接。 我以为用图片替换某些文本是一种简单的情况,但是似乎“HOME”文本/链接是动态创建的,因
我制作了登录功能,因此当用户登录时,它将导航到其他页面,但问题是登录成功后,用户只需按物理后退按钮即可再次返回登录页面。现在我想要的是登录后用户无法再次返回登录页面,因此当按下物理后退按钮时,它将关闭
我有 2 个 Activity ,1 个用于注册,1 个用于我的应用程序主页。现在为了在它们之间做出选择,我必须创建另一个 Activity 来检查一些细节并决定去哪个 Activity 。问题是,在
public void onBackPressed() { Intent intent = new Intent(Intent.ACTION_MAIN); intent.addCa
实际上我正在开发一个应用程序,这个应用程序应该在安装的设备上打开,这样我就可以阻止/禁用返回、主页、多任务的物理按钮。 我已经阅读了一些关于如何做到这一点的文章,但仍然不知道如何在我的应用程序中实现它
我在浏览器中输入以下 URL http://localhost:8081 并以连接错误告终。使用 catalina 脚本启动 tomcat 后,我得到一个空白页面。有人知道为什么会这样吗? 最佳答
我正在尝试在 Eclipse 中设置一个 spring mvc 项目。我创建了一个动态 Web 项目并创建了源和配置文件。当我在由 eclipse 启动的 tomcat 上运行该项目时,我总是遇到 4
我在Tomcat中部署了我的应用程序,应用程序路径是: http://localhost:8080/myapp 但我想限制我的用户看不到 Tomcat 主页,即如果他们输入: http://local
在创建一个 vue nativescript 应用程序并通过以下方式运行之后: tns preview 我得到: *** Terminating app due to uncaught excepti
与其说我是网页设计师,我更像是一个程序员,我正在尝试做一个简单的(我认为)设计,比如 gmail 的主页 https://mail.google.com/intl/fr/mail/help/about
我是一名优秀的程序员,十分优秀!