CordovaLib File Missing Error

Asked 2 years ago, Updated 2 years ago, 169 views

Hello,

I am developing it with Android studio+cordova.
The following error occurred in the build, and the error in CordovaLib was not addressed.
There are quite a few errors related to okhttp.

I would appreciate it if you could let me know.

C:\Users\app\platforms\android\CordovaLib\src\com\squareup\okhttp\Address.java:18: Error: Package com.squareup.okhttp.internal does not exist
import com.squareup.okhttp.internal.Util;
^
C:\Users\app\platforms\android\CordovaLib\src\com\squareup\okhttp\Address.java:25: Error: Package com.squareup.okhttp.internal does not exist

android html5 android-studio cordova gradle

2022-09-30 21:20

1 Answers

Do you happen to use Java 6?Okhttp requires Java 7 or higher, so it seems to be an error in Java 6 environment.Why don't you set your Java version to 7 or later and try again?

Okhttp's GitHub page had a similar issue.

okhttp fails to build when compiles with Java version 1.6 for Android Issue #528 ·square/okhttp ·GitHub


2022-09-30 21:20

If you have any answers or tips


© 2024 OneMinuteCode. All rights reserved.