zhaoyuanjie
12/12/2018, 3:28 AMpackage us.zoom.sdk;
class StartMeetingParams { }
public class StartMeetingParamsWithoutLogin extends StartMeetingParams { }
public interface MeetingService {
int startMeetingWithParams(Context var1, StartMeetingParams var2);
}
Note that StartMeetingParams is package-private.
My Kotlin code is like this:
val params = StartMeetingParamsWithoutLogin().apply { some code }
meetingService.startMeetingWithParams(context, params)
It crashed and thrown a IllegalAccessError with message like “tried to access class StartMeetingParams”. Then I re-written my code with Java and it works good.
I guess the reason is public class CAN NOT inherit internal class in Kotlin. But I still want to implement it with Kotlin. Is there anyway to do it? Am I missing something?