Is it possible to get the number of lines written in a project in Android Studio (current version is 2.1.1) ? (without using a plugin would be better)
That line historically represents the margin of A4 paper, which is useful only if you need to print the code. Old school says that you should keep your code inside that margin, to guarantee much portability.
One way is to search (ctrl+shift+F)
for line breaks \n
with regular expressions enabled and whole project
as the scope. If you want to limit the search to only java and xml files, you can use the following file mask *.java, *.xml
As alternative you can use (Linux, Windows) utility cloc (Count Lines Of Code). Cloc counts, and computes differences of, comment lines, blank lines, and physical lines of source code.
An example basic use (my project):
cloc /home/myHome/StudioProjects/myApp/app/src/ 111 text files. 111 unique files. 0 files ignored. github.com/AlDanial/cloc v 1.70 T=0.36 s (308.1 files/s, 38552.3 lines/s) ------------------------------------------------------------------------------- Language files blank comment code ------------------------------------------------------------------------------- Java 50 1323 146 6407 XML 60 460 50 3203 SQL 1 0 0 2302 ------------------------------------------------------------------------------- SUM: 111 1783 196 11912 -------------------------------------------------------------------------------
Project page https://github.com/AlDanial/cloc (thanks Xam)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With