Skip to content
This repository has been archived by the owner on Apr 24, 2018. It is now read-only.

Build problems #29

Closed
mmartikainen opened this issue Mar 7, 2013 · 15 comments
Closed

Build problems #29

mmartikainen opened this issue Mar 7, 2013 · 15 comments

Comments

@mmartikainen
Copy link

The current sources do not build. I see several problems:

  1. The library and sample pom.xml files reference parent version 3.0.1, while the parent version seems to be 3.1.
  2. Compile errors in ShowcaseView.java - missing import and missing return statement.
@amlcurran
Copy link
Owner

Can you give me more details about the compile errors? The imports are very likely to be to with NineOldAndroids (see the readme for instructions), but the missing return statement is a new one!

@mmartikainen
Copy link
Author

I’m building from the command line, do you not see the compile errors if you run ‘mvn clean install’?

From: Alex Curran [mailto:notifications@github.com]
Sent: Monday, March 11, 2013 4:46 PM
To: Espiandev/ShowcaseView
Cc: Magnus Martikainen
Subject: Re: [ShowcaseView] Build problems (#29)

Can you give me more details about the compile errors? The imports are very likely to be to with NineOldAndroids (see the readme for instructions), but the missing return statement is a new one!


Reply to this email directly or view it on GitHubhttps://github.com//issues/29#issuecomment-14750439.


This e-mail and any attachments are confidential. If it is not intended for you, please notify the sender, and please erase and ignore the contents.

@amlcurran
Copy link
Owner

I don't actually use Maven for this project because I have had nothing but issues with it. However, I just managed to compile it fine by changing all the POM versions to 3.1.

@mmartikainen
Copy link
Author

I downloaded the master sources from gitub and changed the POM's to 3.1 then ran 'mvn install', I first get this compile error:

[ERROR] /Users/mmartikainen/Downloads/ShowcaseView-master/library/src/com/github/espiandev/showcaseview/ShowcaseView.java:[470,2] cannot find symbol
[ERROR] symbol : class Handler

If I fix this by adding the missing import (android.os.Handler) and run again, I get:

[ERROR] /Users/mmartikainen/Downloads/ShowcaseView-master/library/src/com/github/espiandev/showcaseview/ShowcaseView.java:[479,1] missing return statement

From: Alex Curran <notifications@github.commailto:notifications@github.com>
Reply-To: Espiandev/ShowcaseView <reply@reply.github.commailto:reply@reply.github.com>
Date: Monday, March 11, 2013 5:39 PM
To: Espiandev/ShowcaseView <ShowcaseView@noreply.github.commailto:ShowcaseView@noreply.github.com>
Cc: Magnus Martikainen <mmartikainen@shoretel.commailto:mmartikainen@shoretel.com>
Subject: Re: [ShowcaseView] Build problems (#29)

I don't actually use Maven for this project because I have had nothing but issues with it. However, I just managed to compile it fine by changing all the POM versions to 3.1.


Reply to this email directly or view it on GitHubhttps://github.com//issues/29#issuecomment-14752200.


This e-mail and any attachments are confidential. If it is not intended for you, please notify the sender, and please erase and ignore the contents.

@amlcurran
Copy link
Owner

OK, these errors should be corrected in the latest dev commit, although I haven't tested it fully yet

@kennyeni
Copy link

I second this issue, but I don't think is a Maven problem, I corrected that Handler build error just like you, and corrected the error you get by returning "as" (AnimatorSet instance) in the animateGesture function (line 447), this provides basic functionality but I get a lot of errors when calling the pointTo method and other animated functions.

FYI:

public AnimatorSet animateGesture(float offsetStartX, float offsetStartY, float offsetEndX, float offsetEndY) {
        mHandy = ((LayoutInflater) getContext().getSystemService(Context.LAYOUT_INFLATER_SERVICE)).inflate(R.layout.handy, null);
        addView(mHandy);
        ViewHelper.setAlpha(mHandy, 0f);

        ObjectAnimator alphaIn = ObjectAnimator.ofFloat(mHandy, "alpha", 0f, 1f).setDuration(500);

        ObjectAnimator setUpX = ObjectAnimator.ofFloat(mHandy, "x", showcaseX + offsetStartX).setDuration(0);
        ObjectAnimator setUpY = ObjectAnimator.ofFloat(mHandy, "y", showcaseY + offsetStartY).setDuration(0);

        ObjectAnimator moveX = ObjectAnimator.ofFloat(mHandy, "x", showcaseX + offsetEndX).setDuration(1000);
        ObjectAnimator moveY = ObjectAnimator.ofFloat(mHandy, "y", showcaseY + offsetEndY).setDuration(1000);
        moveX.setStartDelay(1000);
        moveY.setStartDelay(1000);

        ObjectAnimator alphaOut = ObjectAnimator.ofFloat(mHandy, "alpha", 0f).setDuration(500);
        alphaOut.setStartDelay(2500);

        AnimatorSet as = new AnimatorSet();
        as.play(setUpX).with(setUpY).before(alphaIn).before(moveX).with(moveY).before(alphaOut);
        as.start();

        Handler handler = new Handler();
        Runnable runnable = new Runnable() {
            @Override
            public void run() {
                removeView(mHandy);
            }
        };
        handler.postDelayed(runnable, 3000);
        return as;
    }

@amlcurran
Copy link
Owner

OK, I'll revert the change that altered this function, because, at least for me, it worked fine beforehand. Then, we'll see if that works!

@grandvortex-zz
Copy link

Hello,

Just wanted to say that I too am experiencing the same issues. There are a few things missing in the animateGesture method. I was wondering if you will be able to fix these issues sometime soon. Otherwise the library does not compile and can not be used.

Thank you

@Blucreation
Copy link

Im getting same errors on build, complaining about R.id.home, handler, Build.VERSION_CODES.GINGERBREAD, Build.VERSION_CODES.HONEYCOMB, getY, getX etc

@Blucreation
Copy link

I managed to fix it by changing target api lvl to 11 then added a load of suppressions

@amlcurran
Copy link
Owner

@Blucreation yeah, target SDK needs to be high, I just use the latest. Make sure that your IDE hasn't automatically added imports to the android.app.animation classes instead of the NineOldAndroids versions, that seems to be happening quite a lot.

As for anyone having issues with the library compiling, the dev branch has all this issues fixed and should be bug-free

@mrtristan
Copy link

i'm with the other guys with the two issues,

  1. missing import for handler
  2. missing return of type AnimatorSet.

i'm about to try the dev branch to see whats going on in there. is it stable and prod ready? anything worth playing with in there?

@amlcurran
Copy link
Owner

Dev branch should be stable. The only main difference is a few bug fixes

@kennyeni
Copy link

I can tell the branches are good, if not you can see my last post, if ater that (it compiles but gives some errors) you are not calling it properly.

@blundell
Copy link
Contributor

I've pulled master and ran mvn clean install, it is all compiling and working now

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants