Android (invokation failed) Error in Unity3d released on Mac

Source: Internet
Author: User

I wanted to compile an Andorid project for Murphy yesterday, but I didn't have the Android SDK on my computer. So I installed the installation package sent to me by Murphy and upgraded the settings, the following error occurs at the end of the release:

Error building Player: Exception: android (invokation failed)
ERROR: unknown error
Cmd: android list target-c
Stdout;
Stderr:
Exception in thread "main" java. lang. NullPointerException at SDKMain. main (SDKMain. java: 62)

I don't know why, so I thought the current system's jre does not meet the requirements, so I downloaded the latest jre installation, but it still does not work, later, I went to the unity Forum and found many posts that encountered this problem. I finally solved the problem according to one of the methods. Original article address: http://forum.unity3d.com/threads/176737-unknown-error-when-building-simple-scene.

The general meaning is:

Starting from Android SDK r22, a new compilation tool SDK component is added based on the existing "platform-tools" component to reduce version coupling between the compilation tool and IDE, in this way, you do not need to upgrade the SDK along with the IDE. For details, refer to official instructions: http://developer.android.com/tools/sdk/tools-notes.html.

If you have both r21 and r22, you can find the differences between the content in the "platform_tools" directory:

Android r21Platform-tools content:

Aapt.exe
Adb.exe
AdbWinApi. dll
AdbWinUsbApi. dll
Aidl.exe
Api
Dexdump.exe
Dx. bat
Fastboot.exe
Lib
Llvm-rs-cc.exe
NOTICE.txt
Renderscript
Source. properties

Android r22Platform-tools content:

Adb.exe
AdbWinApi. dll
AdbWinUsbApi. dll
Api
Fastboot.exe
NOTICE.txt
Source. properties

Therefore, the directory structure and system changes affect the compilation and processing of the Current Unity version. Of course, there may be more than these changes, so there are two simple solutions:

1: reinstall r21;

2:If you want to use the current r22 version, Then

Copy:

$ (Android-sdk )/Build-tools/17.0.0/<-- the content of this directory is the compilation tool of api17.

To:

$ (Android-sdk )/Platform-tools/

Method 2 is not the best and thorough solution, but it is feasible after my experiments.

That's all.

I hope the above will help you and thank you for your help.

This article Reprinted from: http://www.th7.cn/Program/Android/201305/138526.shtml

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.