I tried running my application this morning and this error appeared:
Error: /platforms/android/gradlew: Command failed with exit code 1 Error output:
WARNING in okhttp3.Authenticator.lambda$static$0:(Lokhttp3/Route;Lokhttp3/Response;)Lokhttp3/Request;: defining a static interface method requires --min-sdk-version >= 24 (currently 13) for interface methods: okhttp3.Authenticator.lambda$static$0:(Lokhttp3/Route;Lokhttp3/Response;)Lokhttp3/Request;
WARNING in okhttp3.Dns.lambda$static$0:(Ljava/lang/String;)Ljava/util/List;: defining a static interface method requires --min-sdk-version >= 24 (currently 13) for interface methods: okhttp3.Dns.lambda$static$0:(Ljava/lang/String;)Ljava/util/List;
Uncaught translation error: com.android.dx.cf.code.SimException: ERROR in okhttp3.Authenticator.
Uncaught translation error: com.android.dx.cf.code.SimException: ERROR in okhttp3.ConnectionPool.
Uncaught translation error: com.android.dx.cf.code.SimException: ERROR in okhttp3.internal.Util.threadFactory:(Ljava/lang/String;Z)Ljava/util/concurrent/ThreadFactory;: invalid opcode ba - invokedynamic requires --min-sdk-version >= 26 (currently 13)
Uncaught translation error: com.android.dx.cf.code.SimException: ERROR in okhttp3.CipherSuite.
Uncaught translation error: com.android.dx.cf.code.SimException: ERROR in okhttp3.Dns.
Uncaught translation error: com.android.dx.cf.code.SimException: ERROR in okhttp3.EventListener.factory:(Lokhttp3/EventListener;)Lokhttp3/EventListener$Factory;: invalid opcode ba - invokedynamic requires --min-sdk-version >= 26 (currently 13)
Uncaught translation error: com.android.dx.cf.code.SimException: ERROR in okhttp3.internal.ws.RealWebSocket.
7 errors; aborting
FAILURE: Build failed with an exception.
After hours of searching... I decided to change this line of code on my 'project.properties' file:
com.squareup.okhttp3:okhttp:3+
to
com.squareup.okhttp3:okhttp:3.12.1
and now the app builds correctly
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.
I tried running my application this morning and this error appeared:
Error: /platforms/android/gradlew: Command failed with exit code 1 Error output:
WARNING in okhttp3.Authenticator.lambda$static$0:(Lokhttp3/Route;Lokhttp3/Response;)Lokhttp3/Request;: defining a static interface method requires --min-sdk-version >= 24 (currently 13) for interface methods: okhttp3.Authenticator.lambda$static$0:(Lokhttp3/Route;Lokhttp3/Response;)Lokhttp3/Request;
WARNING in okhttp3.Dns.lambda$static$0:(Ljava/lang/String;)Ljava/util/List;: defining a static interface method requires --min-sdk-version >= 24 (currently 13) for interface methods: okhttp3.Dns.lambda$static$0:(Ljava/lang/String;)Ljava/util/List;
Uncaught translation error: com.android.dx.cf.code.SimException: ERROR in okhttp3.Authenticator.:()V: invalid opcode ba - invokedynamic requires --min-sdk-version >= 26 (currently 13)
Uncaught translation error: com.android.dx.cf.code.SimException: ERROR in okhttp3.ConnectionPool.:(IJLjava/util/concurrent/TimeUnit;)V: invalid opcode ba - invokedynamic requires --min-sdk-version >= 26 (currently 13)
Uncaught translation error: com.android.dx.cf.code.SimException: ERROR in okhttp3.internal.Util.threadFactory:(Ljava/lang/String;Z)Ljava/util/concurrent/ThreadFactory;: invalid opcode ba - invokedynamic requires --min-sdk-version >= 26 (currently 13)
Uncaught translation error: com.android.dx.cf.code.SimException: ERROR in okhttp3.CipherSuite.:()V: invalid opcode ba - invokedynamic requires --min-sdk-version >= 26 (currently 13)
Uncaught translation error: com.android.dx.cf.code.SimException: ERROR in okhttp3.Dns.:()V: invalid opcode ba - invokedynamic requires --min-sdk-version >= 26 (currently 13)
Uncaught translation error: com.android.dx.cf.code.SimException: ERROR in okhttp3.EventListener.factory:(Lokhttp3/EventListener;)Lokhttp3/EventListener$Factory;: invalid opcode ba - invokedynamic requires --min-sdk-version >= 26 (currently 13)
Uncaught translation error: com.android.dx.cf.code.SimException: ERROR in okhttp3.internal.ws.RealWebSocket.:(Lokhttp3/Request;Lokhttp3/WebSocketListener;Ljava/util/Random;J)V: invalid opcode ba - invokedynamic requires --min-sdk-version >= 26 (currently 13)
7 errors; abortingFAILURE: Build failed with an exception.
After hours of searching... I decided to change this line of code on my 'project.properties' file:
com.squareup.okhttp3:okhttp:3+
to
com.squareup.okhttp3:okhttp:3.12.1
and now the app builds correctly
Thank you saved a soul
To be clear, downgrading is not the correct solution here
On Fri, Feb 8, 2019, 9:15 AM Kasim Ridwan <[email protected] wrote:
I tried running my application this morning and this error appeared:
Error: /platforms/android/gradlew: Command failed with exit code 1 Error
output:
WARNING in
okhttp3.Authenticator.lambda$static$0:(Lokhttp3/Route;Lokhttp3/Response;)Lokhttp3/Request;:
defining a static interface method requires --min-sdk-version >= 24
(currently 13) for interface methods:
okhttp3.Authenticator.lambda$static$0:(Lokhttp3/Route;Lokhttp3/Response;)Lokhttp3/Request;
WARNING in
okhttp3.Dns.lambda$static$0:(Ljava/lang/String;)Ljava/util/List;: defining
a static interface method requires --min-sdk-version >= 24 (currently 13)
for interface methods:
okhttp3.Dns.lambda$static$0:(Ljava/lang/String;)Ljava/util/List;
Uncaught translation error: com.android.dx.cf.code.SimException: ERROR in
okhttp3.Authenticator.:()V: invalid opcode ba - invokedynamic requires
--min-sdk-version >= 26 (currently 13)
Uncaught translation error: com.android.dx.cf.code.SimException: ERROR in
okhttp3.ConnectionPool.:(IJLjava/util/concurrent/TimeUnit;)V: invalid
opcode ba - invokedynamic requires --min-sdk-version >= 26 (currently 13)
Uncaught translation error: com.android.dx.cf.code.SimException: ERROR in
okhttp3.internal.Util.threadFactory:(Ljava/lang/String;Z)Ljava/util/concurrent/ThreadFactory;:
invalid opcode ba - invokedynamic requires --min-sdk-version >= 26
(currently 13)
Uncaught translation error: com.android.dx.cf.code.SimException: ERROR in
okhttp3.CipherSuite.:()V: invalid opcode ba - invokedynamic requires
--min-sdk-version >= 26 (currently 13)
Uncaught translation error: com.android.dx.cf.code.SimException: ERROR in
okhttp3.Dns.:()V: invalid opcode ba - invokedynamic requires
--min-sdk-version >= 26 (currently 13)
Uncaught translation error: com.android.dx.cf.code.SimException: ERROR in
okhttp3.EventListener.factory:(Lokhttp3/EventListener;)Lokhttp3/EventListener$Factory;:
invalid opcode ba - invokedynamic requires --min-sdk-version >= 26
(currently 13)
Uncaught translation error: com.android.dx.cf.code.SimException: ERROR in
okhttp3.internal.ws.RealWebSocket.:(Lokhttp3/Request;Lokhttp3/WebSocketListener;Ljava/util/Random;J)V:
invalid opcode ba - invokedynamic requires --min-sdk-version >= 26
(currently 13)
7 errors; abortingFAILURE: Build failed with an exception.
After hours of searching... I decided to change this line of code on my
'project.properties' file:com.squareup.okhttp3:okhttp:3+
to
com.squareup.okhttp3:okhttp:3.12.1
and now the app builds correctly
Thank you saved a soul
—
You are receiving this because you modified the open/close state.Reply to this email directly, view it on GitHub
https://github.com/square/okhttp/issues/4594#issuecomment-461816034, or mute
the thread
https://github.com/notifications/unsubscribe-auth/AAEEEd2dBb2SAaaKwaY3Cy55UCetU3gKks5vLYaLgaJpZM4ajp2F
.
To be clear, downgrading is not the correct solution here
…
On Fri, Feb 8, 2019, 9:15 AM Kasim Ridwan @.* wrote: I tried running my application this morning and this error appeared: Error: /platforms/android/gradlew: Command failed with exit code 1 Error output: WARNING in okhttp3.Authenticator.lambda$static$0:(Lokhttp3/Route;Lokhttp3/Response;)Lokhttp3/Request;: defining a static interface method requires --min-sdk-version >= 24 (currently 13) for interface methods: okhttp3.Authenticator.lambda$static$0:(Lokhttp3/Route;Lokhttp3/Response;)Lokhttp3/Request; WARNING in okhttp3.Dns.lambda$static$0:(Ljava/lang/String;)Ljava/util/List;: defining a static interface method requires --min-sdk-version >= 24 (currently 13) for interface methods: okhttp3.Dns.lambda$static$0:(Ljava/lang/String;)Ljava/util/List; Uncaught translation error: com.android.dx.cf.code.SimException: ERROR in okhttp3.Authenticator.:()V: invalid opcode ba - invokedynamic requires --min-sdk-version >= 26 (currently 13) Uncaught translation error: com.android.dx.cf.code.SimException: ERROR in okhttp3.ConnectionPool.:(IJLjava/util/concurrent/TimeUnit;)V: invalid opcode ba - invokedynamic requires --min-sdk-version >= 26 (currently 13) Uncaught translation error: com.android.dx.cf.code.SimException: ERROR in okhttp3.internal.Util.threadFactory:(Ljava/lang/String;Z)Ljava/util/concurrent/ThreadFactory;: invalid opcode ba - invokedynamic requires --min-sdk-version >= 26 (currently 13) Uncaught translation error: com.android.dx.cf.code.SimException: ERROR in okhttp3.CipherSuite.:()V: invalid opcode ba - invokedynamic requires --min-sdk-version >= 26 (currently 13) Uncaught translation error: com.android.dx.cf.code.SimException: ERROR in okhttp3.Dns.:()V: invalid opcode ba - invokedynamic requires --min-sdk-version >= 26 (currently 13) Uncaught translation error: com.android.dx.cf.code.SimException: ERROR in okhttp3.EventListener.factory:(Lokhttp3/EventListener;)Lokhttp3/EventListener$Factory;: invalid opcode ba - invokedynamic requires --min-sdk-version >= 26 (currently 13) Uncaught translation error: com.android.dx.cf.code.SimException: ERROR in okhttp3.internal.ws.RealWebSocket.:(Lokhttp3/Request;Lokhttp3/WebSocketListener;Ljava/util/Random;J)V: invalid opcode ba - invokedynamic requires --min-sdk-version >= 26 (currently 13) 7 errors; aborting FAILURE: Build failed with an exception. After hours of searching... I decided to change this line of code on my 'project.properties' file: com.squareup.okhttp3:okhttp:3+ to com.squareup.okhttp3:okhttp:3.12.1 and now the app builds correctly Thank you saved a soul — You are receiving this because you modified the open/close state. Reply to this email directly, view it on GitHub <#4594 (comment)>, or mute the thread https://github.com/notifications/unsubscribe-auth/AAEEEd2dBb2SAaaKwaY3Cy55UCetU3gKks5vLYaLgaJpZM4ajp2F .
But it did solve the problem, so what is the adequate solution to this?
See my comment above about Java 8
I had the same issue, changing the android-minSdkVersion from a lower value to 26 fixed the error.
<preference name="android-minSdkVersion" value="26" />
Oh good to hear that @kunleawotunbo
@kunleawotunbo
I had the same issue, changing the android-minSdkVersion from a lower value to 26 fixed the error.
Per the latest stats (https://developer.android.com/about/dashboards) targeting min sdk 26 means only 22% of Android devices can install your app.