I want to create a package-info.java to add package-wise comments, but in current version of Android Studio (I am using 0.5.7 and I don't know about this possibility in older versions) I am facing these issues:

When I right click on package and select NEW, there is no option for creating a package info file. I tried to create a new class and name it package-info.java but the IDE doesn't like this name and does not allow me to create this file.

So I went ahead and created a class file named PackageInfo.java and wrote to it what you usually write in the package-info.java.

The problem is when I use the Generate JavaDoc from Tools menue, it does not care about this file and it contents does not show up.

So I wonder if you have any workaround or something.

有帮助吗?

解决方案

The best workaround is to right click on the package, New, File, and create a file called package-info.java. Once it's there the IDE will recognize it as a Java file and you'll get the syntax highlighting and such.

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top