Search Results

Search found 2 results on 1 pages for 'opike'.

Page 1/1 | 1 

  • Getting message in android app: Binary XML file line #2: You must supply a layout_width attribute.

    - by opike
    I'm trying to use a ListView inside of a RelativeLayout but when I run my app I get a runtimeexception with the message: Binary XML file line #2: You must supply a layout_width attribute. I tried putting layout_width attributes in every conceivable place in the xml resource files but so far no luck. I attempt to populate the listview with this line of code: setListAdapter(new ArrayAdapter(this, R.layout.tablerow3, R.id.label, items)); Here's the tablerow3.xml contents: <?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"> android:layout_width="20dp" android:layout_height="5dp" android:id="@+id/tablerow01"> <Label android:id="@+id/label01" android:layout_width="5dp" android:layout_height="5dp" android:textColor="@color/solid_white" android:singleLine="true"/> <Label android:id="@+id/label02" android:layout_width="5dp" android:layout_height="5dp" android:textColor="@color/solid_white" android:singleLine="true"/> </LinearLayout> Here's the xml that contains the RelativeLayout(forex2.xml): <?xml version="1.0" encoding="utf-8"?> <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="fill_parent" android:layout_height="fill_parent"> <Button android:text="Static Button" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_alignParentLeft="true" android:layout_alignParentTop="true" android:id="@+id/button_id"> </Button> <Spinner android:id="@+id/spinner1" android:layout_width="match_parent" android:layout_toRightOf="@id/button_id" android:layout_alignParentTop="true" android:layout_height="wrap_content" android:drawSelectorOnTop="true" /> <ListView android:id="@android:id/list" android:layout_width="5dp" android:layout_height="5dp" android:layout_alignParentBottom="true" /> <!-- android:layout_width="wrap_content" android:layout_height="wrap_content" --> </RelativeLayout>

    Read the article

  • NoClassDefFoundError when trying to reference external jar files

    - by opike
    I have some 3rd party jar files that I want to reference in my tomcat web application. I added this line to catalina.properties: shared.loader=/home/ollie/dev/java/googleapi_samples/gdata/java/lib/*.jar but I'm still getting this error: org.apache.jasper.JasperException: javax.servlet.ServletException: java.lang.NoClassDefFoundError: com/google/gdata/util/ServiceException org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:491) org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:401) org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:313) org.apache.jasper.servlet.JspServlet.service(JspServlet.java:260) javax.servlet.http.HttpServlet.service(HttpServlet.java:717) I verified that the com.google.gdata.util.ServiceException is in the gdata-core-1.0.jar file which is in the directory: /home/ollie/dev/java/googleapi_samples/gdata/java/lib I did bounce tomcat after I modified catalina.properties. Update 1: I tried copying the gdata-core-1.0.jar file into /var/lib/tomcat6/webapp/examples/WEB-INF/lib as a test but that didn't fix the problem either. Update 2: It actually does work when I copy the jar file directly into the WEB-INF/lib directory. There was a permissions issue that I had to resolve. But it's still not working when I use the shared.loader setting. I reconfirmed that the path is correct.

    Read the article

1