How to fix broken imports?

Eevee king :

I've been building an app in android studio for months now, and I fire up the application tonight. I get the entire list of imports all in red and I don't know why. What governs things like.

import android.content.Context;

import android.graphics.Bitmap;

import android.os.Bundle;

import android.support.annotation.NonNull;

import android.support.v7.widget.RecyclerView;

import android.view.LayoutInflater;

import android.view.View;

import android.view.ViewGroup;

How can I get it working again?

Ray Hunter :

You can also try the following as well:

Android Studio -> File -> Invalidate Caches / Restart

Then you can sync gradle.

Gradle tab -> Refresh all gradle projects

That should help you get back all your dependencies.

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=152345&siteId=1