Log in or register to post comments

Building dex Failed

March 5, 2012 - 2:24pm #1

Hi,
I have this problem for the last two days in trying to export my AR project to my android device (samsung galaxy 10.1) and it gives me this "Buiding dex Failed" error.

I use the the qualtomm target image with the lastest installation and unity3.4. I am not using the unity 3.5 because it does not show the emulator option unde the player setting - device filter option.

I read some forums in regards to this issue but no solutions were found really if only the one mentioning to update to latest java - which it is.

Error message:

Building DEX Failed!
C:\Softs Projects Documents\Unity3D\Unity3D_Android_XX5\Temp/StagingArea> java -Xmx1024M -Djava.ext.dirs="C:/Program Files (x86)/Android/android-sdk-windows\platform-tools/lib/" -jar "C:/Program Files (x86)/Android/android-sdk-windows\platform-tools/lib/dx.jar" --dex --verbose --output=bin/classes.dex bin/classes.jar plugins
Error occurred during initialization of VM
Could not reserve enough space for object heap
Could not create the Java virtual machine.

Thanks
Rick

Re: Building dex Failed

March 9, 2012 - 3:19pm #15

Yes i meant Trackable.

And yes i had forgotten to configure my camera with the image. It works fine now.

So i guess at the end it is a matter of version for the various plugins and application along with an extra environment variable.

Thanks again.
Rick

Re: Building dex Failed

March 9, 2012 - 3:12pm #14

You mean Trackable (i.e. target image)?

Be sure to configure both the ImageTarget and ARCamera for the trackable's dataset. A lot of people set-up one, but forget to set-up the other.

Re: Building dex Failed - Resolved

March 9, 2012 - 2:36pm #13

It finally worked using unity 3.5 version.

I tested it using one of the qcar project (tea pots).

I still need to figure out why my own tracker is not working within my own project.

Thanks
Rick

Re: Building dex Failed - Solved

March 9, 2012 - 2:27pm #12

Hi again,

It finally worked using the unity3.5 version. I used one of the aqar exemple.

I just need to figure out why my own tracker is not working using my personal project.

Thanks
Rick

Re: Building dex Failed

March 8, 2012 - 6:39pm #11

It looks like you have to get the Android Debug Bridge set-up correctly.

Did you follow the Android and Eclipse set-up instruction in our Getting Started guide?

Also can you confirm that adb.exe is actually at C:\Program Files (x86)\eclipse\platform-tools\adb.exe ?

Re: Building dex Failed

March 8, 2012 - 3:25pm #10

Hi,

I read on some unity forums that we may need to import some patches to support qcar sample projects. The forum was for unity 3.3 but for 3.4 (which i am using) it should not be required.

http://answers.unity3d.com/questions/51063/qcarunityplayer-error.html

Just a thought reagarding my issue not being able to load qcar project exemples mentioned in my previous email.

Thanks
Richard

Re: Building dex Failed- logcat ouput

March 8, 2012 - 2:32pm #9

Hi,

I enabled the logcat and put it in txt file. This is in respond to the request about the exported ar project(from vuforia) to my samsung galaxy tab and the error message that comes saying it cannot load the application.

Thanks
Rick

The logcat file has limited lenght of characters (pasted or file) so i try to provide the most of it.I put the section with error message.

------------------------------------------------

..........
..........
I/ApplicationPackageManager( 389): cscCountry is not German : XAB

E/SocialHub( 8144): [UinboxReceiver] onReceive() >> Context is android.app.ReceiverRestrictedContext@407ba138

D/SocialHub( 8144): [UinboxReceiver] On Receive >> ContentUri is NULL >>

I/SocialHub( 8144): [UinboxReceiver] onReceive() >> ==============================================

I/SocialHub( 8144): [UinboxReceiver] onReceive() >> UinboxBroadCastReceiver()

