alvareztech / Pokedex

An application that uses Retrofit to consume the Pokeapi API, in addition to loading images with Glide.
https://alvarez.tech/android-consumir-pokemon-api-retrofit
24 stars 21 forks source link

Error while build #2

Closed deepseapua closed 2 years ago

deepseapua commented 3 years ago

/AndroidStudioProjects/Pokedex/app/src/main/java/tech/alvarez/pokedex/ListaPokemonAdapter.java:44: error: cannot access Fragment Glide.with(context) ^ class file for android.support.v4.app.Fragment not found

To fix: //implementation 'com.github.bumptech.glide:glide:3.7.0' implementation 'com.github.bumptech.glide:glide:4.11.0' annotationProcessor 'com.github.bumptech.glide:compiler:4.11.0'

Glide.with(context) .load("https://raw.githubusercontent.com/PokeAPI/sprites/master/sprites/pokemon/" + p.getNumber() + ".png") .centerCrop() //.crossFade() .diskCacheStrategy(DiskCacheStrategy.ALL) .into(holder.fotoImageView);

alvareztech commented 2 years ago

Thank you for reporting, sorry for updating it years later 🙁