如何使用快捷方式在 Android Studio 中自动导入必要的类?

问题描述:

我刚刚切换到 Android Studio 0.5.1,这里的事情进展得很慢,因为没有任何东西以常规方式工作......

I've just switch to Android Studio 0.5.1, and the things going so slow here, because nothing works in the regular way...

如何使用快捷方式导入必要的类?

How do I import the necessary classes with shortcut?

我是说喜欢这个?

import android.os.Bundle;
import android.support.v7.app.ActionBarActivity;
import android.view.Menu;
import android.view.MenuItem;

转到文件 -> 设置 -> 编辑器 -> 自动导入 -> Java 并进行以下操作:

Go to File -> Settings -> Editor -> Auto Import -> Java and make the below things:

选择在粘贴值时插入导入到全部

Select Insert imports on paste value to All

即时添加明确的导入选项和即时优化导入*