Virtual Reality Blueprints
上QQ阅读APP看书,第一时间看更新

Invalid command Android error

Some Android users have reported an error relating to the Android SDK Tools location. The problem has been confirmed in many installations prior to Unity 2017.1. If this problem occurs, the best solution is to downgrade to a previous version of the SDK Tools. This can be done by following the steps outlined here:

  1. Locate and delete the Android SDK Tools folder [Your Android SDK Root]/tools. This location will depend on where the Android SDK package was installed. For example, on my computer the Android SDK Tools folder is found at C:\Users\cpalmer\AppData\Local\Android\sdk.
  2. Download SDK Tools from http://dl-ssl.google.com/Android/repository/tools_r25.2.5-windows.zip.
  3. Extract the archive to the SDK root directory.
  4. Re-attempt the Build project process.

If this is the first time you are creating an Android application, you might get an error indicating that Unity cannot locate your Android SDK root directory. If this is the case, follow these steps:

  1. Cancel the build process and close the Build Settings... window.
  2. Choose Edit | Preferences... from the main menu.
  3. Choose External Tools and scroll down to Android.
  4. Enter the location of your Android SDK root folder. If you have not installed the SDK, click the download button and follow the installation process.

Install the app onto your phone and load the phone into your Cardboard device:

Figure 2.11: Stereoscopic view on an Android device