I/SocialHub( 8144): [UinboxReceiver] onReceive() >> intent.getAction() : android.intent.action.PACKAGE_REMOVED

I/SocialHub( 8144): [UinboxReceiver] onReceive() >> intent.getData() : com.Company.Proj1

I/SocialHub( 8144): [UinboxReceiver] onReceive() >> ==============================================

I/Firewall( 8790): Remove Package Name :com.Company.Proj1

I/Firewall( 8790): Found Package and Removing

W/ResourceType( 492): getEntry failing because entryIndex 1285 is beyond type entryCount 510

W/ResourceType( 492): Failure getting entry for 0x7f020505 (t=1 e=1285) in package 0 (error -2147483647)

W/ResourceType( 492): getEntry failing because entryIndex 1286 is beyond type entryCount 510

W/ResourceType( 492): Failure getting entry for 0x7f020506 (t=1 e=1286) in package 0 (error -2147483647)

W/ResourceType( 492): getEntry failing because entryIndex 1287 is beyond type entryCount 510

W/ResourceType( 492): Failure getting entry for 0x7f020507 (t=1 e=1287) in package 0 (error -2147483647)

W/ResourceType( 492): getEntry failing because entryIndex 1680 is beyond type entryCount 510

W/ResourceType( 492): Failure getting entry for 0x7f020690 (t=1 e=1680) in package 0 (error -2147483647)

D/AccountTypeManager( 492): Registering external account type=com.twitter.android.auth.login, packageName=com.twitter.android

D/dalvikvm( 318): GC_EXPLICIT freed 1072K, 56% free 19397K/43271K, paused 5ms+10ms

I/ApplicationPackageManager( 389): cscCountry is not German : XAB

I/Firewall( 8790): REMOVE END

I/AccountTypeManager( 492): Loaded meta-data for 7 account types, 4 accounts in 29ms

I/SevenBroadCastReceiver( 645): ==============================================

I/SevenBroadCastReceiver( 645): SevenBroadCastReceiver.onReceive()

I/SevenBroadCastReceiver( 645): intent.getAction() : android.intent.action.PACKAGE_REMOVED

I/SevenBroadCastReceiver( 645): ==============================================

I/ApplicationPackageManager( 389): cscCountry is not German : XAB

D/AndroidRuntime( 9941): Shutting down VM

D/dalvikvm( 9941): GC_CONCURRENT freed 102K, 87% free 346K/2560K, paused 1ms+0ms

D/jdwp ( 9941): Got wake-up signal, bailing out of select

D/dalvikvm( 9941): Debugger has detached; object registry had 1 entries

I/ApplicationPackageManager( 389): cscCountry is not German : XAB

D/PackageManager( 318): generateServicesMap(android.accounts.AccountAuthenticator): 11 services unchanged

D/AccountTypeManager( 492): Registering external account type=com.sec.android.app.snsaccountlinkedin.account_type, packageName=com.sec.android.app.snsaccountli

D/AccountTypeManager( 492): Registering external account type=com.sec.android.app.snsaccountfacebook.account_type, packageName=com.sec.android.app.snsaccountfb

D/AccountTypeManager( 492): Registering external account type=com.skype.contacts.sync, packageName=com.skype.raider

W/ResourceType( 492): getEntry failing because entryIndex 1285 is beyond type entryCount 510

W/ResourceType( 492): Failure getting entry for 0x7f020505 (t=1 e=1285) in package 0 (error -2147483647)

I/ApplicationPackageManager( 389): cscCountry is not German : XAB

W/ResourceType( 492): getEntry failing because entryIndex 1286 is beyond type entryCount 510

W/ResourceType( 492): Failure getting entry for 0x7f020506 (t=1 e=1286) in package 0 (error -2147483647)

W/ResourceType( 492): getEntry failing because entryIndex 1287 is beyond type entryCount 510

W/ResourceType( 492): Failure getting entry for 0x7f020507 (t=1 e=1287) in package 0 (error -2147483647)

