现在,'ion'是一个外部库,用于将图像从URL加载到imageview中,但是,在以前的测试中,我没有遇到过这个崩溃的问题,而且这是我改变的结果,但是,这个logcat对我来说相当神秘。有任何人对此有经验吗?或任何我应该看的地方。
Failed to find provider info for com.google.plus.platform Failed to find provider info
for com.google.plus.platform United States FATAL EXCEPTION: main
java.lang.UnsupportedOperationException at
com.koushikdutta.ion.IonDrawable.mutate(IonDrawable.java:296) at
android.widget.ImageView.applyColorMod(ImageView.java:1004) at
android.widget.ImageView.onSetAlpha(ImageView.java:187) at
android.view.ViewGroup.drawChild(ViewGroup.java:1678) at
android.view.ViewGroup.dispatchDraw(ViewGroup.java:1437) at
android.view.ViewGroup.drawChild(ViewGroup.java:1708) at
android.view.ViewGroup.dispatchDraw(ViewGroup.java:1437) at
android.widget.AbsListView.dispatchDraw(AbsListView.java:1480) at
android.widget.ListView.dispatchDraw(ListView.java:3229) at
android.view.View.draw(View.java:7083) at
android.widget.AbsListView.draw(AbsListView.java:2588) at
android.view.ViewGroup.drawChild(ViewGroup.java:1710) at
android.view.ViewGroup.dispatchDraw(ViewGroup.java:1437) at
android.view.ViewGroup.drawChild(ViewGroup.java:1708) at
android.view.ViewGroup.dispatchDraw(ViewGroup.java:1437) at
android.view.ViewGroup.drawChild(ViewGroup.java:1708) at
android.view.ViewGroup.dispatchDraw(ViewGroup.java:1437) at
android.view.ViewGroup.drawChild(ViewGroup.java:1708) at
android.view.ViewGroup.dispatchDraw(ViewGroup.java:1437) at
android.view.View.draw(View.java:6974) at
android.widget.FrameLayout.draw(FrameLayout.java:357) at
android.view.ViewGroup.drawChild(ViewGroup.java:1710) at
android.view.ViewGroup.dispatchDraw(ViewGroup.java:1437) at
android.view.ViewGroup.drawChild(ViewGroup.java:1708) at
android.view.ViewGroup.dispatchDraw(ViewGroup.java:1437) at
android.view.ViewGroup.drawChild(ViewGroup.java:1708) at
android.view.ViewGroup.dispatchDraw(ViewGroup.java:1437) at
android.view.ViewGroup.drawChild(ViewGroup.java:1708) at
android.view.ViewGroup.dispatchDraw(ViewGroup.java:1437) at
android.view.ViewGroup.drawChild(ViewGroup.java:1708) at
android.view.ViewGroup.dispatchDraw(ViewGroup.java:1437) at
android.view.View.draw(View.java:6974) at
android.widget.FrameLayout.draw(FrameLayout.java:357) at
com.android.internal.policy.impl.PhoneWindow$DecorView.draw(PhoneWindow.java:1929) at
android.view.ViewRoot.draw(ViewRoot.java:1590) at
android.view.ViewRoot.performTraversals(ViewRoot.java:1290) at
android.view.ViewRoot.handleMessage(ViewRoot.java:1939) at
android.os.Handler.dispatchMessage(Handler.java:99) at
android.os.Looper.loop(Looper.java:143) at
android.app.ActivityThread.main(ActivityThread.java:4196) at
java.lang.reflect.Method.invokeNative(Native Method) at
java.lang.reflect.Method.invoke(Method.java:507) at
com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:839) at
com.android.internal.os.ZygoteInit.main(ZygoteInit.java:597) at
dalvik.system.NativeStart.main(Native Method)
HERE是其发生的相关代码:
@Override
public View getView(int position, View convertView, ViewGroup parent) {
LayoutInflater inflater = (LayoutInflater) context
.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
ViewHolder holder;
holder = new ViewHolder();
View rowView = inflater.inflate(R.layout.list_user_item, parent, false);
holder.textView = (TextView) rowView.findViewById(R.id.label);
ImageView imageView = (ImageView) rowView.findViewById(R.id.imageView1);
holder.textView.setText(values.get(position));
String s = values.get(position);
String i = imgvalues.get(position);
scaleImage(rowView);
Log.e("kikff", i);
Ion.with(context, i)
.withBitmap()
.animateIn(R.anim.fade_in)
.intoImageView(imageView);
if( !imgvalues.get(position).contains(".jpg")){
imageView.setVisibility(View.GONE);
}
if (s.contains("*")) {
String a = s.replace("*","");
holder.textView.setTextColor(Color.RED);
holder.textView.setText(a);
} else if (s.contains("/")) {
String a = s.replace("/","");
holder.textView.setTextColor(Color.BLUE);
holder.textView.setText(a);
}
return rowView;
}