简体   繁体   English

在android应用中,制作包不会导入

[英]In android app making packages are not importing

when I pasted the import statements in android studio, they are not importing. 当我将导入语句粘贴到android studio中时,它们没有导入。 I mean when I pasted just like a flash they are disappearing. 我的意思是,当我像闪光一样粘贴时,它们消失了。

Use a instance or a member from the imported class first, then import the class. 首先使用导入的类中的实例或成员,然后再导入类。 I don't know why it does this, probably to avoid imports that are not needed. 我不知道为什么这样做,可能是为了避免不必要的导入。 Also you may notice that some classes are imported automatically when you use the class , GLSurfaceView for example. 您还可能会注意到,当您使用类GLSurfaceView时,某些类会自动导入。

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

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