开发者

Android "Application has stopped unexpectedly. Please try again."

I'm making an Android app for my work. Fairly new to the app development process so I'm testing it at early stages of development.

Here's the eclipse code:

public class ClientFeedbackActivity extends Activity {

@Override
public void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    this.setContentView(R.Layout.main);

    ImageButton mPortrait = (ImageButton)findViewById(R.id.imgPortrait);
    mPortrait.setOnClickListener(new View.OnClickListener() {
        @Override
        public void onClick(View v) {
            Toast.makeText(getBaseContext(),
                    "You have clicked the Portrait button", 
                    Toast.LENGTH_SHORT).show();         
        }
    });

    EditText mComments = (EditText)findViewById(R.id.txtComments);
    mComments.setOnTouchListener(new View.OnTouchListener() {
        @Override
        public boolean onTouch(View v, MotionEvent event) {
            // TODO Auto-generated method stub
            return false;
        }
    });

    Button mSave = (Button)findViewById(R.id.btnSave);
    mSave.setOnClickListener(new View.OnClickListener() {
        @Override
        public void onClick(View v) {
            Toast.makeText(getBaseContext(), 
                    "You have clicked the Save button", 
                    Toast.LENGTH_SHORT).show();
        }
    });


    Button mClear = (Button)findViewById(R.id.btnClear);
    mClear.setOnClickListener(new View.OnClickListener() {
        @Override
        public void onClick(View v) {
            Toast.makeText(getBaseContext(),
                    "You have clicked on the Clear button",
                    Toast.LENGTH_SHORT).show();
        }
    });

    setContentView(R.layout.main);
}
}

My layout:

<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout
android:id="@+id/RLayout"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:orientation="horizontal"
android:padding="6dp"
xmlns:android="http://schemas.android.com/apk/res/android"
>
<TextView
    android:id="@+id/lblPortrait"
    android:textSize="18sp"
    android:text="Touch to take portrait"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:layout_alignParentTop="true"
    android:layout_alignParentLeft="true"
    android:layout_margin="6dp"
    />
<ImageButton
    android:id="@+id/imgPortrait"
    android:layout_alignParentLeft="true"
    android:layout_below="@+id/lblPortrait"
    android:layout_width="240dp"
    android:layout_height="400dp"
    android:layout_margin="6dp"
    />
<TextView 
    android:id="@+id/lblComments"
    android:textSize="18sp"
    android:text="What you thought"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:layout_alignParentTop="true"
    android:layout_toRightOf="@+id/imgPortrait"
    android:layout_margin="6dp"
    />
<EditText
    android:id="@+id/txtComments"
    android:textSize="18sp"
    android:layout_alignLeft="@+id/lblComments"
    android:layout_alignParentRight="true"
    android:layout_alignTop="@+id/imgPortrait"
    android:layout_alignBottom="@+id/imgPortrait"
    android:layout_margin="6dp"
    />
<Button
    android:id="@+id/btnSave"
    android:layout_width="125dp"
    android:layout_height="wrap_content"
    android:text="Save"
    android:layout_alignParentLeft="true"
    android:layout_alignParentBottom="true"
    />
<Button
    android:id="@+id/btnClear"
    android:layout_width="125dp"
    android:layout_height="wrap_content"
    android:text="Clear"
    android:layout_toRightOf="@+id/btnSave"
    android:layout_alignParentBottom="true"
    />
</RelativeLayout>

My Manifest:

<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
  package="logica.sparkcentre"
  android:versionCode="1"
  android:versionName="1.0">
<uses-sdk android:minSdkVersion="11" />

<application android:icon="@drawable/icon" android:label="@string/app_name" android:debuggable="true">
    <activity android:name=".ClientFeedbackActivity"
              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>

And finally, my logcat:

