builde sample code have a error

by yui » Fri, 22 May 2009 01:56:54 GMT


Sponsored Links
 Dear all
If i clean the project and select build progect, will have some worng.
and can't generate .APK file
message as follows

[2009-05-21 11:39:31 - HelloListView] no classfiles specified
[2009-05-21 11:39:31 - HelloListView] Conversion to Dalvik format
failed with error 1

--~--~---------~--~----~------------~-------~--~----~



Other Threads

1. Can't run application in emulator from eclipse

Eclipse 3.5
Android SDK 1.6
Windows XP

When attempting to run a simple HelloAndroid application, the emulator
starts up and then my application will fail to run and gives the
following message:

emulator-5554 disconnected! Cancelling
'com.alanlight.hello.HelloAndroid activity launch'!


I've also tried to start the emulator first, but curiously it doesn't
show up under "choose a running Android device'.

I've scoured the forums, and others seem to have the same problem, but
I've yet to see a solution.


--~--~---------~--~----~------------~-------~--~----~

2. LinearLayout consumes extra space inside TableLayout

I'm working on the UI for my first application. I have a TableLayout
with a grid of buttons. There are three buttons in each row. Each
button should take up 1/3 of the horizontal space.

In the last cell of this table, I want two buttons, each taking up
half of the cell's horizontal space (so 1/6 of the screen width in
size). I thought that the way to do this was to put a LinearLayout
into the TableRow, and the two buttons into that. What happens, is
that the cell grows a little bit in size, even though there is plenty
of space to accommodate the two buttons. So the first two buttons are
not 1/3 of the screen width each.

The following XML is a simple case to show the problem. I have three
tables, the first shows the size of the buttons for a regular row with
only three buttons. The second shows what happens when I put one
button into the LinearLayout. This looks good, and is just what I
expect.

The third table shows what happens when I put the second button into
the LinearLayout. Suddenly, the first two buttons are smaller, even
though I see no reason for the LinearLayout to require extra space. By
setting the two buttons inside the LinearLayout to wrap_content, you
can clearly see that there is still extra space to the right of the
fourth button in this table.

I have played with a number of XML attributes in the LinearLayout to
try and get not to expand, but I have had no success.

If anyone knows what I am doing wrong here I would be grateful for
their wisdom.

Thank you for your time.

<?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">
<!-- First table, to show relative button sizes -->
  <TableLayout android:layout_width="fill_parent"
android:layout_height="wrap_content" android:stretchColumns="0,1,2" >
      <TableRow>
          <Button android:id="@+id/button_1" android:text="1"
android:textSize="10.5pt" />
          <Button android:id="@+id/button_2" android:text="2"
android:textSize="10.5pt"  />
          <Button android:id="@+id/button_3" android:text="3"
android:textSize="10.5pt"  />
      </TableRow>
  </TableLayout>
<!-- Second table, one button in the LinearLayout, button sizes ok -->
  <TableLayout android:layout_width="fill_parent"
android:layout_height="wrap_content" android:stretchColumns="0,1,2" >
      <TableRow>
          <Button android:id="@+id/button_4" android:text="4"
android:textSize="10.5pt" />
          <Button android:id="@+id/button_5" android:text="5"
android:textSize="10.5pt"  />
          <LinearLayout android:orientation="horizontal"
android:layout_width="wrap_content" android:padding="0px"
                        android:layout_marginTop="0px"
android:layout_marginBottom="0px" android:layout_marginLeft="0px"
                        android:layout_marginRight="0px" >
              <Button android:id="@+id/button_6" android:text="6"
android:textSize="10.5pt"
                      android:layout_width="wrap_content"
android:layout_height="fill_parent" />
          </LinearLayout>
      </TableRow>
  </TableLayout>
<!-- Third table, same as second, but with a second button in the
LinearLayout. Now buttons 7 and 8 are smaller. Since the
     two buttons in the LinearLayout do not consume all of the screen
space, the other buttons do not need to be made
     smaller -->
  <TableLayout android:layout_width="fill_parent"
android:layout_height="wrap_content" android:stretchColumns="0,1,2" >
      <TableRow>
          <Button android:id="@+id/button_7" android:text="7"
android:textSize="10.5pt" />
          <Button android:id="@+id/button_8" android:text="8"
android:textSize="10.5pt" />
          <LinearLayout android:orientation="horizontal"
android:layout_width="wrap_content" android:padding="0px"
                        android:layout_marginTop="0px"
android:layout_marginBottom="0px" android:layout_marginLeft="0px"
                        android:layout_marginRight="0px" >
              <Button android:id="@+id/button_9" android:text="9"
android:textSize="10.5pt"
                      android:layout_width="wrap_content"
android:layout_height="fill_parent" />
<!-- If this button is commented out, buttons 7 and 8 are the right
size, and button 9 is placed in the correct location. -->
              <Button android:id="@+id/button_a" android:text="A"
android:textSize="10.5pt"
                      android:layout_width="wrap_content"
android:layout_height="fill_parent" />
          </LinearLayout>
      </TableRow>
  </TableLayout>
</LinearLayout>

--~--~---------~--~----~------------~-------~--~----~

3. Applying a path to the transparency of an image

4. Map overlays.

5. How to import an existing project into Eclipse?

6. Maps not showing when used in activity group

7. Device not listed in 'adb devices'.