Library Projects support ?

by MobDev » Fri, 01 Oct 2010 15:28:27 GMT


Sponsored Links
 Hi,
I have been trying to work with a Library Project, just like it's
mentioned in the documentation :
 http://developer.android.com/guide/developing/eclipse-adt.html 

I have created my Library Project as a Android 1.6 Project and now I
have been trying to reference to it out of my second project (also an
Android 1.6 project) and I am getting the following error :
"Target 'Android 1.6' does not support building project with
libraries."

The documentation states that supported platfroms are the 1.5 onwards
(with exception for the 2.0 & 2.0.1) and that the second project
should have the same platform or higher (in my case the same)...

So any idea what's ahppening here ? And most importantly : any idea
how to solve this ?
Thx in advance !

--



Library Projects support ?

by Xavier Ducrohet » Sun, 03 Oct 2010 01:58:10 GMT


 The link you referenced shows which version of the 1.6 SDK component
supports library projects
( http://developer.android.com/guide/developing/eclipse-adt.html #libraryReqts).

I'm guessing you have an older version. rev 3 (for 1.6) is needed. Use
the SDK updater to get an update to the 1.6 SDK component. (see
 http://developer.android.com/sdk/adding-components.html for more info )

Xav



>


Sponsored Links


Library Projects support ?

by MobDev » Mon, 04 Oct 2010 21:53:56 GMT


 Actually, as I mentioned in my post, it's already a 1.6 project... I
can only make a 1.6 project if I have the SDK that supports it rigth ?
Actually my SDK has been updated up to 2.2
Anyhow, after changing the Project Library (and the project using the
library) to a 2.2 project it started working out of the blue...





> >



Library Projects support ?

by Xavier Ducrohet » Tue, 05 Oct 2010 05:22:00 GMT


 Yes you can only make a 1.6 project if you have the SDK component for
API 4 (==1.6). However we do update those components sometimes and we
did update them to add support for library projects. Looks like you
have an older version of the 1.6 component (2.2 was released at the
same time as the feature so it supports it in rev1).

Follow the link I've given you to update your 1.6 SDK component.





>> >



Other Threads

1. How to implement a JUnit to test StatusBar and notification?

Hi, everyone,
I want to implement a test case that I can drop down status bar and
check which notifications it shows.
Can I do this by JUnit? Because StatusBarService is not a activity,
I don't know how can I focus statusbar and how can I get what
notifications there are?
I checked default android source codes, it has statusbar test in the
framework but it doesn't use JUnit to test.
Is this because JUnit can't test service?

Please help me. Thanks for your help.

Allen

-- 

2. Problem with OnClick Interfering with OnTouch

ok so i have an app where the list i have is actually just a
relativelayout instead of a listview so i can do more cool effects
with it using touch events, so i have the layout move based on the
ontouch method and the children have onclicklisteners, well now
whenever i press down on a child and start to drag (in an effort to
move the view) it wont and i assume because the onclick captures all
movement from when the finger first hits the child whereas if i press
off a child (like bare layout) and drag the view moves, so is there a
way to avoid having the onclicklistener steal the ontouch event but
still function? the only way i can think is to manually write my own
code to detect what would be considered a press in the ontouch method
but i feel like that will be too strenuous
heres my ontouch method

  @Override
    public boolean onTouchEvent(MotionEvent ev) {
        final int action = ev.getAction();
        switch (action) {
        case MotionEvent.ACTION_DOWN: {
            final float x = ev.getX();
            final float y = ev.getY();

            // Remember where we started
            mLastTouchX = x;
            mLastTouchY = y;
            break;
        }

        case MotionEvent.ACTION_MOVE: {
            final float x = ev.getX();
            final float y = ev.getY();

            // Calculate the distance moved
            final float dx = x - mLastTouchX;
            final float dy = y - mLastTouchY;

            // Move the object
            mPosX += dx;
            mPosY += dy;

            //move layout
            layoutparams = new LayoutParams(Fill, Wrap);
            layoutparams.setMargins(Scale(70), Scale((int) mPosY), 0,
0);
            CurrentLayout.setLayoutParams(layoutparams);
 
CurrentSubLayout.setLayoutParams(layoutparams);

            // Remember this touch position for the next move event
            mLastTouchX = x;
            mLastTouchY = y;

            break;
        }

        case MotionEvent.ACTION_UP: {

                 final float x = ev.getX();
             final float y = ev.getY();

             // Calculate the distance moved
             final float dx = x - mLastTouchX;
             final float dy = y - mLastTouchY;

             // Move the object
             mPosX += dx;
             mPosY += dy;

             //move layout
             layoutparams = new LayoutParams(Fill, Wrap);
             layoutparams.setMargins(Scale(70), Scale((int) mPosY), 0,
0);
             CurrentLayout.setLayoutParams(layoutparams);
 
CurrentSubLayout.setLayoutParams(layoutparams);

                if (CurrentLayout.getTop() + CurrentLayout.getHeight() <
HomeLayout.getHeight() - Scale(100))
                {
                        if ((HomeLayout.getHeight() - Scale(100)) -
CurrentLayout.getHeight() <= 0)
                        {
                        Animation snap = new TranslateAnimation(0,0, (int) 
(mPosY -
((HomeLayout.getHeight() - Scale(100)) - CurrentLayout.getHeight())),
0);
                        snap.setDuration(300);
                        CurrentLayout.startAnimation(snap);
                        CurrentSubLayout.startAnimation(snap);
                layoutparams = new LayoutParams(Fill, Wrap);
                layoutparams.setMargins(Scale(70),
(HomeLayout.getHeight() - Scale(100)) - CurrentLayout.getHeight(),
0,0);
                CurrentLayout.setLayoutParams(layoutparams);
                CurrentSubLayout.setLayoutParams(layoutparams);
                mPosX = 0;
                mPosY = (HomeLayout.getHeight() - Scale(100)) -
CurrentLayout.getHeight();
                        }
                        else if ((HomeLayout.getHeight() - Scale(100)) -
CurrentLayout.getHeight() > 0)
                        {
                                Animation snap = new
TranslateAnimation(0,0,CurrentLayout.getTop(),0);
                        snap.setDuration(300);
                        CurrentLayout.startAnimation(snap);
                        CurrentSubLayout.startAnimation(snap);
                    layoutparams = new LayoutParams(Fill, Wrap);
                    layoutparams.setMargins(Scale(70), 0, 0, 0);
                    CurrentLayout.setLayoutParams(layoutparams);
                    CurrentSubLayout.setLayoutParams(layoutparams);
                    mPosX = 0;
                    mPosY = 0;
                        }
               // Toast.makeText(this, "boom",
Toast.LENGTH_SHORT).show();
                }
                else if (CurrentLayout.getTop()  > 0)
                {
                        Animation snap = new
TranslateAnimation(0,0,CurrentLayout.getTop(),0);
                        snap.setDuration(300);
                        CurrentLayout.startAnimation(snap);
                        CurrentSubLayout.startAnimation(snap);
                layoutparams = new LayoutParams(Fill, Wrap);
                layoutparams.setMargins(Scale(70), 0, 0, 0);
                CurrentLayout.setLayoutParams(layoutparams);
                CurrentSubLayout.setLayoutParams(layoutparams);
                mPosX = 0;
                mPosY = 0;
               // Toast.makeText(this, "boom",
Toast.LENGTH_SHORT).show();
                }


            break;
        }

        }

        return true;
    }

-- 

3. Neither Map Activity noe Google Maps showing the maps

4. Publishing app . what should be done

5. Signed app.how to get LVL in source

6. reduce system image size

7. New Android Market client - which phones?