how to setup android development envrioment?

by hunter » Tue, 04 Nov 2008 02:45:22 GMT


Sponsored Links
 Hi, all:
     I download android source code from git, and try to build on my
linux machine, and met errors:
build/core/main.mk:28:
********************************************************************************
build/core/main.mk:29: *  You are using version 3.79.1 of make.
build/core/main.mk:30: *  You must upgrade to version 3.81 or greater.
build/core/main.mk:31: *  see
file://...../android-dev/android-src/myandroid/docs/development-environment/machine-setup.html
build/core/main.mk:32:
********************************************************************************
build/core/main.mk:33: *** stopping.  Stop.

But I can NOT find the document from the directory, even the docs
directory is missed from android source codes.

Where can I find thoese documents?

Thanks.
--~--~---------~--~----~------------~-------~--~----~



how to setup android development envrioment?

by Mark Murphy » Tue, 04 Nov 2008 12:49:11 GMT


 


This is not the mailing list for Android source code support:

 http://source.android.com/discuss 

Choose one of the "Open source mailing lists" shown on that page, 
whichever one best fits your situation.

-- 
Mark Murphy (a Commons Guy)
 http://commonsware.com 

Android Training on the Ranch! -- Mar 16-20, 2009
 http://www.bignerdranch.com/schedule.shtml 

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


Sponsored Links


Other Threads

1. About load '.so' library file with JNI

I compile the c file as library with arm-none-linux-gnueabi-gcc,
then put the so file in emulator's directory :"/system/lib",
while execute System.loadLibrary, there is a dialog said :"Library not
found".

I can run the same program in windows correctly.
And I didn't call any libc function.
How to load library correct?
--~--~---------~--~----~------------~-------~--~----~

2. What adapter to use with a Spinner and a ListView in the same layout?

I am trying to build a layout with some spinners and a list below the
spinners. The layouts and the code work fine when I get the spinner values
from an array resource. When I try to populate the spinners from an array, I
get an exception, see below. Is it possible to have spinner and a list view
in the same layout? Which adapter do I need for the spinners?

Thanks

Fred

Uncaught handler: thread Main exiting due to uncaught exception
java.lang.ClassCastException: Landroid/widget/Spinner;
    at
android.widget.ArrayAdapter.createViewFromResource(ArrayAdapter.java:240)
    at android.widget.ArrayAdapter.getView(ArrayAdapter.java:221)
    at android.widget.ArrayAdapter.getMeasurementView(ArrayAdapter.java:217)
    at android.widget.AbsSpinner.onMeasure(AbsSpinner.java:230)
    at android.view.View.measure(View.java:5937)
    at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:2250)
    at
android.widget.LinearLayout.measureChildBeforeLayout(LinearLayout.java:742)
    at android.widget.LinearLayout.measureVertical(LinearLayout.java:289)
    at android.widget.LinearLayout.onMeasure(LinearLayout.java:231)
    at android.view.View.measure(View.java:5937)
    at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:2250)
    at
android.widget.LinearLayout.measureChildBeforeLayout(LinearLayout.java:742)
    at android.widget.LinearLayout.measureVertical(LinearLayout.java:289)
    at android.widget.LinearLayout.onMeasure(LinearLayout.java:231)
    at android.view.View.measure(View.java:5937)
    at android.view.ViewGroup.measureChild(ViewGroup.java:2218)
    at android.widget.FrameLayout.onMeasure(FrameLayout.java:146)
    at android.view.View.measure(View.java:5937)
    at android.widget.LinearLayout.measureVertical(LinearLayout.java:385)
    at android.widget.LinearLayout.onMeasure(LinearLayout.java:231)
    at android.view.View.measure(View.java:5937)
    at android.view.ViewGroup.measureChild(ViewGroup.java:2218)
    at android.widget.FrameLayout.onMeasure(FrameLayout.java:146)
    at android.policy.PhoneWindow$DecorView.onMeasure(PhoneWindow.java:1202)
    at android.view.View.measure(View.java:5937)
    at android.view.ViewRoot.performTraversals(ViewRoot.java:341)
    at android.view.ViewRoot.handleMessage(ViewRoot.java:584)
    at android.os.Handler.dispatchMessage(Handler.java:80)
    at android.os.Looper.loop(Looper.java:91)
    at android.app.ActivityThread.main(ActivityThread.java:3052)
    at java.lang.reflect.Method.invokeNative(Native Method)
    at java.lang.reflect.Method.invoke(Method.java:356)
    at android.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1547)
    at android.os.ZygoteInit.main(ZygoteInit.java:1445)
    at android.dalvik.NativeStart.main(Native Method)

