简体   繁体   English

Android Studio 1.2.2 静态导入完成

[英]Android Studio 1.2.2 Static Import Completion

I'm trying to run Suger ORM v1.4 sample in Android Studio 1.2.2 that uses static imports!我正在尝试在使用静态导入的 Android Studio 1.2.2 中运行 Suger ORM v1.4 示例!

Example:例子:

import static com.orm.SugarRecord.save;

在此处输入图片说明

What I have tried:我尝试过的:

1>First I have tried to solve by this Settings -> Code Style -> Java -> Imports In the middle of the pane is the "Packages to Use Import with '*'" table. 1>首先,我尝试通过此设置 -> 代码样式 -> Java -> 导入来解决窗格中间是“使用'*'导入的包”表。 You can add an entry here of a fully-qualified class name, and tick the static box;您可以在此处添加一个完全限定类名的条目,并勾选静态框; now all static methods in this class will be available for auto-completion.现在该类中的所有静态方法都可用于自动完成。

Ref: IntelliJ Static Import Completion参考: IntelliJ 静态导入完成

2> I tried with selecting and pressing Alt+Enter 2> 我尝试选择并按 Alt+Enter

在此处输入图片说明

selecting Add on demand static import also doesn't resolves my problem !!选择按需添加静态导入也不能解决我的问题!

Any help would be greatful !!任何帮助都会很棒!

other resources I have tried (failed):我尝试过的其他资源(失败):

IntelliJ Static Import Completion IntelliJ 静态导入完成

How to fix "Organize Imports" in Android Studio for static imports 如何在 Android Studio 中修复“组织导入”以进行静态导入

Solved!解决了! My bad after creating the 1.4v library, forgot to remove old 1.3v gradle dependency!!创建 1.4v 库后我的坏处,忘记删除旧的 1.3v gradle 依赖项!! it's as simple is that!!就这么简单!!

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM