开发者

Binary XML File causing FC?

开发者 https://www.devze.com 2023-03-15 19:19 出处:网络
I am simply trying to launch an activity from a button but when I do I am getting the following error in LogCat:

I am simply trying to launch an activity from a button but when I do I am getting the following error in LogCat:

06-24 23:12:08.823: ERROR/AndroidRuntime(690): Caused by: java.lang.RuntimeException: Binary XML file line #193: You must supply a layout_width attribute.

not sure if this helps any but here is the code for the button:

public void onClick(View src) {

    switch(src.getId()){

    case R.id.button18Holes:
        //*********************************//
        //***LAUNCHES ACTUAL APPLICATION***//
        //*********************************//

        Intent myIntent = new Intent(src.getContext(), EasyPar.class);
        startActivity开发者_如何学运维ForResult(myIntent, 0);

        break;
    }

Not exactly sure what Binary XML File is???


The error is in one of your xml layout files, and probably the one for your EasyPar Activity. Your exception says:

You must supply a layout_width attribute

Check your layouts to see where you have forgotten to specify a width.


Have you forgotten to set the layout with in your xml file in the layout folder?

0

精彩评论

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