Layout:


<?xml version="1.0" encoding="utf-8"?>
<!--  layout_width="fill_parent" is needed down to the row TextView to get
the rows to use the whole width when selected, even if the text does not
fill up the whole line -->

<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="fill_parent"
    android:layout_height="fill_parent"
    android:orientation="vertical">

<LinearLayout android:id="@+id/TopLinearLayout"
    android:layout_width="fill_parent"
    android:layout_height="wrap_content">

    <TextView android:id="@+id/tagslabel"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_weight="1"
        android:text="Tags to look for"
        android:textSize="20sp"/>
    <Button android:id="@+id/reset"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:text="Reset all tags"
        android:textSize="20sp"/>

</LinearLayout>

<LinearLayout android:id="@+id/TagsLinearLayout"
        android:layout_width="fill_parent"
        android:layout_height="wrap_content"
        android:orientation="vertical">

    <Spinner android:id="@+id/tag1"
        android:layout_width="fill_parent"
        android:layout_height="wrap_content"/>

    <Spinner android:id="@+id/tag2"
        android:layout_width="fill_parent"
        android:layout_height="wrap_content"/>

    <Spinner android:id="@+id/tag3"
        android:layout_width="fill_parent"
        android:layout_height="wrap_content"/>

    <Spinner android:id="@+id/tag4"
        android:layout_width="fill_parent"
        android:layout_height="wrap_content"/>

</LinearLayout>

<LinearLayout android:id="@+id/ListLinearLayout"
    android:layout_width="fill_parent"
    android:layout_height="wrap_content">

    <ListView android:id="@+id/android:list"
          android:layout_width="fill_parent"
            android:layout_height="wrap_content"/>

      <TextView android:id="@+id/android:empty"
          android:layout_width="fill_parent"
            android:layout_height="wrap_content"
            android:text="No Notes!"/>

</LinearLayout>

</LinearLayout>


The java code for the spinners:

   private void createSpinners()
    {
        Log.i("createSpinners","entry");
        int[] spinnerIds = {R.id.tag1, R.id.tag2, R.id.tag3, R.id.tag4};
        this.spinners = new Spinner[spinnerIds.length];
        int i = 0;
        for (int spinnerId : spinnerIds)
            {
            Spinner spinner =  (Spinner) findViewById(spinnerId);
            populateSpinner(spinner, spinnerId);
            spinner.setOnItemSelectedListener(this);
            spinners[i] = spinner;
            Log.i("createSpinners","exit");
            }
        Log.i("createSpinners","exit");
    }

    private void populateSpinner(Spinner spinner, int spinnerId) {
        Log.i("Notepadv3", "populateSpinner fetchAllTags");
        // Get all of the rows from the database and create the item list
        String[] tags = mDbHelper.fetchAllTags();
         Log.i("Notepadv3", "populateSpinner fetchAllTags done");
/*
        // That code works
        ArrayAdapter<CharSequence> adapter =
ArrayAdapter.createFromResource(
                this, R.array.tags, android.R.layout.simple_spinner_item);

adapter.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);
        spinner.setAdapter(adapter);
*/
        // Switching to that code, will produce an exception
         ArrayAdapter<String> adapter = new ArrayAdapter<String>(this,
R.layout.notes_list, spinnerId, tags);

adapter.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);
        spinner.setAdapter(adapter);
    }

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

3. Custom driver development

4. borders?

5. deleting a phone number or email address

6. Where has everybody gone???

7. A question about OpenGL SurfaceView in DEMO