Author Topic: Can't get HelloWorld running  (Read 1696 times)

Offline krumelist

  • byte
  • *
  • Posts: 2
    • View Profile
Can't get HelloWorld running
« on: November 10, 2014, 08:33:53 pm »
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:

Code: [Select]
<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:
Code: [Select]
[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


Offline EgonOlsen

  • Administrator
  • quad
  • *****
  • Posts: 12295
    • View Profile
    • http://www.jpct.net
Re: Can't get HelloWorld running
« Reply #1 on: November 10, 2014, 09:05:57 pm »
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.

Offline krumelist

  • byte
  • *
  • Posts: 2
    • View Profile
Re: Can't get HelloWorld running
« Reply #2 on: November 10, 2014, 09:25:00 pm »
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 :/
« Last Edit: November 10, 2014, 09:33:24 pm by krumelist »

Offline EgonOlsen

  • Administrator
  • quad
  • *****
  • Posts: 12295
    • View Profile
    • http://www.jpct.net
Re: Can't get HelloWorld running
« Reply #3 on: November 10, 2014, 11:41:16 pm »
In Eclipse, you have a DDMS perspective that should display all the logs you need...and more.