Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

IllegalAccessException on Android L #70

Closed
alexandermikhaylov opened this issue Jun 27, 2014 · 7 comments
Closed

IllegalAccessException on Android L #70

alexandermikhaylov opened this issue Jun 27, 2014 · 7 comments

Comments

@alexandermikhaylov
Copy link

I have a problem with using wire inside okio lib on new Android L developer preview. It's crashing with exception:
java.lang.IllegalAccessError: Illegal class access ('okio.Buffer' attempting to access 'okio.Util') in attempt to invoke static method void okio.Util.checkOffsetAndCount(long, long, long) (declaration of 'okio.Buffer' appears in /data/app/ru.advisa-1.apk)
at okio.Buffer.write(Buffer.java:554)
at okio.Buffer.write(Buffer.java:549)
at com.squareup.wire.WireInput.newInstance(WireInput.java:68)
at com.squareup.wire.Wire.parseFrom(Wire.java:124)
at ru.advisa.service.SyncNetworkOperationDelegate.doRequest(SyncNetworkOperationDelegate.java:95)
I think it related to new android runtime (art)

@swankjesse
Copy link
Member

Fix coming in the next L preview.
square/okhttp#967

@crossle
Copy link

crossle commented Jun 30, 2014

retrofit.RetrofitError: Illegal class access: 'okio.Buffer' attempting to access 'okio.SegmentPool' (declaration of 'okio.Buffer' appears ) in Android L preview

@DarwinLouis
Copy link

I'm also encountered the the error below in Nexus 5 (hammerhead).

Caused by: java.lang.IllegalAccessError: Illegal class access: 'okio.Buffer' attempting to access 'okio.SegmentPool' (declaration of 'okio.Buffer' appears in /data/app/com.globe.gcash.android-1.apk)
at okio.Buffer.writableSegment(Buffer.java:648)
at okio.Buffer.writeByte(Buffer.java:581)
at com.squareup.okhttp.internal.Platform.concatLengthPrefixed(Platform.java:410)
at com.squareup.okhttp.internal.Platform$Android.setProtocols(Platform.java:249)
at com.squareup.okhttp.Connection.upgradeToTls(Connection.java:179)
at com.squareup.okhttp.Connection.connect(Connection.java:151)
at com.squareup.okhttp.OkHttpClient$1.connect(OkHttpClient.java:84)
at com.squareup.okhttp.internal.http.HttpEngine.connect(HttpEngine.java:321)
at com.squareup.okhttp.internal.http.HttpEngine.sendRequest(HttpEngine.java:241)
at com.squareup.okhttp.Call.getResponse(Call.java:197)
at com.squareup.okhttp.Call.execute(Call.java:80)

@minhochoi
Copy link

retrofit.RetrofitError: Illegal class access: 'okio.Buffer' attempting to access 'okio.SegmentPool' (declaration of 'okio.Buffer' appears in /data/app.... in Android L Preview

@sethgho
Copy link

sethgho commented Sep 11, 2014

For what it's worth, this didn't seem to get fixed in the latest L preview build lpv81c found here:
https://developers.google.com/fit/preview

I think this was released around early August?

@JakeWharton
Copy link
Member

The second preview was just an update to Google Play Services for Wear support. Nothing in the core platform changed.

@JakeWharton
Copy link
Member

Also that preview builds were not cut from HEAD but from highly curated branches.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants