Android &引用;“未找到来源”;Eclipse中的错误

Android &引用;“未找到来源”;Eclipse中的错误,android,eclipse,Android,Eclipse,为android开发我的第一个应用程序。在emulator上工作正常,但在手机上我得到一个“未找到源代码错误”ViewRoot.handleMessage(消息)行:1757。当我按下应用程序上的4号按钮并试图在手机上显示我的媒体图像时,出现了错误 代码: XML 在Eclipse中启用LogCat 窗口>显示视图>其他>安卓> LogCat 然后您可以找到异常的真实描述 package com.example.famiily_connect_v1; import android.app.Ac

为android开发我的第一个应用程序。在emulator上工作正常,但在手机上我得到一个
“未找到源代码错误”ViewRoot.handleMessage(消息)行:1757
。当我按下应用程序上的4号按钮并试图在手机上显示我的媒体图像时,出现了错误

代码:

XML


在Eclipse中启用LogCat

窗口>显示视图>其他>安卓> LogCat

然后您可以找到异常的真实描述

package com.example.famiily_connect_v1;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.Button;
import android.widget.EditText;
import android.widget.TextView;

public class family_connect extends Activity implements OnClickListener {
    /** Called when the activity is first created. */

    Button incrementButton, decrementButton, makecallButton,
            media_cameraButton;
    TextView numberdisplayTextView;
    EditText inputEditText;
    int A = 0;

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

        incrementButton = (Button) findViewById(R.id.Button01);
        decrementButton = (Button) findViewById(R.id.Button02);
        makecallButton = (Button) findViewById(R.id.Button03);
        media_cameraButton = (Button) findViewById(R.id.Button04);
        numberdisplayTextView = (TextView) findViewById(R.id.TextView01);
        inputEditText = (EditText) findViewById(R.id.EditText01);

        incrementButton.setOnClickListener(this);
        decrementButton.setOnClickListener(this);
        makecallButton.setOnClickListener(this);
        media_cameraButton.setOnClickListener(this);
        numberdisplayTextView.setOnClickListener(this);
        inputEditText.setOnClickListener(this);

    }

    @Override
    public void onClick(View arg0) {
        switch (arg0.getId()) {
        case R.id.Button01:
            A++;
            numberdisplayTextView.setText(String.valueOf(A));
            break;
        case R.id.Button02:
            A--;
            numberdisplayTextView.setText(String.valueOf(A));
            break;
        case R.id.Button03:

            break;
        case R.id.Button04:
            Intent myIntent = new Intent();
            myIntent.setAction(Intent.ACTION_VIEW); 
         myIntent.setData(android.provider.MediaStore.Images.Media.INTERNAL_CONTENT_URI);
            startActivity(myIntent);
            break;
        default:
            break;
        }

    }
}
<?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" android:background="#00AAAA">
    <TextView android:layout_width="fill_parent"
        android:layout_height="wrap_content" android:text="@string/hello" />
    <LinearLayout android:id="@+id/LinearLayout01"
        android:layout_width="wrap_content" android:layout_height="wrap_content"></LinearLayout>
    <Button android:id="@+id/Button01" android:layout_width="wrap_content"
        android:layout_height="wrap_content" android:text="increment"></Button>
    <Button android:id="@+id/Button02" android:layout_width="wrap_content"
        android:layout_height="wrap_content" android:text="decrement"></Button>
    <Button android:id="@+id/Button03" android:layout_width="wrap_content"
        android:layout_height="wrap_content" android:text="make call"></Button>
    <Button android:id="@+id/Button04" android:layout_width="wrap_content"
        android:layout_height="wrap_content" android:text="media_camera"></Button>
    <TextView android:id="@+id/TextView01" android:layout_width="wrap_content"
        android:layout_height="wrap_content" android:textSize="24sp"
        android:text="0" android:textStyle="bold" android:textColor="#000000"></TextView>
    <EditText android:id="@+id/EditText01" android:layout_width="wrap_content"
        android:layout_height="wrap_content" android:text="enter new button text"></EditText>
    <RadioButton android:id="@+id/RadioButton01"
        android:layout_width="wrap_content" android:layout_height="wrap_content"
        android:text="camera"></RadioButton>
</LinearLayout>