Hello. I have an application in which I am trying to start an activity (geotest) in, and the activity crashes upon start of the application. Below is my code and my logcat output. I can't figure out the problem, because I have several other activities I am able to start exactly the same way with no problem. When I compare the code, I can't see what I'm doing wrong with the activity that crashes. Am I missing permissions for something maybe? Can someone please help? Thanks! ---------------------------------------------------------------------------- ---------------------------------------------- geotest.java: package net.tinyang.geotest;
import android.app.Activity; //import android.content.Intent; import android.os.Bundle; import android.view.View; import android.widget.Button; import android.widget.Toast; public class geotest extends Activity { Button geotagbtn = null; Button next2btn = null; @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); geotagbtn = (Button) findViewById(R.id.geotagbtn); geotagbtn.setOnClickListener(new View.OnClickListener() { public void onClick(View v) { //startActivity(new Intent(MainMenu.this, TakePic.class)); Toast.makeText(geotest.this, "Geotag Picture coming soon", 5000).show(); } }); next2btn = (Button) findViewById(R.id.next2btn); next2btn.setOnClickListener(new View.OnClickListener() { public void onClick(View v) { //startActivity(new Intent(Geotest.this, FieldGuide.class)); Toast.makeText(geotest.this, "Next coming soon", 5000).show(); } }); } } ---------------------------------------------------------------------------- -------------------------------------- geotag.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 android:id="@+id/pictitle" android:layout_width="fill_parent" android:layout_height="wrap_content" android:layout_marginTop="10dip" android:text="Geotag your Picture" /> <ImageView android:id="@+id/camsurface" android:layout_width="wrap_content" android:layout_height="wrap_content"> </ImageView> <TableLayout android:layout_width="fill_parent" android:layout_height="wrap_content" > <TableRow> <Button android:id="@+id/geotagbtn" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_below="@id/camsurface" android:layout_centerHorizontal="true" android:text=" Geotag " /> <Button android:id="@+id/next2btn" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_centerHorizontal="true" android:text=" Next " /> </TableRow> </TableLayout> </LinearLayout> ---------------------------------------------------------------------------- ------------------------------------------------- manifest: <?xml version="1.0" encoding="utf-8"?> <manifest xmlns:android="http://schemas.android.com/apk/res/android" package="net.tinyang.geotest" android:versionCode="1" android:versionName="1.0"> <uses-permission android:name="android.permission.INTERNET" /> <uses-permission android:name="android.permission.CAMERA"/> <application android:icon="@drawable/icon" android:label="@string/app_name"> <activity android:name=".geotest" 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> <uses-sdk android:minSdkVersion="2" /> </manifest> ---------------------------------------------------------------------------- --------------------------------------------------------------- Logcat output: 09-02 23:14:42.623: ERROR/mountd(20): could not read initial mass storage state 09-02 23:14:42.934: ERROR/flash_image(29): can't find recovery partition 09-02 23:14:50.694: ERROR/MemoryHeapBase(52): error opening /dev/pmem: No such file or directory 09-02 23:14:50.694: ERROR/SurfaceFlinger(52): Couldn't open /sys/android_power/wait_for_fb_sleep or /sys/android_power/wait_for_fb_wake 09-02 23:14:50.725: ERROR/GLLogger(52): couldn't load <libhgl.so> library (Cannot find library) 09-02 23:14:50.805: ERROR/GLLogger(52): couldn't load <libhgl.so> library (Cannot find library) 09-02 23:14:53.533: ERROR/BatteryService(52): Could not open '/sys/class/power_supply/usb/online' 09-02 23:14:53.533: ERROR/BatteryService(52): Could not open '/sys/class/power_supply/battery/batt_vol' 09-02 23:14:53.533: ERROR/BatteryService(52): Could not open '/sys/class/power_supply/battery/batt_temp' 09-02 23:14:53.754: ERROR/EventHub(52): could not get driver version for /dev/input/mouse0, Not a typewriter 09-02 23:14:53.754: ERROR/System(52): Failure starting core service 09-02 23:14:53.754: ERROR/System(52): java.lang.SecurityException 09-02 23:14:53.754: ERROR/System(52): at android.os.BinderProxy.transact(Native Method) 09-02 23:14:53.754: ERROR/System(52): at android.os.ServiceManagerProxy.addService(ServiceManagerNative.java:146) 09-02 23:14:53.754: ERROR/System(52): at android.os.ServiceManager.addService(ServiceManager.java:72) 09-02 23:14:53.754: ERROR/System(52): at com.android.server.ServerThread.run(SystemServer.java:155) 09-02 23:14:53.764: ERROR/AndroidRuntime(52): Crash logging skipped, no checkin service 09-02 23:14:53.783: ERROR/EventHub(52): could not get driver version for /dev/input/mice, Not a typewriter 09-02 23:14:54.045: ERROR/SystemServer(52): Failure starting StatusBarService 09-02 23:14:54.045: ERROR/SystemServer(52): java.lang.NullPointerException 09-02 23:14:54.045: ERROR/SystemServer(52): at com.android.server.status.StatusBarPolicy.updateBluetooth(StatusBarPolicy.ja va:762) 09-02 23:14:54.045: ERROR/SystemServer(52): at com.android.server.status.StatusBarPolicy.<init>(StatusBarPolicy.java:285) 09-02 23:14:54.045: ERROR/SystemServer(52): at com.android.server.status.StatusBarPolicy.installIcons(StatusBarPolicy.java: 341) 09-02 23:14:54.045: ERROR/SystemServer(52): at com.android.server.ServerThread.run(SystemServer.java:182) 09-02 23:14:54.055: ERROR/AndroidRuntime(52): Crash logging skipped, no checkin service 09-02 23:14:54.295: ERROR/GpsLocationProvider(52): Could not open GPS configuration file /etc/gps.conf 09-02 23:14:54.295: ERROR/GpsLocationProvider(52): java.io.FileNotFoundException: /etc/gps.conf 09-02 23:14:54.295: ERROR/GpsLocationProvider(52): at org.apache.harmony.luni.platform.OSFileSystem.open(OSFileSystem.java:227) 09-02 23:14:54.295: ERROR/GpsLocationProvider(52): at java.io.FileInputStream.<init>(FileInputStream.java:76) 09-02 23:14:54.295: ERROR/GpsLocationProvider(52): at com.android.internal.location.GpsLocationProvider.<init>(GpsLocationProvider .java:179) 09-02 23:14:54.295: ERROR/GpsLocationProvider(52): at com.android.server.LocationManagerService._loadProvidersNoSync(LocationManag erService.java:356) 09-02 23:14:54.295: ERROR/GpsLocationProvider(52): at com.android.server.LocationManagerService.loadProvidersNoSync(LocationManage rService.java:340) 09-02 23:14:54.295: ERROR/GpsLocationProvider(52): at com.android.server.LocationManagerService.loadProviders(LocationManagerServi ce.java:333) 09-02 23:14:54.295: ERROR/GpsLocationProvider(52): at com.android.server.LocationManagerService.<init>(LocationManagerService.java :447) 09-02 23:14:54.295: ERROR/GpsLocationProvider(52): at com.android.server.ServerThread.run(SystemServer.java:235) 09-02 23:14:54.305: ERROR/AndroidRuntime(52): Crash logging skipped, no checkin service 09-02 23:15:00.605: ERROR/dalvikvm(157): pthread_setspecific failed, err=22 09-02 23:15:03.095: ERROR/NetworkStateTracker(52): net.tcp.buffersize.unknown not found in system properties. Using defaults 09-02 23:15:03.095: ERROR/NetworkStateTracker(52): Can't set tcp buffer sizes:java.io.FileNotFoundException: /sys/kernel/ipv4/tcp_rmem_min -- :-) Teena P Please don't print this e-mail unless you really need to. Computer Problems? Questions? I can help! Click on the link below: http://www.crossloop.com/Teenah --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Android Beginners" group. To post to this group, send email to android-beginners@googlegroups.com To unsubscribe from this group, send email to android-beginners-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-beginners?hl=en -~----------~----~----~----~------~----~------~--~---