Note that there are some explanatory texts on larger screens.

plurals
  1. POHow to launch a regular Activity on Google Glass
    primarykey
    data
    text
    <p>I have been looking through the github examples for google glass and my code doesn't really look very different. With the exception of launching a regular <code>TextView</code>, my code should theoretically work. My Activity code is:</p> <p>package com.helloglass;</p> <p>import android.os.Bundle; import android.app.Activity;</p> <pre><code>public class MainActivity extends Activity { @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); } } </code></pre> <p>My Layout is</p> <pre><code>&lt;FrameLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent" android:layout_height="match_parent" android:paddingBottom="@dimen/activity_vertical_margin" android:paddingLeft="@dimen/activity_horizontal_margin" android:paddingRight="@dimen/activity_horizontal_margin" android:paddingTop="@dimen/activity_vertical_margin" &gt; &lt;TextView android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="Hello World"/&gt; &lt;/FrameLayout&gt; </code></pre> <p>And my manifest is</p> <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt; &lt;manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.helloglass" android:versionCode="1" android:versionName="1.0" &gt; &lt;uses-sdk android:minSdkVersion="15" android:targetSdkVersion="15" /&gt; &lt;application android:allowBackup="true" android:icon="@drawable/ic_launcher" android:label="@string/app_name" &gt; &lt;activity android:name="com.helloglass.MainActivity" android:label="@string/app_name_hello" android:enabled="true" &gt; &lt;intent-filter&gt; &lt;action android:name="android.intent.action.MAIN" /&gt; &lt;/intent-filter&gt; &lt;/activity&gt; &lt;/application&gt; &lt;/manifest&gt; </code></pre> <p>Now all I want to do is just see the damn view pop up, but I keep getting this error</p> <pre><code>[2013-11-29 14:04:49 - Dex Loader] Unable to execute dex: java.nio.BufferOverflowException. Check the Eclipse log for stack trace. [2013-11-29 14:04:49 - HelloGlass] Conversion to Dalvik format failed: Unable to execute dex: java.nio.BufferOverflowException. Check the Eclipse log for stack trace. </code></pre> <p>I tested the example projects and they are working, so I doubt its my eclipse installation. I am trying to understand what I am doing wrong here because it isn't very clear in the GDK docs. There are barely any examples doing this. But my assumption is my code above will just be an immersion since the doc says that <code>You create immersions using standard Android activities</code>. Since there is no extra info on setting up anything special in the manifest, I fail to see what I am doing wrong. Any explanation on this would be greatly appreciated.</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload