Skip to content

InstantiationError #68

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

Closed
reaurr opened this issue Jul 20, 2017 · 1 comment
Closed

InstantiationError #68

reaurr opened this issue Jul 20, 2017 · 1 comment

Comments

@reaurr
Copy link

reaurr commented Jul 20, 2017

Hi,
When I try to run app, logcat give this err :

 java.lang.InstantiationError: okhttp3.internal.ws.RealWebSocket
                                                              at okhttp3.OkHttpClient.newWebSocket(OkHttpClient.java:414)
                                                              at com.parse.OkHttp3SocketClientFactory$OkHttp3WebSocketClient.open(OkHttp3SocketClientFactory.java:90)
                                                              at com.parse.ParseLiveQueryClientImpl.reconnect(ParseLiveQueryClientImpl.java:157)
                                                              at com.parse.ParseLiveQueryClientImpl.connectIfNeeded(ParseLiveQueryClientImpl.java:115)
                                                              at com.test.MainApp.onCreate(MainApp.java:31)

The cause of error : parseLiveQueryClient.connectIfNeeded();

I have internet permission.
My inits:

Parse.initialize(...................);
   try {
            ParseLiveQueryClient parseLiveQueryClient = ParseLiveQueryClient.Factory.getClient(new URI("ws://192.168.1.2:1337"));
parseLiveQueryClient.connectIfNeeded();

// or ParseLiveQueryClient parseLiveQueryClient = ParseLiveQueryClient.Factory.getClient();
// parseLiveQueryClient.connectIfNeeded();

    
        } catch (URISyntaxException e) {
            e.printStackTrace();
        }
@reaurr
Copy link
Author

reaurr commented Jul 21, 2017

Solve it. The reason is the library conflict. I use both of this lib and TGIO lib. After delete from gradle, it works.

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

1 participant