I had a working app, and just updated to yesterdays SDK Tools release, v22.2. Since, I've been unable to run the application on device. I discovered the issue with Android Private Libraries not being exported by default, so corrected that, and subsequently got the "Can't convert to Delvyk, dex failed... heap..." error. Rebuilt the classpath several times, reimporting the google-play-services project (copying into workspace), and modifying build settings, etc, and still could not get the app to run on device. I then tried building with ant, and then installing the apk manually. This approach resulted in the app running, but immediately hitting this issue: This app won't run unless you update Google Play Services
I dug back into my build path, even though I hadn't modified existing dependencies, and noticed that the google-play-services-lib.jar is included under Android Dependencies, which is where I'd expect it to be given it's basically a project dependency, and also shows up under Android Private Libraries.
Here's my .classpath:
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="con" path="com.android.ide.eclipse.adt.ANDROID_FRAMEWORK"/>
<classpathentry exported="true" kind="con" path="com.android.ide.eclipse.adt.LIBRARIES"/>
<classpathentry exported="true" kind="con" path="com.android.ide.eclipse.adt.DEPENDENCIES"/>
<classpathentry combineaccessrules="false" kind="src" path="/anKHToolbox"/>
<classpathentry combineaccessrules="false" kind="src" path="/google-play-services_lib"/>
<classpathentry kind="src" path="src"/>
<classpathentry kind="src" path="gen"/>
<classpathentry kind="output" path="bin/classes"/>
</classpath>
I have another workspace project dependency (anKHToolbox), configured identically, which does not do this. Quick test of disabling Android Private Libraries under Export and Order tab, and the app boots into device, but then obviously dies due to missing dependencies.
I think both outcomes - the dex heap fail, and the prompt for updating Google Play Services, are completely related to this condition of the jar being referenced twice. I found another possibly related issue Unable to execute dex: Multiple dex files define Lcom/myapp/R$array; but not sure what the solution was, or whether it's actually related to begin with.
Can anybody else confirm this, or tell me what change I need to make that I missed? I'm beginning to think this is a potential bug. Thanks all.