TeamNewPipe / NewPipeExtractor

NewPipe's core library for extracting data from streaming sites
GNU General Public License v3.0
1.4k stars 420 forks source link

Caused by: java.lang.NoSuchMethodError: No static method encode(Ljava/lang/String;Ljava/nio/charset/Charset;)Ljava/lang/String; in class Ljava/net/URLEncoder #1209

Closed abutun closed 3 months ago

abutun commented 3 months ago

Checklist

Affected version

0.24.2

Steps to reproduce the bug

Image 003

compileOptions {
sourceCompatibility JavaVersion.VERSION_17
targetCompatibility JavaVersion.VERSION_17
}

gradle-8.5.1-bin

coreLibraryDesugaring("com.android.tools:desugar_jdk_libs:2.0.4")

implementation 'com.github.teamnewpipe:NewPipeExtractor:0.24.2'

Expected behavior

No response

Actual behavior

No response

Screenshots/Screen recordings

Image 003

Logs

Caused by: java.lang.NoSuchMethodError: No static method encode(Ljava/lang/String;Ljava/nio/charset/Charset;)Ljava/lang/String; in class Ljava/net/URLEncoder; or its super classes (declaration of 'java.net.URLEncoder' appears in /system/framework/core-oj.jar) at org.schabi.newpipe.extractor.utils.Utils.encodeUrlUtf8(Utils.java:37) at org.schabi.newpipe.extractor.services.youtube.extractors.YoutubeSuggestionExtractor.suggestionList(YoutubeSuggestionExtractor.java:56) at code.name.monkey.retromusic.stream.Extractor.suggestions$lambda$2(Extractor.kt:43) at code.name.monkey.retromusic.stream.Extractor.$r8$lambda$snA4ZM6MPxqwWF8AjNWwNzLwiJA(Unknown Source:0) at code.name.monkey.retromusic.stream.Extractor$$ExternalSyntheticLambda3.call(D8$$SyntheticClass:0) at io.reactivex.rxjava3.internal.operators.single.SingleFromCallable.subscribeActual(SingleFromCallable.java:43) at io.reactivex.rxjava3.core.Single.subscribe(Single.java:4813) at io.reactivex.rxjava3.internal.operators.single.SingleSubscribeOn$SubscribeOnObserver.run(SingleSubscribeOn.java:89) at io.reactivex.rxjava3.core.Scheduler$DisposeTask.run(Scheduler.java:644) at io.reactivex.rxjava3.internal.schedulers.ScheduledRunnable.run(ScheduledRunnable.java:65) ![Image 003](https://github.com/user-attachments/assets/69b67e8e-bcc6-45c9-a8df-dbfe1f94952d)

Additional information

No response

TobiGr commented 3 months ago

You need

 coreLibraryDesugaring 'com.android.tools:desugar_jdk_libs_nio:2.0.4'
abutun commented 3 months ago

Thank you very much. That worked!