06-30 08:34:24.660: ERROR/AndroidRuntime(899): FATAL EXCEPTION: main
06-30 08:34:24.660: ERROR/AndroidRuntime(899): java.lang.RuntimeException: Unable to start activity ComponentInfo{logica.sparkcentre/logica.sparkcentre.ClientFeedbackActivity}: java.lang.NullPointerException
06-30 08:34:24.660: ERROR/AndroidRuntime(899):     at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1736)
06-30 08:34:24.660: ERROR/AndroidRuntime(899):     at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:1752)
06-30 08:34:24.660: ERROR/AndroidRuntime(899):     at android.app.ActivityThread.access$1500(ActivityThread.java:123)
06-30 08:34:24.660: ERROR/AndroidRuntime(899):     at android.app.ActivityThread$H.handleMessage(ActivityThread.java:993)
06-30 08:34:24.660: ERROR/AndroidRuntime(899):     at android.os.Handler.dispatchMessage(Handler.java:99)
06-30 08:34:24.660: ERROR/AndroidRuntime(899):     at android.os.Looper.loop(Looper.java:126)
06-30 08:34:24.660: ERROR/AndroidRuntime(899):     at android.app.ActivityThread.main(ActivityThread.java:3997)
06-30 08:34:24.660: ERROR/AndroidRuntime(899):     at java.lang.reflect.Method.invokeNative(Native Method)
06-30 08:34:24.660: ERROR/AndroidRuntime(899):     at java.lang.reflect.Method.invoke(Method.java:491)
06-30 08:34:24.660: ERROR/AndroidRuntime(899):     atcom.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:841)
06-30 08:34:24.660: ERROR/AndroidRuntime(899):     at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:599)
06-30 08:34:24.660: ERROR/AndroidRuntime(899):     at dalvik.system.NativeStart.main(Native Method)
06-30 08:34:24.660: ERROR/AndroidRuntime(899): Caused by: java.lang.NullPointerException
06-30 08:34:24.660: ERROR/AndroidRuntime(899):     at logica.sparkcentre.ClientFeedbackActivity.onCreate(ClientFeedbackActivity.java:19)
06-30 08:34:24.660: ERROR/AndroidRuntime(899):     at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1048)
06-30 08:34:24.660: ERROR/AndroidRuntime(899):     at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1700)
06-30 08:34:24.660: ERROR/AndroidRuntime(899):     ... 11 more
06-30 08:35:01.350: ERROR/WSBase(220): doRequest(): got exception: com.motorola.blur.service.blur.BlurBadSignatureException: com.motorola.blur.chunking.io.ChunkedInputStream$BadSignatureException: The message signature in chunk with offset=60 does not match the calculated signature
06-30 08:35:01.350: ERROR/WSBase(220):     at com.motorola.blur.service.blur.ws.WSBase.doRequest(WSBase.java:1285)
06-30 08:35:01.350: ERROR/WSBase(220):     at com.motorola.blur.service.blur.ws.WSBase$WSTransaction.run(WSBase.java:439)
06-30 08:35:01.350: ERROR/WSBase(220):     at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1081)
06-30 08:35:01.350: ERROR/WSBase(220):     at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:574)
06-30 08:35:01.350: ERROR/WSBase(220):     at java.lang.Thread.run(Thread.java:1020)
06-30 08:35:01.350: ERROR/WSBase(220):     at com.motorola.blur.util.concurrent.BlurThreadFactory$BlurPooledThread.run(BlurThreadFactory.java:58)
06-30 08:35:01.670: ERROR/WSBase(220): doRequest(): got exception: com.motorola.blur.service.blur.BlurBadSignatureException: com.motorola.blur.chunking.io.ChunkedInputStream$BadSignatureException: The message signature in chunk with offset=60 does not match the calculated signature
06-30 08:35:01.670: ERROR/WSBase(220):     at com.motorola.blur.service.blur.ws.WSBase.doRequest(WSBase.java:1285)
06-30 08:35:01.670: ERROR/WSBase(220):     at com.motorola.blur.service.blur.ws.WSBase$WSTransaction.run(WSBase.java:439)
06-30 08:35:01.670: ERROR/WSBase(220):     at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1081)
06-30 08:35:01.670: ERROR/WSBase(220):     at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:574)
06-30 08:35:01.670: ERROR/WSBase(220):     at java.lang.Thread.run(Thread.java:1020)
06-30 08:35:01.670: ERROR/WSBase(220):     at com.motorola.blur.util.concurrent.BlurThreadFactory$BlurPooledThread.run(BlurThreadFactory.java:58)
06-30 08:35:02.070: ERROR/WSBase(220): doRequest(): got exception: com.motorola.blur.service.blur.BlurBadSignatureException: com.motorola.blur.chunking.io.ChunkedInputStream$BadSignatureException: The message signature in chunk with offset=60 does not match the calculated signature
06-30 08:35:02.070: ERROR/WSBase(220):     at com.motorola.blur.service.blur.ws.WSBase.doRequest(WSBase.java:1285)
06-30 08:35:02.070: ERROR/WSBase(220):     at com.motorola.blur.service.blur.ws.WSBase$WSTransaction.run(WSBase.java:439)
06-30 08:35:02.070: ERROR/WSBase(220):     at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1081)
06-30 08:35:02.070: ERROR/WSBase(220):     at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:574)
06-30 08:35:02.070: ERROR/WSBase(220):     at java.lang.Thread.run(Thread.java:1020)
06-30 08:35:02.070: ERROR/WSBase(220):     at com.motorola.blur.util.concurrent.BlurThreadFactory$BlurPooledThread.run(BlurThreadFactory.java:58)
06-30 08:35:02.430: ERROR/WSBase(220): doRequest(): got exception: com.motorola.blur.service.blur.BlurBadSignatureException: com.motorola.blur.chunking.io.ChunkedInputStream$BadSignatureException: The message signature in chunk with offset=60 does not match the calculated signature
06-30 08:35:02.430: ERROR/WSBase(220):     at com.motorola.blur.service.blur.ws.WSBase.doRequest(WSBase.java:1285)
06-30 08:35:02.430: ERROR/WSBase(220):开发者_开发问答     at com.motorola.blur.service.blur.ws.WSBase$WSTransaction.run(WSBase.java:439)
06-30 08:35:02.430: ERROR/WSBase(220):     at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1081)
06-30 08:35:02.430: ERROR/WSBase(220):     at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:574)
06-30 08:35:02.430: ERROR/WSBase(220):     at java.lang.Thread.run(Thread.java:1020)
06-30 08:35:02.430: ERROR/WSBase(220):     at com.motorola.blur.util.concurrent.BlurThreadFactory$BlurPooledThread.run(BlurThreadFactory.java:58)
06-30 08:36:59.320: ERROR/GTalkService(257): ??? addConnectionClosedEvent: mConnectionUptime=0
06-30 08:37:02.180: ERROR/WSBase(220): doRequest(): got exception: com.motorola.blur.service.blur.BlurBadSignatureException: com.motorola.blur.chunking.io.ChunkedInputStream$BadSignatureException: The message signature in chunk with offset=60 does not match the calculated signature
06-30 08:37:02.180: ERROR/WSBase(220):     at com.motorola.blur.service.blur.ws.WSBase.doRequest(WSBase.java:1285)
06-30 08:37:02.180: ERROR/WSBase(220):     at com.motorola.blur.service.blur.ws.WSBase$WSTransaction.run(WSBase.java:439)
06-30 08:37:02.180: ERROR/WSBase(220):     at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1081)
06-30 08:37:02.180: ERROR/WSBase(220):     at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:574)
06-30 08:37:02.180: ERROR/WSBase(220):     at java.lang.Thread.run(Thread.java:1020)
06-30 08:37:02.180: ERROR/WSBase(220):     at com.motorola.blur.util.concurrent.BlurThreadFactory$BlurPooledThread.run(BlurThreadFactory.java:58)
06-30 08:37:02.520: ERROR/WSBase(220): doRequest(): got exception: com.motorola.blur.service.blur.BlurBadSignatureException: com.motorola.blur.chunking.io.ChunkedInputStream$BadSignatureException: The message signature in chunk with offset=60 does not match the calculated signature
06-30 08:37:02.520: ERROR/WSBase(220):     at com.motorola.blur.service.blur.ws.WSBase.doRequest(WSBase.java:1285)
06-30 08:37:02.520: ERROR/WSBase(220):     at com.motorola.blur.service.blur.ws.WSBase$WSTransaction.run(WSBase.java:439)
06-30 08:37:02.520: ERROR/WSBase(220):     at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1081)
06-30 08:37:02.520: ERROR/WSBase(220):     at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:574)
06-30 08:37:02.520: ERROR/WSBase(220):     at java.lang.Thread.run(Thread.java:1020)
06-30 08:37:02.520: ERROR/WSBase(220):     at com.motorola.blur.util.concurrent.BlurThreadFactory$BlurPooledThread.run(BlurThreadFactory.java:58)
06-30 08:37:02.950: ERROR/WSBase(220): doRequest(): got exception: com.motorola.blur.service.blur.BlurBadSignatureException: com.motorola.blur.chunking.io.ChunkedInputStream$BadSignatureException: The message signature in chunk with offset=60 does not match the calculated signature
06-30 08:37:02.950: ERROR/WSBase(220):     at com.motorola.blur.service.blur.ws.WSBase.doRequest(WSBase.java:1285)
06-30 08:37:02.950: ERROR/WSBase(220):     at com.motorola.blur.service.blur.ws.WSBase$WSTransaction.run(WSBase.java:439)
06-30 08:37:02.950: ERROR/WSBase(220):     at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1081)
06-30 08:37:02.950: ERROR/WSBase(220):     at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:574)
06-30 08:37:02.950: ERROR/WSBase(220):     at java.lang.Thread.run(Thread.java:1020)
06-30 08:37:02.950: ERROR/WSBase(220):     at com.motorola.blur.util.concurrent.BlurThreadFactory$BlurPooledThread.run(BlurThreadFactory.java:58)
06-30 08:37:03.310: ERROR/WSBase(220): doRequest(): got exception: com.motorola.blur.service.blur.BlurBadSignatureException: com.motorola.blur.chunking.io.ChunkedInputStream$BadSignatureException: The message signature in chunk with offset=60 does not match the calculated signature
06-30 08:37:03.310: ERROR/WSBase(220):     at com.motorola.blur.service.blur.ws.WSBase.doRequest(WSBase.java:1285)
06-30 08:37:03.310: ERROR/WSBase(220):     at com.motorola.blur.service.blur.ws.WSBase$WSTransaction.run(WSBase.java:439)
06-30 08:37:03.310: ERROR/WSBase(220):     at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1081)
06-30 08:37:03.310: ERROR/WSBase(220):     at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:574)
06-30 08:37:03.310: ERROR/WSBase(220):     at java.lang.Thread.run(Thread.java:1020)
06-30 08:37:03.310: ERROR/WSBase(220):     at com.motorola.blur.util.concurrent.BlurThreadFactory$BlurPooledThread.run(BlurThreadFactory.java:58)
06-30 08:40:50.990: ERROR/GTalkService(257): ??? addConnectionClosedEvent: mConnectionUptime=0
06-30 08:41:35.640: ERROR/vending(407): [29] SelfUpdateCheckReceiver.getMarketMetadataBlocking(): Error trying to GetMarketMetadata on login
06-30 08:42:02.990: ERROR/WSBase(220): doRequest(): got exception: com.motorola.blur.service.blur.BlurBadSignatureException: com.motorola.blur.chunking.io.ChunkedInputStream$BadSignatureException: The message signature in chunk with offset=60 does not match the calculated signature
06-30 08:42:02.990: ERROR/WSBase(220):     at com.motorola.blur.service.blur.ws.WSBase.doRequest(WSBase.java:1285)
06-30 08:42:02.990: ERROR/WSBase(220):     at com.motorola.blur.service.blur.ws.WSBase$WSTransaction.run(WSBase.java:439)
06-30 08:42:02.990: ERROR/WSBase(220):     at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1081)
06-30 08:42:02.990: ERROR/WSBase(220):     at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:574)
06-30 08:42:02.990: ERROR/WSBase(220):     at java.lang.Thread.run(Thread.java:1020)
06-30 08:42:02.990: ERROR/WSBase(220):     at com.motorola.blur.util.concurrent.BlurThreadFactory$BlurPooledThread.run(BlurThreadFactory.java:58)
06-30 08:42:03.330: ERROR/WSBase(220): doRequest(): got exception: com.motorola.blur.service.blur.BlurBadSignatureException: com.motorola.blur.chunking.io.ChunkedInputStream$BadSignatureException: The message signature in chunk with offset=60 does not match the calculated signature
06-30 08:42:03.330: ERROR/WSBase(220):     at com.motorola.blur.service.blur.ws.WSBase.doRequest(WSBase.java:1285)
06-30 08:42:03.330: ERROR/WSBase(220):     at com.motorola.blur.service.blur.ws.WSBase$WSTransaction.run(WSBase.java:439)
06-30 08:42:03.330: ERROR/WSBase(220):     at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1081)
06-30 08:42:03.330: ERROR/WSBase(220):     at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:574)
06-30 08:42:03.330: ERROR/WSBase(220):     at java.lang.Thread.run(Thread.java:1020)
06-30 08:42:03.330: ERROR/WSBase(220):     at com.motorola.blur.util.concurrent.BlurThreadFactory$BlurPooledThread.run(BlurThreadFactory.java:58)
06-30 08:42:03.770: ERROR/WSBase(220): doRequest(): got exception: com.motorola.blur.service.blur.BlurBadSignatureException: com.motorola.blur.chunking.io.ChunkedInputStream$BadSignatureException: The message signature in chunk with offset=60 does not match the calculated signature
06-30 08:42:03.770: ERROR/WSBase(220):     at com.motorola.blur.service.blur.ws.WSBase.doRequest(WSBase.java:1285)
06-30 08:42:03.770: ERROR/WSBase(220):     at com.motorola.blur.service.blur.ws.WSBase$WSTransaction.run(WSBase.java:439)
06-30 08:42:03.770: ERROR/WSBase(220):     at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1081)
06-30 08:42:03.770: ERROR/WSBase(220):     at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:574)
06-30 08:42:03.770: ERROR/WSBase(220):     at java.lang.Thread.run(Thread.java:1020)
06-30 08:42:03.770: ERROR/WSBase(220):     at com.motorola.blur.util.concurrent.BlurThreadFactory$BlurPooledThread.run(BlurThreadFactory.java:58)
06-30 08:42:04.100: ERROR/WSBase(220): doRequest(): got exception: com.motorola.blur.service.blur.BlurBadSignatureException: com.motorola.blur.chunking.io.ChunkedInputStream$BadSignatureException: The message signature in chunk with offset=60 does not match the calculated signature
06-30 08:42:04.100: ERROR/WSBase(220):     at com.motorola.blur.service.blur.ws.WSBase.doRequest(WSBase.java:1285)
06-30 08:42:04.100: ERROR/WSBase(220):     at com.motorola.blur.service.blur.ws.WSBase$WSTransaction.run(WSBase.java:439)
06-30 08:42:04.100: ERROR/WSBase(220):     at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1081)
06-30 08:42:04.100: ERROR/WSBase(220):     at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:574)
06-30 08:42:04.100: ERROR/WSBase(220):     at java.lang.Thread.run(Thread.java:1020)
06-30 08:42:04.100: ERROR/WSBase(220):     at com.motorola.blur.util.concurrent.BlurThreadFactory$BlurPooledThread.run(BlurThreadFactory.java:58)
06-30 08:42:13.900: ERROR/TelephonyManager(257): Hidden constructor called more than once per process!
06-30 08:42:13.900: ERROR/TelephonyManager(257): Original: com.google.android.location, new: com.google.android.gsf
06-30 08:42:14.110: ERROR/CheckinTask(257): SSL error, attempting time correction: javax.net.ssl.SSLHandshakeException: java.security.cert.CertPathValidatorException: Trust anchor for certification path not found.
06-30 08:42:14.230: ERROR/CheckinTask(257): Checkin failed: https://android.clients.google.com/checkin (request #0)
06-30 08:42:14.230: ERROR/CheckinTask(257): java.io.IOException: Rejected response from server: HTTP/1.1 302 OK
06-30 08:42:14.230: ERROR/CheckinTask(257):     at com.google.android.gsf.checkin.CheckinTask.parseResponse(CheckinTask.java:345)
06-30 08:42:14.230: ERROR/CheckinTask(257):     at com.google.android.gsf.checkin.CheckinTask.maybeSetTime(CheckinTask.java:306)
06-30 08:42:14.230: ERROR/CheckinTask(257):     at com.google.android.gsf.checkin.CheckinTask.sendRequest(CheckinTask.java:289)
06-30 08:42:14.230: ERROR/CheckinTask(257):     at com.google.android.gsf.checkin.CheckinTask.doInBackground(CheckinTask.java:155)
06-30 08:42:14.230: ERROR/CheckinTask(257):     at com.google.android.gsf.checkin.CheckinService$1.doInBackground(CheckinService.java:234)
06-30 08:42:14.230: ERROR/CheckinTask(257):     at com.google.android.gsf.checkin.CheckinService$1.doInBackground(CheckinService.java:224)
06-30 08:42:14.230: ERROR/CheckinTask(257):     at android.os.AsyncTask$2.call(AsyncTask.java:252)
06-30 08:42:14.230: ERROR/CheckinTask(257):     at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:305)
06-30 08:42:14.230: ERROR/CheckinTask(257):     at java.util.concurrent.FutureTask.run(FutureTask.java:137)
06-30 08:42:14.230: ERROR/CheckinTask(257):     at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1081)
06-30 08:42:14.230: ERROR/CheckinTask(257):     at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:574)
06-30 08:42:14.230: ERROR/CheckinTask(257):     at java.lang.Thread.run(Thread.java:1020)
06-30 08:45:24.950: ERROR/GTalkService(257): ??? addConnectionClosedEvent: mConnectionUptime=0

Apologies for the length of the post but I don't have the first clue why this isn't working. Any help will be greatly appreciated.


You have to set the content view... Otherwise how come that layout would be retrieved? And also put the Exception Handling in better way...


You should first register your layout by calling setContentView() method in onCreate(), then call findViewById() method.


 super.onCreate(savedInstanceState);

this.setContentView(R.layout.your_layout)


You are simply not setting content, you need to setContentView(R.layout.your_lauyout) before ImageButton.


As other friends said, you add the method setContentView(R.layout.xxxxx) to your project. One important thing I want to say is, put try-catch block around the suspected methods. This might help you track exceptions(if any).


you are calling tow times setContentView(R.layout.main); this method.

plz remove setContentView(R.layout.main); from bottom.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