I tried fixing this for ages now, but I don't know what to do. How do I get it to display a preview? Here is a screenshot of the code:
Just you have to do >> open File --> Sync Project with Gradle Files and then after >> open File --> invalidate Android Studio caches / restart so done this problem.:) Show activity on this post.
In some cases when your Gradle files are deleted or corrupted you will not be able to download new Gradle files in android studio. In this case, we have to delete the Gradle files which are present already and then again sync your project to download our Gradle files again.
Open your gradle. properties file in Android Studio. Restart Android Studio for your changes to take effect. Click Sync Project with Gradle Files to sync your project.
Solved :
Try 1 : Just close and open the Android Studio
Try 2 : Build -> Clean project -> rebuild
Try 3 : Build -> Clean project -> rebuild -> restart Android studio
Mi
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With