Can't get HelloWorld running

Started by krumelist, November 10, 2014, 08:33:53 PM

Previous topic - Next topic

krumelist

Hello everyone  :)
I'm experienced with Java and Eclipse but never touched android development before and I cant get it running on my Nexus7. I really hope someone could help me out.
It's starting on the device but immediatly crashes with the dialog:  "testing" was closed.

I created the class com.example.testing.HelloWorld with the code provided at Hello World for Android.

My AndroidManifest.xml:

<manifest package="com.example.testing"
    android:versionCode="1"
    android:versionName="1.0" xmlns:android="http://schemas.android.com/apk/res/android">

    <uses-sdk
        android:minSdkVersion="8"
        android:targetSdkVersion="21" />
   
    <application android:label="@string/app_name" android:icon="@drawable/ic_launcher">
    <activity android:name="HelloWorld"
              android:label="@string/app_name">
        <intent-filter>
            <action android:name="android.intent.action.MAIN" />
            <category android:name="android.intent.category.LAUNCHER" />
        </intent-filter>
    </activity>
</application>

</manifest>


What my console loggs:
[2014-11-10 20:22:19 - testing] Android Launch!
[2014-11-10 20:22:19 - testing] adb is running normally.
[2014-11-10 20:22:19 - testing] Performing com.example.testing.HelloWorld activity launch
[2014-11-10 20:22:19 - testing] Automatic Target Mode: using device '06276380'
[2014-11-10 20:22:19 - testing] Application already deployed. No need to reinstall.
[2014-11-10 20:22:19 - testing] Starting activity com.example.testing.HelloWorld on device 06276380
[2014-11-10 20:22:20 - testing] ActivityManager: Starting: Intent { act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] cmp=com.example.testing/.HelloWorld }


I'd appreciate every help offered, since there are no errors displayed. There has to be thrown an error or exception, otherwise it should work. How do I access them on my device?

Thank you! ;D


EgonOlsen

If there is some exception, you should see it in the logs. The most common problem is that the jpct-ae.jar isn't exported to the device. Check your build path and see if there's a checkbox checked for jpct-ae.jar in the Order and Export tab.

krumelist

#2
Okay it wasn't checked. I did it but it still doesn't function. How do I display the logs? Is it the normal Java console? It won't show any information as it did before when I'm getting the activity launched.

My jpct-ae.jar is not located at the workspace and project im working with. It shows in  Referenced Libraries. Is this alright? Its now in my project location won't work.

I imported the Demo HelloWorld-AE and it works. But I really would like to know what the problem with my setup was :/

EgonOlsen

In Eclipse, you have a DDMS perspective that should display all the logs you need...and more.