title: AIDL ERROR while trying to return custom class object
body: <p>I am trying to pass 'Response' class object using IPC in AIDL. I have made the class parcelable:</p>
  
  <pre><code>public class Response implements Parcelable{
      private long id;
      private String speechString;
      private List&lt;String&gt; responseString = new ArrayList&lt;String&gt;();
  
  
      //set
      ...
      }
  
      //get
      ...
  
      public Response(Parcel in) {
          id = in.readLong();
          speechString = in.readString();
          if (in.readByte() == 0x01) {
              responseString = new ArrayList&lt;String&gt;();
              in.readList(responseString, String.class.getClassLoader());
          } else {
              responseString = null;
          }
      }
  
      @Override
      public int describeContents() {
          return 0;
      }
  
      @Override
      public void writeToParcel(Parcel dest, int flags) {
          dest.writeLong(id);
          dest.writeString(speechString);
          if (responseString == null) {
              dest.writeByte((byte) (0x00));
          } else {
              dest.writeByte((byte) (0x01));
              dest.writeList(responseString);
          }
      }
  
      public static final Parcelable.Creator CREATOR = new Parcelable.Creator() {
          public Response createFromParcel(Parcel in) {
              return new Response(in);
          }
  
          public Response[] newArray(int size) {
              return new Response[size];
          }
      };
  }
  </code></pre>
  
  <p>Defined Response.aidl:</p>
  
  <pre><code>package com.example;
  
  parcelable Response;
  </code></pre>
  
  <p>IappMain.aidl is used for IPC and is defined as following:</p>
  
  <pre><code>package com.example;
  
  // Declare any non-default types here with import statements
  import com.example.Response;
  
  interface IOizuuMain {
      int app(String aString);
  
      Response getResponseByString(String string);
  }
  </code></pre>
  
  <p>but upon building the project, it gives me the following error in IappMain.java:
  "error: incompatible types: Object cannot be converted to Response" at this line:</p>
  
  <pre><code>_result = com.example.Response.CREATOR.createFromParcel(_reply);
  </code></pre>