1

我试图通过两个进度条来实现通知。我提到从here定制通知的进度条。我不断得到这个错误&米无法找出解决方案。 plz帮助。在自定义通知中自定义进度栏

07-16 13:26:30.523: E/StatusBarService(1525): couldn't inflate view for notification mobishare.notify/0x50ae95c1 
    07-16 13:26:30.523: E/StatusBarService(1525): android.view.InflateException: Binary XML file line #46: Error inflating class mobishare.notify.customProgressBar 
    07-16 13:26:30.523: E/StatusBarService(1525): at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:581) 
    07-16 13:26:30.523: E/StatusBarService(1525): at android.view.LayoutInflater.rInflate(LayoutInflater.java:623) 
    07-16 13:26:30.523: E/StatusBarService(1525): at android.view.LayoutInflater.rInflate(LayoutInflater.java:626) 
    07-16 13:26:30.523: E/StatusBarService(1525): at android.view.LayoutInflater.inflate(LayoutInflater.java:408) 
    07-16 13:26:30.523: E/StatusBarService(1525): at android.view.LayoutInflater.inflate(LayoutInflater.java:320) 
    07-16 13:26:30.523: E/StatusBarService(1525): at android.widget.RemoteViews.apply(RemoteViews.java:1303) 
    07-16 13:26:30.523: E/StatusBarService(1525): at com.android.systemui.statusbar.StatusBarService.makeNotificationView(StatusBarService.java:597) 
    07-16 13:26:30.523: E/StatusBarService(1525): at com.android.systemui.statusbar.StatusBarService.addNotificationViews(StatusBarService.java:634) 
    07-16 13:26:30.523: E/StatusBarService(1525): at com.android.systemui.statusbar.StatusBarService.addNotification(StatusBarService.java:431) 
    07-16 13:26:30.523: E/StatusBarService(1525): at com.android.systemui.statusbar.CommandQueue$H.handleMessage(CommandQueue.java:201) 
    07-16 13:26:30.523: E/StatusBarService(1525): at android.os.Handler.dispatchMessage(Handler.java:99) 
    07-16 13:26:30.523: E/StatusBarService(1525): at android.os.Looper.loop(Looper.java:130) 
    07-16 13:26:30.523: E/StatusBarService(1525): at android.app.ActivityThread.main(ActivityThread.java:3687) 
    07-16 13:26:30.523: E/StatusBarService(1525): at java.lang.reflect.Method.invokeNative(Native Method) 
    07-16 13:26:30.523: E/StatusBarService(1525): at java.lang.reflect.Method.invoke(Method.java:507) 
    07-16 13:26:30.523: E/StatusBarService(1525): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:867) 
    07-16 13:26:30.523: E/StatusBarService(1525): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:625) 
    07-16 13:26:30.523: E/StatusBarService(1525): at dalvik.system.NativeStart.main(Native Method) 
    07-16 13:26:30.523: E/StatusBarService(1525): Caused by: java.lang.ClassNotFoundException: mobishare.notify.customProgressBar in loader dalvik.system.PathClassLoader[.] 
    07-16 13:26:30.523: E/StatusBarService(1525): at dalvik.system.PathClassLoader.findClass(PathClassLoader.java:240) 
    07-16 13:26:30.523: E/StatusBarService(1525): at java.lang.ClassLoader.loadClass(ClassLoader.java:551) 
    07-16 13:26:30.523: E/StatusBarService(1525): at java.lang.ClassLoader.loadClass(ClassLoader.java:511) 
    07-16 13:26:30.523: E/StatusBarService(1525): at android.view.LayoutInflater.createView(LayoutInflater.java:471) 
    07-16 13:26:30.523: E/StatusBarService(1525): at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:570) 
    07-16 13:26:30.523: E/StatusBarService(1525): ... 17 more 

编辑: 或者,如果任何机构可以告诉我怎么加2的进度条的通知。任何帮助赞赏。

+0

你得到解决???我面临与progresswheel图书馆同样的问题,请帮助,如果你得到它,谢谢... – 2014-09-16 16:11:52

+0

nopes。如果您发现任何问题,请发布。 – 2014-09-17 06:43:22

回答

0

确保定制的进度条路径是在XML文件中正确写入。由于这个问题是系统无法找到类.. java.lang.ClassNotFoundException: mobishare.notify.customProgressBar

+0

路径是正确的。似乎还有其他事情需要完成。 – 2012-07-16 08:36:11

+0

检查此:http://stackoverflow.com/questions/3781151/java-lang-classnotfoundexception-on-working-app可能会有所帮助 – Nermeen 2012-07-16 08:46:27