Install Android SDK setupdate:
There are some steps you must follow before you can build and run any code on your Android device. This is true regardless of whether you use unity or write Android applications from scratch.
To run your code on an Android device, follow these steps, whether you are using unity or writing an Android Application independently.
1. Download the android SDK to download the android SDK
Go to the android Developer SDK webpage. Download and unpack the latest Android SDK.
Go to the android Developer SDK page and download and decompress the latest Android SDK.
2. Installing the android SDK to install the android SDK
Follow the instructions under installing the SDK, feel free to skip the optional parts relating to eclipse. In step 4Installing
The SDKMake sure to add at least oneAndroid platformWith API level equal to or higher than 9 (Platform 2.3 or greater),Platform tools, AndUSB DriversIf you're using Windows.
You can skip the optional eclipse section according to the SDK installation instructions. in step 5 of installation, you must make sure that you have added an Android platform (version 4th or later) with an API level greater than or equal to 9. If you are using a Windows platform, you have to add a USB driver.
3. Get the device recognized by your system recognition device
This can be tricky, especially under Windows based systems where drivers tend to be a problem. Also, your device may come with additional information/specific drivers from the manufacturer.
This may be tricky, especially when drivers are most prominent in Windows systems. At the same time, your device may need additional drivers provided by the device supplier.
- ForWindows: If the Android device is automatically recognized by the system you still might need to update the drivers with the ones that came with the android SDK. This is done through the Windows Device Manager.
Windows: If the Android device is automatically identified by the system, you still need to update the driver that comes with the android SDK. You can use the Windows Driver Management Program.
If the device is not recognized automatically use the drivers from the android SDK, or any specific drivers provided by the manufacturer.
If the device is not identified by the driver attached to the android SDK, or the driver provided by the hardware supplier.
Additional info can be found here: USB drivers for Windows
For more information, see USB drivers for Windows.
- ForMac: If you're using MAC no additional drivers are usually required.
Mac: If Mac is used as the development machine, no additional driver is required.
Note:Don't forget to turn on "USB debugging" on your device. You can do this from the home screen: Press menu, select applications> development, then Enable USB debugging.
Note: Do not forget to open "USB debugging" on the device. You can finish it from the home page: click menu, select Application> development, and enable USB debugging.
If you are unsure whether your device is propperly installed on your system, please read the trouble-shooting page
Details.
If you are not sure whether your device has been correctly installed in your system, please refer to the troubleshooting page.
4. Add the android SDK path to unity
Add Android SDK path to unity
The first time you build a project for Android (or if Unity later fails to locate the SDK) you will be asked to point out where you installed the android SDK. please point to the root-folder of the android SDK. the location of the android SDK can also be
Changed in the editor by accessing edit then preferences.
When the android project is compiled for the first time (or the SDK is not found in Unity), the installation directory of the android SDK is required. specify the root directory of the android SDK. the location of the android SDK can be modified in Edit> preference.
From: http://game.ceeger.com/Manual/android-sdksetup.html