W/ResourceType( 492): getEntry failing because entryIndex 1680 is beyond type entryCount 510

W/ResourceType( 492): Failure getting entry for 0x7f020690 (t=1 e=1680) in package 0 (error -2147483647)

D/AccountTypeManager( 492): Registering external account type=com.twitter.android.auth.login, packageName=com.twitter.android

I/ApplicationPackageManager( 389): cscCountry is not German : XAB

I/Firewall( 8790): Add Package Name is com.Company.Proj1

I/Firewall( 8790): Package is Newly Added With the SAME ID

I/Firewall( 8790): ADD SERVICE COMPLETE

I/AccountTypeManager( 492): Loaded meta-data for 7 account types, 4 accounts in 18ms

D/dalvikvm( 492): GC_CONCURRENT freed 365K, 10% free 7046K/7751K, paused 6ms+2ms

I/ApplicationPackageManager( 389): cscCountry is not German : XAB

I/ApplicationPackageManager( 389): cscCountry is not German : XAB

D/GTalkService( 415): [GTalkService.1] handlePackageInstalled: re-initialize providers

D/GTalkService( 415): [RawStanzaProvidersMgr] ##### searchProvidersFromIntent

I/SevenBroadCastReceiver( 645): ==============================================

I/SevenBroadCastReceiver( 645): SevenBroadCastReceiver.onReceive()

I/SevenBroadCastReceiver( 645): intent.getAction() : android.intent.action.PACKAGE_ADDED

I/SevenBroadCastReceiver( 645): ==============================================

I/ApplicationPackageManager( 389): cscCountry is not German : XAB

I/ApplicationPackageManager( 389): cscCountry is not German : XAB

I/ApplicationPackageManager( 389): cscCountry is not German : XAB

I/ApplicationPackageManager( 389): cscCountry is not German : XAB

D/WindowManager( 318): addWindowToListInOrder() : current mSkipWidgetFocus='true'

I/SurfaceFlinger( 237): id=269(51) createSurface 0x13dc84 for pid 365 (1x1),1 flag=0, NotificationTicker

I/ApplicationPackageManager( 389): cscCountry is not German : XAB

D/WifiStateMachine( 318): setWifiEnabled: true

D/HierarchicalStateMachine( 318): handleMessage: E msg.what=1

D/HierarchicalStateMachine( 318): processMsg: ConnectedState

D/WifiStateMachine( 318): ConnectedState{ what=1 when=0 arg1=2 }

D/HierarchicalStateMachine( 318): processMsg: ConnectModeState

D/WifiStateMachine( 318): ConnectModeState{ what=1 when=0 arg1=2 }

D/HierarchicalStateMachine( 318): processMsg: DriverStartedState

D/WifiStateMachine( 318): DriverStartedState{ what=1 when=0 arg1=2 }

D/HierarchicalStateMachine( 318): processMsg: SupplicantStartedState

D/WifiStateMachine( 318): SupplicantStartedState{ what=1 when=0 arg1=2 }

D/HierarchicalStateMachine( 318): processMsg: DefaultState

D/WifiStateMachine( 318): DefaultState{ what=1 when=0 arg1=2 }

D/HierarchicalStateMachine( 318): handleMessage: X

D/WifiService( 318): acquireWifiLockLocked: WifiLock{NetworkLocationProvider type=2 binder=android.os.BinderProxy@41b494b8}

D/HierarchicalStateMachine( 318): handleMessage: E msg.what=11

D/HierarchicalStateMachine( 318): processMsg: ConnectedState

D/WifiStateMachine( 318): ConnectedState{ what=11 when=-1ms }

D/HierarchicalStateMachine( 318): processMsg: ConnectModeState

D/WifiStateMachine( 318): ConnectModeState{ what=11 when=-1ms }

D/HierarchicalStateMachine( 318): processMsg: DriverStartedState

