ozodrukh / CircularReveal

Lollipop ViewAnimationUtils.createCircularReveal for everyone 4.0+
MIT License
2.43k stars 391 forks source link

java.lang.NoClassDefFoundError: io.codetail.animation.RevealAnimator$RevealRadius #32

Closed wingoku closed 9 years ago

wingoku commented 9 years ago

I am getting this exception on pre-lollipop devices. Any ideas why? I have imported the library and upon clicking the class name, it takes me to its source code as well.

java.lang.NoClassDefFoundError: io.codetail.animation.RevealAnimator$RevealRadius at io.codetail.animation.RevealAnimator.<clinit>(RevealAnimator.java:20) at io.codetail.animation.ViewAnimationUtils.createCircularReveal(ViewAnimationUtils.java:62)

ozodrukh commented 9 years ago

Hi, Can you provide some more information Device and Code?

wingoku commented 9 years ago

Nexus 5 Android 5.1.1

                int cx = (v.getLeft() + v.getRight()) / 2;
                int cy = (v.getTop() + v.getBottom()) / 2;

 SupportAnimator anim =
                            io.codetail.animation.ViewAnimationUtils.createCircularReveal(swipifyEnableDisableScreen, cx, cy, 0, maxSize);

                    anim.setDuration(1000);
                    anim.setInterpolator(new AccelerateDecelerateInterpolator());

                    anim.addListener(new SupportAnimator.AnimatorListener() {
                        @Override
                        public void onAnimationStart() {

                        }

                        @Override
                        public void onAnimationEnd() {

                        }

                        @Override
                        public void onAnimationCancel() {

                        }

                        @Override
                        public void onAnimationRepeat() {

                        }
                    });

                    anim.start();
wingoku commented 9 years ago

Any solution?

ozodrukh commented 9 years ago

well still not

wingoku commented 9 years ago

It can't find the static class. Check your code for generating the .aar file. It might be ignoring the static files when creating jar for .aar

scottyab commented 9 years ago

Could it be a jitpack.io issue?

esperia commented 9 years ago

I have also same problem. but, Import directly It worked for me.

1.clone

$ cd /path/to/your-project
$ git clone https://github.com/ozodrukh/CircularReveal

2../settings.gradle

include ':app'
include ':CircularReveal:circualreveal' // Add

3../app/build.gradle

dependencies {
    ...
    compile project(':CircularReveal:circualreveal') // Add
}

4../CircularReveal/circualreveal/build.gradle

apply plugin: 'com.android.library'
//apply plugin: 'android-maven' // Comment out
...
ozodrukh commented 9 years ago

looks like jitpack problem, or my broken hands :disappointed:

wingoku commented 9 years ago

@ozodrukh Can you tell me how can I bundle all the dependencies inside the .aar file. I have no expertise in gradle or groovy. So I can't figure out the exact code that would generate the reference dependencies bundle in .aar file. Currenly I am using following code to generate .aar file which I upload to my server from where other can reference them

uploadArchives{
    repositories.mavenDeployer {
        def deployPath = file(getProperty('aar.deployPath'))
        repository(url: "file://${deployPath.absolutePath}")
        pom.project {
            groupId 'myPackageName'
            artifactId 'wingoku-io'
            version "0.0.6"
        }
    }
}
scottyab commented 9 years ago

@ozodrukh I wrote a how to guide for publishing to maven central if it helps.

wingoku commented 9 years ago

@scottyab it doesn't mention anywhere how to bundle all the referenced dependencies in the .aar file.

ozodrukh commented 9 years ago

@wingoku, android it does automatically every time you press on build or run button (only on libraries projects)

wingoku commented 9 years ago

In my case it doesn't add SDK dependencies in the App's gradle file. So I want to package all the dependencies in the .aar file.

jitpack-io commented 9 years ago

Hi all, Is there a problem with the latest 'aar' file? If its something on our side then we'll work on fixing it. The class itself is included in the aar so perhaps its a similar issue to this one?

BhaveshPatadiya commented 9 years ago

I am still facing this same issue. Any Solution available?

sridhar-nalam commented 9 years ago

add library in dependencies without aar extension. It worked for me. dependencies { compile 'com.github.ozodrukh:CircularReveal:1.1.0' }

rahulchowdhury commented 9 years ago

Adding dependencies without @aar worked fine for me as well. Thanks Sridhar :+1:

MeenaxiD commented 9 years ago

Yes, adding dependencies without @aar works.

ebabel commented 9 years ago

RevealAnimator$RevealRadius is extending FloatProperty, which doesn't exist in android versions prior to 4.0. So this shouldn't work, right? Removing the @aar works for me as well (somehow). Can you remove this from the README.md?

lvl4fi4 commented 9 years ago

hi i had the same problem on some project that i set new CircularReveal version in dependencies . i just used old version compile 'com.github.ozodrukh:CircularReveal:1.0.4'

RaghavThakkar commented 9 years ago

Without @aar works.

sachithkn commented 9 years ago

works without @aar thankyou.

tiveor commented 9 years ago

the same here, working like a charm without @aar, many thanks.

robillo commented 7 years ago

working fine with the older version (1.0.4), not working with or without @aar in 2.0.4 version.