# android (invokation failed)

**URL:** https://discussions.unity.com/t/android-invokation-failed/498613
**Category:** Mobile
**Created:** [February 28, 2013, 12:02am UTC](https://discussions.unity.com/t/android-invokation-failed/498613 "2013-02-28T00:02:26Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![Prisma\_Virtual](https://dub1.discourse-cdn.com/unity/user_avatar/discussions.unity.com/prisma_virtual/32/232382_2.png) [@Prisma\_Virtual](https://discussions.unity.com/u/Prisma_Virtual)
#### Post date: [February 28, 2013, 12:02am UTC](https://discussions.unity.com/t/android-invokation-failed/498613/1 "2013-02-28T00:02:26Z")

</div>

Hello, yesterday I bought the license for Unity Pro and Android Pro I’ve installed on a windows 7 professional 64 bit. The problem I have after installing the Java and the Android SDK is to try to build a scene for an Android device and I get this error:

Error building Player: Exception: android (invokation failed)  
ERROR: unknown error  
cmd: android list target-c  
stdout;  
Error During initialization of VM occurred  
Could not reserve enough space for object heap  
stderr:  
Error: Could not create the Java Virtual Machine.  
Error: A fatal exception has occurred. Program will exit.

I’ve tried installing multiple versions of Java and Android SDK and still gives me the same problem. I searched the forum and have only found this entry:  
[http://forum.unity3d.com/threads/165276-Deploying-to-my-android-phone](http://forum.unity3d.com/threads/165276-Deploying-to-my-android-phone)  
But it does not solve anything.  
See if you can indicate how to properly run Unity.  
Thanks,  
Javier

---

<div class="post-metadata">

### Author: ![giyomu](https://dub1.discourse-cdn.com/unity/user_avatar/discussions.unity.com/giyomu/32/121279_2.png) [@giyomu](https://discussions.unity.com/u/giyomu)
#### Post date: [February 28, 2013, 4:55am UTC](https://discussions.unity.com/t/android-invokation-failed/498613/2 "2013-02-28T04:55:28Z")

</div>

when this happens does unity has kept your android sdk path in the prefernece ?  
I got that issue couple days ago and for some reason unity was loosing the reference to android path sdk all time.

I solve this by puttong the android sdk in drive C , rather than other one it was before.

---

<div class="post-metadata">

### Author: ![Prisma\_Virtual](https://dub1.discourse-cdn.com/unity/user_avatar/discussions.unity.com/prisma_virtual/32/232382_2.png) [@Prisma\_Virtual](https://discussions.unity.com/u/Prisma_Virtual)
#### Post date: [March 1, 2013, 10:35am UTC](https://discussions.unity.com/t/android-invokation-failed/498613/3 "2013-03-01T10:35:13Z")

</div>

First, thanks for the prompt reply. Actually I had installed the SDK in your default path C: \ to avoid problems of user permissions, but I still leave the same problem.  
I do not know what to do and to run the tool.

Thanks,  
Javier

---

<div class="post-metadata">

### Author: ![Prisma\_Virtual](https://dub1.discourse-cdn.com/unity/user_avatar/discussions.unity.com/prisma_virtual/32/232382_2.png) [@Prisma\_Virtual](https://discussions.unity.com/u/Prisma_Virtual)
#### Post date: [March 2, 2013, 11:50am UTC](https://discussions.unity.com/t/android-invokation-failed/498613/4 "2013-03-02T11:50:08Z")

</div>

Solved!!!  
Anyway, here is how to fix it:  
Go to Start-\>Control Panel-\>System-\>Advanced(tab)-\>Environment Variables-\>System Variables-\>New:  
Variable name: \_JAVA\_OPTIONS  
Variable value: -Xmx512M  
Variable name: Path  
Variable value: ;C:\Program Files\Java\jre6\bin;F:\JDK\bin;  
Change this to your appropriate path.  
Thanks!!!
