按钮没有做任何事情

-6 java xml android button

Android Studio中没有错误消息.点击它时,"选择图像按钮"不响应.

我看过类似的问题,但没有一个是针对我的问题,并没有帮助

xml文件:

 <de.hdodenhof.circleimageview.CircleImageView
        android:layout_width="85dp"
        android:layout_height="85dp"
        android:src="@drawable/noprofileimg"
        android:id="@+id/profilepic"
        android:layout_marginBottom="37dp"
        android:layout_alignBottom="@+id/imageView"
        android:layout_centerHorizontal="true" />
<Button
    android:id="@+id/pick_image_button"
    android:layout_width="80dp"
    android:layout_height="23dp"
    android:text="Pick Image"
    android:textSize="12dp"
    android:padding="0dp"
    android:background="@color/Gray"
    android:layout_marginBottom="13dp"
    android:layout_above="@+id/linearLayout"
    android:layout_centerHorizontal="true"
    android:onClick="onClick"
    />
Run Code Online (Sandbox Code Playgroud)

活动文件,

  public class uploadprofileimg extends ActionBarActivity{


private static final int PICK_IMAGE = 100;
private ImageView imageView;

@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_profile);

    imageView = (ImageView) findViewById(R.id.profilepic);

    Button pickImageButton = (Button) findViewById(R.id.pick_image_button);
    pickImageButton.setOnClickListener(new View.OnClickListener() {
        @Override
        public void onClick(View v) {
            openGallery();
        }
    });
}

private void openGallery() {
    Intent gallery =
            new Intent(Intent.ACTION_PICK,
                    android.provider.MediaStore.Images.Media.INTERNAL_CONTENT_URI);
    startActivityForResult(gallery, PICK_IMAGE);
}

@Override
protected void onActivityResult(int requestCode, int resultCode, Intent data) {
    super.onActivityResult(requestCode, resultCode, data);
    if (resultCode == RESULT_OK && requestCode == PICK_IMAGE) {
        Uri imageUri = data.getData();
        imageView.setImageURI(imageUri);
    }
}
Run Code Online (Sandbox Code Playgroud)

}

这是我的logcat:

07-25 11:51:36.776 28107-28107/com.liamthedeveloper.foodiez E/BoostFramework: BoostFramework() : Exception_1 = java.lang.ClassNotFoundException: Didn't find class "com.qualcomm.qti.Performance" on path: DexPathList[[],nativeLibraryDirectories=[/system/lib64, /vendor/lib64]] 07-25 11:51:36.776 28107-28107/com.liamthedeveloper.foodiez V/BoostFramework: BoostFramework() : mPerf = null 07-25 11:51:37.080 28107-28107/com.liamthedeveloper.foodiez D/ViewRootImpl@435aa35[ProfileActivity]: ViewPostImeInputStage processPointer
Run Code Online (Sandbox Code Playgroud)

Vis*_*nav 5

android:onClick="onClick"从xml中的Button标签中删除.