Supporto The Movie Database

Hi Folks,

I'm trying to fetch images using Coil and AsyncImage with JetPack Compose. I keep getting the following error: Unable to resolve host "api.themoviedb.org": No address associated with hostname

I'm able to access an image in the web browser by pasting in a sample url into address bar directly: https://image.tmdb.org/t/p/w500/lxM6kqilAdpdhqUl2biYp5frUxE.jpg Looks like the api_key is not required to access images but is required to fetch data, which I'm able to. here is a code snippet

 Row(
            modifier = Modifier
                //.border(2.dp, Color.Black, shape = CircleShape)
                .background(color = Color.DarkGray)
                .fillMaxWidth()
                //.height(80.dp)
                .padding(5.dp)
        ){
            AsyncImage(
                model = ImageRequest.Builder(
                    LocalContext.current)
                    .data("https://image.tmdb.org/t/p/w500/lxM6kqilAdpdhqUl2biYp5frUxE.jpg")
                    .build(),
                contentDescription = null
            )

i added the dependency to my gradle file aswell.

// coil
    implementation("io.coil-kt:coil-compose:2.5.0")

any thoughts or suggestions are welcomed, thanks in advance.

2 risposte (nella pagina 1 di 1)

Jump to last post

Nevermind. Turns out bad emulator. ;)

@greg.cunnington said:
My wife is from General Santos City.
We both live in Australia
she would like to see the movie REWIND with Dingdong Dantes & Marian Rivera.
How is that possible ?
regards
Greg Cunnington

Are you referring to this Movie?
Rewind (2023)
https://www.themoviedb.org/movie/1143183-rewind

TMDb does not offer watching movies or TV shows.
You can watch it if it is available on www.justwatch.com
If so, you will find a link to the service just below the film poster on the home page.
https://www.themoviedb.org/movie/1143183-rewind
I tried to check if it is available in Australia and it appears that it is not.
https://www.themoviedb.org/movie/1143183-rewind/watch?translate=false&locale=AU

Non riesci a trovare un film o una serie Tv? Accedi per crearlo.

Globale

s focalizza la barra di ricerca
p apri menu profilo
esc chiudi una finestra aperta
? apri finestra scorciatoia tastiera

Su tutte le pagine di media

b torna indietro (o al precedente quando applicabile)
e vai alla pagina di modifica

Nelle pagine delle stagioni TV

(freccia destra) vai alla stagione successiva
(freccia sinistra) vai alla stagione precedente

Nelle pagine degli episodi TV

(freccia destra) vai all'episodio successivo
(freccia sinistra) vai all'episodio precedente

Su tutte le pagine di immagini

a apri finestra aggiungi immagine

Su tutte le pagine di modifica

t apri selettore traduzione
ctrl+ s invia modulo

Sulle pagine di discussione

n crea nuova discussione
w segna come visto/non visto
p cambia publico/privato
c cambia chiuso/aperto
a apri attivita
r rispondi alla discussione
l vai all'ultima risposta
ctrl+ enter invia il tuo messaggio
(freccia destra) pagina successiva
(freccia sinistra) pagina precedente

Impostazioni

Vuoi valutare o aggiungere quest'elemento a una lista?

Accedi