小编MOS*_*2K2的帖子

从包中发布的Android 5错误通知

我在下面的堆栈跟踪中遇到了很多异常.对于Android <5.0,它工作正常.

我从我的LED通知应用程序LED Blinker中得到错误. https://play.google.com/store/apps/details?id=com.ledblinker 我发布没有图标的通知.我不知道如何重现它,但我收到了很多崩溃报告.

有什么建议?

ANDROID_VERSION=5.0
PHONE_MODEL=Nexus 5
BUILD=BOARD=hammerhead
BOOTLOADER=HHZ12d
BRAND=google
CPU_ABI=armeabi-v7a
CPU_ABI2=armeabi
DEVICE=hammerhead
DISPLAY=LRX21O
FINGERPRINT=google/hammerhead/hammerhead:5.0/LRX21O/1570415:user/release-keys
HARDWARE=hammerhead
ID=LRX21O
MANUFACTURER=LGE
MODEL=Nexus 5
PRODUCT=hammerhead
RADIO=unknown
SUPPORTED_32_BIT_ABIS=[Ljava.lang.String;@2b1c12b
SUPPORTED_64_BIT_ABIS=[Ljava.lang.String;@20cc8988
SUPPORTED_ABIS=[Ljava.lang.String;@302e2f21
TAGS=release-keys
TYPE=user
UNKNOWN=unknown
USER=android-build
IS_DEBUGGABLE=false
TIME=1415320210000
VERSION.ACTIVE_CODENAMES=[Ljava.lang.String;@2a8c4f46
VERSION.CODENAME=REL
VERSION.INCREMENTAL=1570415
VERSION.RELEASE=5.0
VERSION.SDK=21
VERSION.RESOURCES_SDK_INT=21
VERSION.SDK_INT=21

USER_APP_START_DATE=2014-12-08T05:50:24.000+01:00
USER_CRASH_DATE=2014-12-08T07:32:05.000+01:00
CUSTOM_DATA=
STACK_TRACE=android.app.RemoteServiceException: Bad notification posted from package com.ledblinker: Couldn't create icon: StatusBarIcon(pkg=com.ledblinkeruser=0 id=0x0 level=0 visible=true num=0 )
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1441)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:135)
at android.app.ActivityThread.main(ActivityThread.java:5221)
at java.lang.reflect.Method.invoke(Native Method)
at java.lang.reflect.Method.invoke(Method.java:372)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:899)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:694)
Run Code Online (Sandbox Code Playgroud)

一切正常,但有时会发生此错误.

以下是导致它的代码:

Notification …
Run Code Online (Sandbox Code Playgroud)

notifications android

10
推荐指数
1
解决办法
5094
查看次数

为什么ViewPager和GridLayout与30个元素非常慢?

我有一个ViewPager和一个GridView显示月历.将GridView有大约30种元素和刷卡左,右是很慢的.我做了一个示例项目来测试没有任何数据库访问,它也很慢.也许有人看到了问题,或者我是否必须对页面进行异步加载?

这是一个元素的布局GridView.我想在任何元素中显示9个小的5x5像素图标,但没有它们,它也很慢.

<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:id="@+id/Layout1" android:layout_width="fill_parent" android:layout_height="fill_parent" android:orientation="vertical" android:padding="1dp">
  <LinearLayout android:layout_width="wrap_content" android:layout_height="wrap_content">
    <TextView android:id="@+id/date" android:layout_width="fill_parent" android:layout_height="fill_parent" android:layout_marginLeft="5dp" android:gravity="center_vertical" android:textSize="14sp" android:textStyle="bold"/>
  </LinearLayout>
  <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="fill_parent" android:layout_height="fill_parent" android:background="#ffffff">
    <ImageView android:id="@+id/dot1" android:layout_width="wrap_content" android:drawingCacheQuality="auto" android:layout_height="wrap_content" android:layout_marginLeft="5dp" android:background="#ffffff" android:layout_alignParentLeft="true" android:layout_alignParentTop="true" android:paddingBottom="1dp" android:paddingLeft="1dp" android:paddingTop="5dp"/>
  </RelativeLayout>
  <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="fill_parent" android:layout_height="fill_parent" android:background="#ffffff">
    <ImageView android:id="@+id/dot2" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginLeft="5dp" android:layout_alignParentLeft="true" android:layout_alignParentTop="true" android:background="#ffffff" android:paddingBottom="1dp" android:paddingLeft="1dp"/>
  </RelativeLayout>
  <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="fill_parent" android:layout_height="fill_parent" android:background="#ffffff">
    <ImageView android:id="@+id/dot3" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginLeft="5dp" android:layout_alignParentLeft="true" android:layout_alignParentTop="true" android:layout_gravity="right" android:background="#ffffff" …
Run Code Online (Sandbox Code Playgroud)

performance android gridview baseadapter android-viewpager

7
推荐指数
1
解决办法
3143
查看次数

在ICS上的任务管理器中显示黑色预览屏幕

我想在冰淇淋三明治下的任务管理器预览中显示黑屏,就像德国'finanzstatus'应用程序一样.如果有人能指出我正确的方向,那就太好了.

android taskmanager android-4.0-ice-cream-sandwich

5
推荐指数
1
解决办法
2182
查看次数

如何在ActionBarSherlock 4.0中设置标题文本的样式?

您好我使用ActionBarSherlock版本4.0.0,我不知道如何更改/样式标题文本,在3.5版本下我使用@ style/abTextStyle.但是在4.0.0版本中可以正常工作.

android themes styles actionbarsherlock android-actionbar

3
推荐指数
1
解决办法
3226
查看次数