Android sdk not working

Common bugs/problems with the Android SDK the Emulator and the ADT-Plugin.

Android sdk not working

Postby tobimichigan » Mon Mar 28, 2011 8:52 pm

Warm Greets Gents,
Well I am writing on android app as a project in mobile computing. I am working with eclipse pulsar and I have downloaded several sdk platforms namely 1.5, 1.6, 2.1, etc. The only program I have successfully run is the Hello world program.

All the code samples in the android sdk of all the platforms seem not to be working. I always run configurations with a complimentary avd. I also take care to specify the <uses min sdk> just below the </application> element. But all the sample codes in the sdk I try to test seem not to be working..even after the avd has uploaded and installed the service and activity file meant for execution. For instance if I load Contact Manager from existing sample with sdk 2.1, on running the compiled app, after I type add_contact into the avd, it reads error.The same goes for accellometer, and other samples. Please can any 1 tell me precisely what I'm doing wrong here? Thanks in advance.
tobimichigan
Freshman
Freshman
 
Posts: 2
Joined: Mon Mar 28, 2011 7:27 pm

Top

Re: Android sdk not working

Postby raj_J2ME » Tue Mar 29, 2011 7:33 am

Hey welcome to the Android Forums... :)

Did you create the hello world demo and then you run this..which was indeed successfully executed?

Please let us know the procedure you have used for to get executed the samples from the SDK?
Thanks with Regards,
Raj - The Kernel
raj_J2ME
Master Developer
Master Developer
 
Posts: 311
Joined: Tue Feb 15, 2011 7:40 am
Location: The Capital of India,

Re: Android sdk not working

Postby tobimichigan » Tue Mar 29, 2011 3:30 pm

Here's my src:
package com.example.helloandroid;

import android.app.Activity;
import android.os.Bundle;

public class Hello_Android extends Activity {
/** Called when the activity is first created. */
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.main);
}
}

here's my main.xml
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
>
<TextView xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/textview"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:text="@string/hello"
/>
</LinearLayout>

Here's my string.xml
<?xml version="1.0" encoding="utf-8" standalone="no"?>
<resources>
<string name="hello">Hello World, Hello_Android! I belong to Jesus!</string>
<string name="app_name">Hello, Android</string>
</resources>

Here's what I have in my console for the hello_world:

[2011-03-29 14:58:56 - Hello_Android] ------------------------------
[2011-03-29 14:58:56 - Hello_Android] Android Launch!
[2011-03-29 14:58:56 - Hello_Android] adb is running normally.
[2011-03-29 14:58:56 - Hello_Android] Performing com.example.helloandroid.Hello_Android activity launch
[2011-03-29 14:58:56 - Hello_Android] Automatic Target Mode: Preferred AVD 'Tobi_AVD' is not available. Launching new emulator.
[2011-03-29 14:58:56 - Hello_Android] Launching a new emulator with Virtual Device 'Tobi_AVD'
[2011-03-29 14:59:04 - Hello_Android] New emulator found: emulator-5554
[2011-03-29 14:59:04 - Hello_Android] Waiting for HOME ('android.process.acore') to be launched...
[2011-03-29 15:00:12 - Hello_Android] HOME is up on device 'emulator-5554'
[2011-03-29 15:00:12 - Hello_Android] Uploading Hello_Android.apk onto device 'emulator-5554'
[2011-03-29 15:00:12 - Hello_Android] Installing Hello_Android.apk...
[2011-03-29 15:00:43 - Hello_Android] Success!
[2011-03-29 15:00:44 - Hello_Android] Starting activity com.example.helloandroid.Hello_Android on device emulator-5554


Besides this hello world, nothing seems to run perfectly from the sdk 2.1
Take for instance the ContactManager sdk in ver 2.1. I loaded the sdk either by importing, or from existing. After creating the run configurations from the run menu, I ctrl+F11 and below was the console out:

[2011-03-29 15:04:53 - ContactManager] ------------------------------
[2011-03-29 15:04:53 - ContactManager] Android Launch!
[2011-03-29 15:04:53 - ContactManager] adb is running normally.
[2011-03-29 15:04:53 - ContactManager] Performing com.example.android.contactmanager.ContactManager activity launch
[2011-03-29 15:04:53 - ContactManager] Automatic Target Mode: Preferred AVD 'Tobi_AVD' is not available. Launching new emulator.
[2011-03-29 15:04:53 - ContactManager] Launching a new emulator with Virtual Device 'Tobi_AVD'
[2011-03-29 15:05:03 - ContactManager] New emulator found: emulator-5554
[2011-03-29 15:05:03 - ContactManager] Waiting for HOME ('android.process.acore') to be launched...
[2011-03-29 15:06:03 - ContactManager] HOME is up on device 'emulator-5554'
[2011-03-29 15:06:03 - ContactManager] Uploading ContactManager.apk onto device 'emulator-5554'
[2011-03-29 15:06:04 - ContactManager] Installing ContactManager.apk...
[2011-03-29 15:06:35 - ContactManager] Success!
[2011-03-29 15:06:36 - ContactManager] Starting activity com.example.android.contactmanager.ContactManager on device emulator-5554

It hangs here forever..until I press menu on the avd, which then prompts by listing saying "Sorry! Application Keyboard in process.com.android.inputmethod.latin) is not responding {force close, Wait}

After this stage the contactmanager application launches only for me to fill in the contact details then another error reads "The Application ContactManager {process 'com.example.android.contactmanager', has stopped unexpectedly. Please try again. (force close)" . At this stage I am left with clicking force close and it returns back to "show visible contacts only. Add Contact"
tobimichigan
Freshman
Freshman
 
Posts: 2
Joined: Mon Mar 28, 2011 7:27 pm

Top

Return to SDK/ADT/Emulator Problems

Who is online

Users browsing this forum: Google [Bot] and 5 guests