D/WifiStateMachine( 318): DriverStartedState{ what=11 when=-1ms }

D/HierarchicalStateMachine( 318): processMsg: SupplicantStartedState

D/WifiStateMachine( 318): SupplicantStartedState{ what=11 when=-1ms }

D/HierarchicalStateMachine( 318): processMsg: DefaultState

D/WifiStateMachine( 318): DefaultState{ what=11 when=-1ms }

D/HierarchicalStateMachine( 318): handleMessage: X

D/HierarchicalStateMachine( 318): handleMessage: E msg.what=72

D/HierarchicalStateMachine( 318): processMsg: ConnectedState

D/WifiStateMachine( 318): ConnectedState{ what=72 when=0 arg1=1 }

D/HierarchicalStateMachine( 318): handleMessage: X

D/HierarchicalStateMachine( 318): handleMessage: E msg.what=13

D/HierarchicalStateMachine( 318): processMsg: ConnectedState

D/WifiStateMachine( 318): ConnectedState{ what=13 when=0 }

D/HierarchicalStateMachine( 318): processMsg: ConnectModeState

D/WifiStateMachine( 318): ConnectModeState{ what=13 when=0 }

D/HierarchicalStateMachine( 318): processMsg: DriverStartedState

D/WifiStateMachine( 318): DriverStartedState{ what=13 when=0 }

D/HierarchicalStateMachine( 318): processMsg: SupplicantStartedState

D/WifiStateMachine( 318): SupplicantStartedState{ what=13 when=0 }

D/HierarchicalStateMachine( 318): processMsg: DefaultState

D/WifiStateMachine( 318): DefaultState{ what=13 when=0 }

D/HierarchicalStateMachine( 318): handleMessage: X

D/HierarchicalStateMachine( 318): handleMessage: E msg.what=77

D/HierarchicalStateMachine( 318): processMsg: ConnectedState

D/WifiStateMachine( 318): ConnectedState{ what=77 when=0 }

D/HierarchicalStateMachine( 318): processMsg: ConnectModeState

D/WifiStateMachine( 318): ConnectModeState{ what=77 when=0 }

D/HierarchicalStateMachine( 318): processMsg: DriverStartedState

D/WifiStateMachine( 318): DriverStartedState{ what=77 when=0 }

D/HierarchicalStateMachine( 318): handleMessage: X

...........
...........

Re: Building dex Failed

March 7, 2012 - 8:16pm #8

Hi,

I am getting the following error in my DDMS console.

I am not too familiar with Eclipse but enough to control the preferences and bring the SDK and AVD managers.See error message below.

I never been able to intall the Vuforia application before. Only from a standard android application that i build with a couple of animation.

Hope this help

Rick

-----------------------------------------------------

[2012-03-07 19:13:00 - DDMS] DDMS files not found: C:\Program Files (x86)\eclipse\platform-tools\adb.exe C:\Program Files (x86)\eclipse\tools\hprof-conv.exe C:\Program Files (x86)\eclipse\tools\traceview.bat
[2012-03-07 19:26:11 - ddmlib] An established connection was aborted by the software in your host machine
java.io.IOException: An established connection was aborted by the software in your host machine
at sun.nio.ch.SocketDispatcher.write0(Native Method)
at sun.nio.ch.SocketDispatcher.write(Unknown Source)
at sun.nio.ch.IOUtil.writeFromNativeBuffer(Unknown Source)
at sun.nio.ch.IOUtil.write(Unknown Source)
at sun.nio.ch.SocketChannelImpl.write(Unknown Source)
at com.android.ddmlib.JdwpPacket.writeAndConsume(JdwpPacket.java:213)
at com.android.ddmlib.Client.sendAndConsume(Client.java:575)
at com.android.ddmlib.HandleHeap.sendREAQ(HandleHeap.java:348)
at com.android.ddmlib.Client.requestAllocationStatus(Client.java:421)
at com.android.ddmlib.DeviceMonitor.createClient(DeviceMonitor.java:854)
at com.android.ddmlib.DeviceMonitor.openClient(DeviceMonitor.java:822)
at com.android.ddmlib.DeviceMonitor.processIncomingJdwpData(DeviceMonitor.java:781)
at com.android.ddmlib.DeviceMonitor.deviceClientMonitorLoop(DeviceMonitor.java:649)
at com.android.ddmlib.DeviceMonitor.access$100(DeviceMonitor.java:42)
at com.android.ddmlib.DeviceMonitor$3.run(DeviceMonitor.java:577)

