如何使用快捷方式在 Android Studio 中自动导入必要的类? [英] How to auto import the necessary classes in Android Studio with shortcut?

查看:25
本文介绍了如何使用快捷方式在 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

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

这篇关于如何使用快捷方式在 Android Studio 中自动导入必要的类?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