我正在尝试将Volley整合到我的应用中。它在我刚刚使用RequestQueue时起作用,但是现在我想要给NetworkImageView充气并且它遇到致命的运行时错误。部分堆栈跟踪:
02-10 10:00:00.457: E/AndroidRuntime(23345): android.view.InflateException: Binary XML file line #8: Error inflating class com.android.volley.NetworkImageView
02-10 12:38:26.425: E/AndroidRuntime(30910): at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:713)
...
02-10 10:00:00.457: E/AndroidRuntime(23345): Caused by: java.lang.ClassNotFoundException: Didn't find class "com.android.volley.NetworkImageView" on path: /data/app/com.myapp-2.apk
02-10 10:00:00.457: E/AndroidRuntime(23345): at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:64)
我正在引用库the recommended way。因此,我的Java Build Path中没有特定的lib条目,因此this fix并不真正相关。 (是的,检查Android Dependencies是否导出。)
关于可能出现什么问题的任何想法?
编辑:这是我的.classpath:
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry exported="true" kind="con" path="com.android.ide.eclipse.adt.DEPENDENCIES"/>
<classpathentry kind="con" path="com.android.ide.eclipse.adt.ANDROID_FRAMEWORK"/>
<classpathentry exported="true" kind="con" path="com.android.ide.eclipse.adt.LIBRARIES"/>
<classpathentry kind="src" path="src"/>
<classpathentry kind="src" path="gen"/>
<classpathentry kind="output" path="bin/classes"/>
</classpath>
答案 0 :(得分:3)
不是<com.android.volley.NetworkImageView>
,应该是<com.android.volley.toolbox.NetworkImageView>
。
我不知道我是从某个地方复制/粘贴该错误还是自己编写错误,但问题已解决。