問題タブ [themoviedb-api]
For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.
android - Android で Retrofit+OkHttp を使用して TheMovieDataBase からデータを取得中に SSLHandshakeException が発生する
TheMovieDatabase(TMDb) から映画のリストを取得しようとしています
取得: https://api.themoviedb.org/3/movie/now_playing?api_key= ${KEY}&page=1
ただし、次の結果が得られます。
HTTP が失敗しました: javax.net.ssl.SSLHandshakeException: ピアによって接続が閉じられました
以下は、私がすでに試したコードです。
ログ:
javax.net.ssl.SSLHandshakeException: com.android.org.conscrypt.NativeCrypto.SSL_do_handshake(Native Method) のピアによって接続が閉じられました。 internal.connection.RealConnection.connectTls(RealConnection.java:318) で okhttp3.internal.connection.RealConnection.establishProtocol(RealConnection.java:282) で okhttp3.internal.connection.RealConnection.connect(RealConnection.java:167) で okhttp3 .internal.connection.StreamAllocation.findConnection(StreamAllocation.java:257) で okhttp3.internal.connection.StreamAllocation.findHealthyConnection(StreamAllocation.java:135) で okhttp3.internal.connection.StreamAllocation.newStream(StreamAllocation.java:114) でokhttp3.internal.connection.ConnectInterceptor.intercept(ConnectInterceptor.java:42) で okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:147) で okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:121) で okhttp3.internal .cache.CacheInterceptor.intercept(CacheInterceptor.java:93) (okhttp3.internal.http)。RealInterceptorChain.proceed(RealInterceptorChain.java:147) (okhttp3.internal.http) internal.http.BridgeInterceptor.intercept(BridgeInterceptor.java:93) で okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:147) で okhttp3.internal.http.RetryAndFollowUpInterceptor.intercept(RetryAndFollowUpInterceptor.java:126) で okhttp3 .internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:147) で okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:121) で okhttp3.logging.HttpLoggingInterceptor.intercept(HttpLoggingInterceptor.java:213) で okhttp3.internal .http.RealInterceptorChain.proceed(RealInterceptorChain.java:147) で okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:121) で okhttp3.RealCall.getResponseWithInterceptorChain(RealCall.java:200) で okhttp3.RealCall.execute( RealCall.java:77) で com.google.firebase.perf.network.FirebasePerfOkHttpClient.execute(不明なソース) で retrofit2.OkHttpCall.execute(OkHttpCall.java:180) で retrofit2.adapter.rxjava2.CallExecuteObservable.subscribeActual(CallExecuteObservable.ジャバ:42) io.reactivex.Observable.subscribe(Observable.java:12030) で retrofit2.adapter.rxjava2.BodyObservable.subscribeActual(BodyObservable.java:34) で io.reactivex.Observable.subscribe(Observable.java:12030) でio.reactivex.internal.operators.observable.ObservableObservableSubscribeOn$SubscribeTask. run(ObservableSubscribeOn.java:96) at io.reactivex.Scheduler$DisposeTask.run(Scheduler.java:579) at io.reactivex.internal.schedulers.ScheduledRunnable.run(ScheduledRunnable.java:66) at io.reactivex.internal java.util.concurrent の .schedulers.ScheduledRunnable.call(ScheduledRunnable.java:57)。FutureTask.run(FutureTask.java:237) で java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:269) で java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutorjava:1113) で java.util .concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:588) at java.lang.Thread.run(Thread.java:818)