google-maps-services-java icon indicating copy to clipboard operation
google-maps-services-java copied to clipboard

Proxy Selector is a restricted class

Open engeeaitch opened this issue 9 years ago • 2 comments

Hi - I have upgraded to version 0.2.2 of the library from 0.1.20. I am running my app on Google App Engine. I setup the context as follows: static final GeoApiContext context = new GeoApiContext.Builder() .apiKey(MyGoogleConstants.MAPS_API_KEY) .build();

When I run this code, I get the following error:

java.lang.NoClassDefFoundError: java.net.ProxySelector is a restricted class. Please see the Google App Engine developer's guide for more details.

which occurs at line 469 of OkHttpClient.java

Can anyone help please?

engeeaitch avatar Aug 26 '17 10:08 engeeaitch

See #334. Are you using this library on GAE by any chance?

lmgagne avatar Aug 26 '17 12:08 lmgagne

Thanks - I missed that you need to create a new GaeRequestHandler. All OK now.

engeeaitch avatar Aug 26 '17 15:08 engeeaitch