I am building a HelloWorld-project called 'HelloGlass' using the GDK.
I have a HelloGlassActivity class, which works perfectly fine when launched and compiled. I then try adding another class, HelloGlassService, which extends android.app.Service and implements one abstract function. The moment I add this class, the project suddenly stops compiling with and throws the following error:
Android Dex: [HelloGlass] Unable to execute DX Android Dex: [HelloGlass] java.nio.BufferOverflowException Android Dex: [HelloGlass] at java.nio.Buffer.nextPutIndex(Buffer.java:499)
Now, Google and StackOverflow tell me that this error can be resolved by making sure that the AndroidManifest SDK version matches the one my project is dependent on. However, all my dependencies are JDK 1.6 and the GDK Sneak Peek.
As in Google's own Stopwatch example, my project does not include a project.properties file (I removed it after creating the default Android app template provided by IntelliJ and setting it to the GDK Sneak Peek SDK); and that's what my AndroidManifest.xml looks like:
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.arik.HelloGlass"
android:versionCode="2"
android:versionName="1.0" >
<uses-sdk
android:minSdkVersion="15"
android:targetSdkVersion="15" />
<application
android:allowBackup="true"
android:label="Hello Glass App" >
<activity
android:name="com.arik.HelloGlass.HelloGlassActivity"
android:label="Hello Glass Activity"
android:enabled="true" >
</activity>
</application>
</manifest>
As you can see, I did not even include that Service Class in the manifest, and yet it crashes. The Service class looks like this:
package com.arik.HelloGlass;
import android.app.Service;
import android.content.Intent;
import android.os.IBinder;
public class HelloService extends Service{
@Override
public IBinder onBind(Intent intent) {
return null;
}
}
And here are my module dependencies:
What am I doing wrong?