I m 试图书写一系列物体:href=”http://developer.android.com/vis/android/os/Parcelable.html” rel=“noreferer”>Parcelable 进入
I m试图书写的物体(如你预期的那样)的定义是: 我试图把他们写成“Parcel”号: 当Eclipse试图编纂这本书时,错误如下: Bound mismatch: The generic method
writeParcelableArray(T[], int) of type
Parcel is not applicable for the
arguments (Arrival[], int). The
inferred type Arrival is not a valid
substitute for the bounded parameter
< T extends Parcelable > 我完全不理解这一错误信息。 <代码>Parcelable是一个接口(而不是一个类别),因此您可以扩展。 没有人有什么想法? <><>UPDATE: I m在将 产量: 将Parcelable ArrayListExtra(String, ArrayList< ?ext Parcelable >)放在“Intent”类中,不适用于论点(String, ArrayList< Site >) 这可能是因为<代码>Location是上文所论述的一类(即<代码>Arrival),但我不认为如此。public class Arrival implements Parcelable {
/* All the right stuff in here... this class compiles and acts fine. */
}
@Override
public void writeToParcel(Parcel dest, int flags) {
Arrival[] a;
/* some stuff to populate "a" */
dest.writeParcelableArray(a, 0);
}
ArrayList
( Parcelable
s 插入时,基本上存在同样的问题:
Intent i = new Intent();
i.putParcelableArrayListExtra("locations", (ArrayList<Location>) locations);
Hi have this j2ee web application developed using spring framework. I have a problem with rendering mnessages in nihongo characters from the properties file. I tried converting the file to ascii using ...