[2012-03-07 19:26:15 - ddmlib] An established connection was aborted by the software in your host machine
java.io.IOException: An established connection was aborted by the software in your host machine
at sun.nio.ch.SocketDispatcher.write0(Native Method)
at sun.nio.ch.SocketDispatcher.write(Unknown Source)
at sun.nio.ch.IOUtil.writeFromNativeBuffer(Unknown Source)
at sun.nio.ch.IOUtil.write(Unknown Source)
at sun.nio.ch.SocketChannelImpl.write(Unknown Source)
at com.android.ddmlib.JdwpPacket.writeAndConsume(JdwpPacket.java:213)
at com.android.ddmlib.Client.sendAndConsume(Client.java:575)
at com.android.ddmlib.HandleHeap.sendREAQ(HandleHeap.java:348)
at com.android.ddmlib.Client.requestAllocationStatus(Client.java:421)
at com.android.ddmlib.DeviceMonitor.createClient(DeviceMonitor.java:854)
at com.android.ddmlib.DeviceMonitor.openClient(DeviceMonitor.java:822)
at com.android.ddmlib.DeviceMonitor.processIncomingJdwpData(DeviceMonitor.java:781)
at com.android.ddmlib.DeviceMonitor.deviceClientMonitorLoop(DeviceMonitor.java:649)
at com.android.ddmlib.DeviceMonitor.access$100(DeviceMonitor.java:42)
at com.android.ddmlib.DeviceMonitor$3.run(DeviceMonitor.java:577)

Re: Building dex Failed

March 7, 2012 - 6:01pm #7

Do you have eclipse installed? - are there errors apparent in LogCat? - do you see the app process in the DDMS panel?

Also had you been able to install Vuforia apps on this device previously?

Re: Building dex Failed

March 7, 2012 - 5:22pm #6

In regards to my previous email - the error message should say when opening on my device "application has stopped unexpectedly" .

Thanks
Rcihard

Re: Building dex Failed

March 7, 2012 - 4:52pm #5

Hi,

The dex has finally desappeared by defining the environment variable at 512m. Thanks

On the other hand, it crashes the application when it appears on my device. It comes back saying it "has stoped expectedly" and you have to close the window.There is no error message in unity and it writes the output file as expected in my export directory.I am running Android 3.2 and i used the 2.2. as exported version. I loaded the default project coming the installation and crashes too.

Any idea

Thanks again for the dex error.

Rick

Re: Building dex Failed

March 7, 2012 - 2:15pm #4
Quote:

Could not reserve enough space for object heap

is associated an inability to allocate the necessary space in physical memory.

a solution is described here..
http://forum.unity3d.com/threads/88119-Could-not-reserve-enough-space-for-object-heap-RESOLVED

Re: Building dex Failed

March 7, 2012 - 8:43am #3

No i am trying to ouput it to my device which is a samsung galaxy 10.1. I exported it ti android 2.2 or 3.1 and 3.2.

As mentioned it works ok for any standard android project. It looks like the qulacomm/vuforia is causing the problem.

I would really need to solve this isssu.

Rick

Re: Building dex Failed

March 6, 2012 - 6:58pm #2

Are you trying to run the app in the Android emulator? This is not supported, QCAR only runs on supported devices.

- Kim

Log in or register to post comments