Ibramazin
Ibramazin

Reputation: 1018

Cannot resolve symbol 'validator' while using android library

I want to use this library - https://github.com/ragunathjawahar/android-saripaar for form validation in my android app

I have included the dependencies

dependencies {
implementation 'com.mobsandgeeks:android-saripaar:2.0.3'
}

I also added this to the build.gradle project (app)

maven {
        url "https://oss.sonatype.org/content/repositories/snapshots/"
    }

I added all the codes required in the library but when I add this line of code:

validator = new Validator(this);
validator.setValidationListener(this);

......
validator.validate();

in super.OnCreate method in my activity

I get this error -

Cannot resolve symbol 'validator'

error: cannot find symbol variable validator

I have tried to clean project and rebuild project, its not working.

Upvotes: 1

Views: 1049

Answers (1)

Ashish
Ashish

Reputation: 6919

Check the proper example they have provided in github.

Validator validator = new Validator(this);
validator.setValidationListener(this);

validator.validate();

Upvotes: 1

Related Questions