faizalshap / react-native-otp-verify

React native sms verification without additional permissions
MIT License
252 stars 96 forks source link

react-native-otp-verify:compileReleaseJavaWithJavac FAILED #21

Closed jitendra-koodo closed 3 years ago

jitendra-koodo commented 4 years ago

Getting this error while building release version. Same error on Mac and Windows. What could be the reason?

-

Task :react-native-otp-verify:compileReleaseJavaWithJavac FAILED E:\app\node_modules\react-native-otp-verify\android\src\main\java\com\faizal\OtpVerify\RNOtpVerifyModule.java:6: error: package android.support.annotation does not exist import android.support.annotation.NonNull; ^ E:\app\node_modules\react-native-otp-verify\android\src\main\java\com\faizal\OtpVerify\RNOtpVerifyModule.java:91: error: cannot find symbol public void onFailure(@NonNull Exception e) { ^ symbol: class NonNull Note: E:\app\node_modules\react-native-otp-verify\android\src\main\java\com\faizal\OtpVerify\AppSignatureHelper.java uses or overrides a deprecated API. Note: Recompile with -Xlint:deprecation for details. 2 errors

FAILURE: Build failed with an exception.

Arun-paramasivam commented 4 years ago

cleaning the build folder did the trick for me! cd android && ./gradlew clean from the project root folder

guidoprinc commented 4 years ago

This issue still persist and it should be because it's using import android.support.annotation.NonNull; when it should be using import androidx.annotation.NonNull;

guidoprinc commented 4 years ago

The change has been made in RNOtpVerifyModule.java but it's not deployed in any new version yet.

GeDiez commented 4 years ago

any updates? im running into same issue

jmlavoier commented 3 years ago

In order to get rid of this trouble. I've created a fork and fixed this issue in this library. As we can see, this repository is deprecated, it hasn't been maintained.

I've changed the name to react-native-otp-autocomplete

The installation and usage are the same, you don't need to change anything.

yarn add react-native-otp-autocomplete
import OtpAutocomplete from 'react-native-otp-autocomplete';

OtpAutocomplete.getHash().then(() => {}).cathc(() => {});
OtpAutocomplete.getOtp().then(() => {}).cathc(() => {});
OtpAutocomplete.removeListener();

You can see the documentation.

Feel free to create issues and submit some pull requests to maintain the repo.

alapanerao commented 3 years ago

I solved it with jetifier. Check below link: Click Here

amit-soni7 commented 1 year ago

In order to get rid of this trouble. I've created a fork and fixed this issue in this library. As we can see, this repository is deprecated, it hasn't been maintained.

I've changed the name to react-native-otp-autocomplete

The installation and usage are the same, you don't need to change anything.

yarn add react-native-otp-autocomplete
import OtpAutocomplete from 'react-native-otp-autocomplete';

OtpAutocomplete.getHash().then(() => {}).cathc(() => {});
OtpAutocomplete.getOtp().then(() => {}).cathc(() => {});
OtpAutocomplete.removeListener();

You can see the documentation.

Feel free to create issues and submit some pull requests to maintain the repo.

This fork worked for me

Olixfills commented 8 months ago

In order to get rid of this trouble. I've created a fork and fixed this issue in this library. As we can see, this repository is deprecated, it hasn't been maintained.

I've changed the name to react-native-otp-autocomplete

The installation and usage are the same, you don't need to change anything.

yarn add react-native-otp-autocomplete
import OtpAutocomplete from 'react-native-otp-autocomplete';

OtpAutocomplete.getHash().then(() => {}).cathc(() => {});
OtpAutocomplete.getOtp().then(() => {}).cathc(() => {});
OtpAutocomplete.removeListener();

You can see the documentation.

Feel free to create issues and submit some pull requests to maintain the repo.

This worked for me too