Android sync generator not working

I have defined an AIDL file with my interface. Something like that:

interface IResPlugin {
    int discoverType();
    Map onClick( in int id, in Map state );
    int getLayoutId(in int option);
    int getMeasures();
    String getName();
}

Eclipse automatically generates the IResplugin.java folder in the gen folder, but does it wrong. This Eclipse code generates:

public java.util.Map onClick(int id, java.util.Map state) throws android.os.RemoteException
{
    android.os.Parcel _data = android.os.Parcel.obtain();
    android.os.Parcel _reply = android.os.Parcel.obtain();
    java.util.Map _result;
    try {
        _data.writeInterfaceToken(DESCRIPTOR);
        _data.writeInt(id);
        _data.writeMap(state);
        mRemote.transact(Stub.TRANSACTION_onClick, _data, _reply, 0);
        _reply.readException();
        _result = _reply.readHashMap(cl);
    }
    finally {
        _reply.recycle();
        _data.recycle();
    }
    return _result;
}

The line _result = _replu.readHashMap(cl)crashes because the object cldoes not exist. If I add this line manually (there is no class loader), Eclipse will replace my version for the one generated separately (and again incorrectly).

Any ideas?

+5
source share
1 answer

It looks like an error that would be useful for fixing errors in error trackers.

As a job, you can use the bundle instead of the map.

, , - Parcelable, Map < > , .

+1

All Articles