Unable to instantiate the client
See original GitHub issueWhile trying to instantiate OkHttpClient as follows inside the MainActivity of android:
OkHttpClient client = new OkHttpClient();
Stacktrace :
java.lang.BootstrapMethodError: Exception from call site #5 bootstrap method
at okhttp3.internal.Util.<clinit>(Util.java:87)
at okhttp3.internal.Util.immutableList(Util.java:234)
at okhttp3.OkHttpClient.<clinit>(OkHttpClient.java:127)
at com.amazonaws.transcribestreaminghttpclient.MainActivity.<init>(MainActivity.java:28)
at java.lang.Class.newInstance(Native Method)
at android.app.AppComponentFactory.instantiateActivity(AppComponentFactory.java:69)
at android.support.v4.app.CoreComponentFactory.instantiateActivity(CoreComponentFactory.java:43)
at android.app.Instrumentation.newActivity(Instrumentation.java:1215)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2831)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3048)
Happens only on 3.13.1. Works well on 3.12.1. Any insights?
Issue Analytics
- State:
- Created 5 years ago
- Comments:7 (1 by maintainers)
Top Results From Across the Web
Unable to instantiate service in client app - Stack Overflow
For some reason I cannot instantiate the class nor access the namespace of WCF service references I add to my VS2010 project.
Read more >Opening a project plan results in "Unable to instantiate ... - IBM
In the Eclipse client, connect to the project area · Navigate to Plans > All Plans · Right click on a plan and...
Read more >Failed instantiate InitialContextFactory org.jboss.naming ...
This issue occurs when the required configuration in the JBoss standalone.xml file is completed. Solution.
Read more >Unable to instantiate provider com.ning.http.client.providers ...
my default config. Five hundred (105) new asynchttpclient call me I get the following error. com.ning.http.client.AsyncHttpClient: Unable ...
Read more >Database Extractors occasionally failed with "Unable to ...
Unable to instantiate class. ... "Unable to instantiate class 'Class name'! Reason: con=<Return code>" Here are samples from HANA DB, ... <Client No.> ......
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Per the release notes, OkHttp requires that you enable Java 8 in your builds to function as of 3.13 and newer. You can learn more about how to enable this at https://developer.android.com/studio/write/java8-support.
You need to add something like
to your application
build.gradle
.@CHENGCHANGHU make sure to do a Clean Project (
Build > Clean Project
) after you change thebuild.gradle
file.