Use the IntelliJ Android wizard to create a Hello World project. First, choose the storage location and platform.
On the next screen:
Calculator
CalculatorActivity
com.mobiquity.calculator
Use IntelliJ or the command line to move files into the following structure:
src/main/java/...
src/test/java/...
Note: IntelliJ might not like it when you add subdirectories to the folder marked as source. If you are having trouble setting up the directory structure, open the screen shown in the next step and remove the old source folder before adding new subfolders.
Update module settings in IntelliJ to recognize the source and test directories (below: blue folder is source and test folder is green).
After you are done, your project should look something like this:
Copy this sample pom.xml into live in the root of your project. Change the groupId
to suit your project (e.g. com.mobiquity.calculator
). If desired, also edit the artifactId
, version
, and name
values.
Check "Maven Projects" view in IntelliJ to ensure that it looks something like this:
If you see errors, you may just need to refresh and wait for it to finish indexing/importing your libraries. It may help to run mvn install
on the command line and restart IntelliJ.
If you are still having issues, your Android facet may be the problem. Open the Android facet for your project and change to "Generate by IDE."