The original code as shown in figure, a click on the button will flash back! Internet also is unable to solve a lot of data, bosses help (tried if button listener do not request network will not flash back)
CodePudding user response:
Look at the logcat what mistake, send
CodePudding user response:
reference m - 1/f, oj response: logcat what error, a look at the 15:47:23. 2019-08-29, 202, 3381-3461/com. Example. A111 E/AndroidRuntime: FATAL EXCEPTION: Thread - 2 Process: com. Example. A111, PID: 3381 Java. Lang. NoClassDefFoundError: Failed resolution of: Lkotlin/JVM/internal/Intrinsics; The at okio. Buffer. Write (Unknown Source: 2) The at okhttp3. ResponseBody. Create (ResponseBody. Java: 210) The at okhttp3. Internal. Util. & lt; Clinit> (Util. Java: 62) The at okhttp3. Internal. Util. SkipLeadingAsciiWhitespace (Util. Java: 326) The at okhttp3. HttpUrl $Builder. Parse (HttpUrl. Java: 1314) At okhttp3. HttpUrl. Get (916) HttpUrl. Java: At okhttp3. Request $Builder. Url (165) Request. Java: At com. Example. A111. MainActivity $2. The run (MainActivity. Java: 49) The at Java. Lang. Thread. The run (Thread. Java: 764) Under Caused by: Java. Lang. ClassNotFoundException: Didn 't find the class "kotlin. JVM. Internal. Intrinsics" on the path: DexPathList [[zip file "/data/app/com. Example. A111 - EHm5Bm46niEN_0TG1gyNgA==/base. The apk", zip file "/system/framework/org. Apache. HTTP. Legacy. The boot. The jar"], nativeLibraryDirectories=[/data/app/com. Example. A111 - EHm5Bm46niEN_0TG1gyNgA==/lib/arm64,/system/lib64]] The at dalvik. System. BaseDexClassLoader. FindClass (BaseDexClassLoader. Java: 169) The at Java. Lang. This. LoadClass (379). This Java: The at Java. Lang. This. LoadClass (312). This Java: The at okio. Buffer. Write (Unknown Source: 2) The at okhttp3. ResponseBody. Create (ResponseBody. Java: 210) The at okhttp3. Internal. Util. & lt; Clinit> (Util. Java: 62) The at okhttp3. Internal. Util. SkipLeadingAsciiWhitespace (Util. Java: 326) The at okhttp3. HttpUrl $Builder. Parse (HttpUrl. Java: 1314) At okhttp3. HttpUrl. Get (916) HttpUrl. Java: At okhttp3. Request $Builder. Url (165) Request. Java: At com. Example. A111. MainActivity $2. The run (MainActivity. Java: 49) The at Java. Lang. Thread. The run (Thread. Java: 764) CodePudding user response:
reference m - 1/f, oj response: logcat what error, a look at the The 2019-08-29 15:47:23. 202, 3381-3461/com. Example. A111 E/AndroidRuntime: FATAL EXCEPTION: Thread - 2 Process: com. Example. A111, PID: 3381 Java. Lang. NoClassDefFoundError: Failed resolution of: Lkotlin/JVM/internal/Intrinsics; The at okio. Buffer. Write (Unknown Source: 2) The at okhttp3. ResponseBody. Create (ResponseBody. Java: 210) The at okhttp3. Internal. Util. & lt; Clinit> (Util. Java: 62) The at okhttp3. Internal. Util. SkipLeadingAsciiWhitespace (Util. Java: 326) The at okhttp3. HttpUrl $Builder. Parse (HttpUrl. Java: 1314) At okhttp3. HttpUrl. Get (916) HttpUrl. Java: At okhttp3. Request $Builder. Url (165) Request. Java: At com. Example. A111. MainActivity $2. The run (MainActivity. Java: 49) The at Java. Lang. Thread. The run (Thread. Java: 764) Under Caused by: Java. Lang. ClassNotFoundException: Didn 't find the class "kotlin. JVM. Internal. Intrinsics" on the path: DexPathList [[zip file "/data/app/com. Example. A111 - EHm5Bm46niEN_0TG1gyNgA==/base. The apk", zip file "/system/framework/org. Apache. HTTP. Legacy. The boot. The jar"], nativeLibraryDirectories=[/data/app/com. Example. A111 - EHm5Bm46niEN_0TG1gyNgA==/lib/arm64,/system/lib64]] The at dalvik. System. BaseDexClassLoader. FindClass (BaseDexClassLoader. Java: 169) The at Java. Lang. This. LoadClass (379). This Java: The at Java. Lang. This. LoadClass (312). This Java: The at okio. Buffer. Write (Unknown Source: 2) The at okhttp3. ResponseBody. Create (ResponseBody. Java: 210) The at okhttp3. Internal. Util. & lt; Clinit> (Util. Java: 62) The at okhttp3. Internal. Util. SkipLeadingAsciiWhitespace (Util. Java: 326) The at okhttp3. HttpUrl $Builder. Parse (HttpUrl. Java: 1314) At okhttp3. HttpUrl. Get (916) HttpUrl. Java: At okhttp3. Request $Builder. Url (165) Request. Java: At com. Example. A111. MainActivity $2. The run (MainActivity. Java: 49) The at Java. Lang. Thread. The run (Thread. Java: 764) CodePudding user response:
Okhttp version of the problem, with the kotlin, your project has introduced kotlin rely on? CodePudding user response:
m - reference 4 floor oj response: okhttp version of the problem, with the kotlin, your project has introduced kotlin rely on? No oh, excuse me how should solve? CodePudding user response:
'com. Squareup. Okhttp3: okhttp: 3.12.0' Try this version CodePudding user response:
f m - reference oj response: 'com. Squareup. Okhttp3: okhttp: 3.12.0' Try this version That sounds like the I use this version of the... CodePudding user response:
refer to 7th floor weixin_43359369 response: Quote: refer to the sixth floor m - oj response: 'com. Squareup. Okhttp3: okhttp: 3.12.0' nullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnull