Blog Archives

Android Order Import Statements

The ordering of import statements is: Android imports Imports from third parties (com, junit, net, org) java and javax To exactly match the IDE settings, the imports should be: Alphabetical within each grouping, with capital letters before lower case letters (e.g. Z before a). There

Posted in Android, Tips and Tricks Tagged with: ,

Android Fully Qualify Imports

When you want to use class Bar from package foo,there are two possible ways to import it: import foo.*; Pros: Potentially reduces the number of import statements. import foo.Bar; Pros: Makes it obvious what classes are actually used. Makes code

Posted in Android, Tips and Tricks Tagged with: ,

Eclipse Android The Import Is Never Used

When coding you frequently remove unnecessary code and run into this warning for Android in Eclipse or Motodev. The import * is never used. “The import android.util.Log is never used” You can do two things to resolve this error, go to the

Posted in Android, ErrorFix Tagged with: , ,

Eclipse Android Error Cannot Be Resolved To A Type

When using new functions in Eclipse you will run into this problem before you import the needed class. E.g. “Log cannot be resolved”, “TextView cannot be resolved to a type” or something like This cannot be resolved to a type. If

Posted in Android, ErrorFix Tagged with: , ,