In Intellij IDEA, select File | New | project.
From new project window you can select Android project type. When you select that, in right side you can select the preferred activity type.
If you don't have Android SDK installed in your machine, you will get a different link to install it first.
When you select the activity type and enter the necessary details, intellij will auto generate the project for you.
Then you might need to run the application and test the app you just created. You can either use Android emulator or the real device. I preferred to use the real device. Following are the configurations that I needed to do before using real device for testing.
1. Enable developer mode in your real device
Settings | System | About phone and tap seven times on build number.
2. Enable USB Debug in your real device
When you enable the developer mode, you will see a new item called developer options in your settings. Open it and enable the USB debugging.
My device is a Huawei Nova 2i phone and I had to face some difficulties to get it listed under available devices. USB debug option was getting disabled automatically and I had to follow below mentioned steps to fix it.
- After connecting android device via usb cable, enable the "transfer files" option.
- Then enable USB debug in developer option menu.
Now all you have to do is run it.
You will see a new app in your device and it will be open by default.
Good luck with your android development!!
