Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Deprecated Warning #4

Closed
Tokenyet opened this issue May 1, 2019 · 1 comment
Closed

Deprecated Warning #4

Tokenyet opened this issue May 1, 2019 · 1 comment

Comments

@Tokenyet
Copy link

Tokenyet commented May 1, 2019

I'm not sure If this should be reported. But I cannot figure out how this happened. All the codes seem to be right under Build.VERSION.SDK_INT. Is there anyway to omit the warning or change the code to suppress It? I used SuppressLint, but It seems to be no relation on this issue.

.pub-cache\hosted\pub.dartlang.org\vibration-1.0.2\android\src\main\java\com\benjaminabel\vibration\VibrationPlugin.java uses or overrides a deprecated API.
Note: Recompile with -Xlint:deprecation for details.

Edit:

.pub-cache\hosted\pub.dartlang.org\vibration-1.0.2\android\src\main\java\com\benjaminabel\vibration\VibrationPlugin.java:37: warning: [deprecation] vibrate(long) in Vibrator has been deprecated
                vibrator.vibrate(duration);
                        ^
.pub-cache\hosted\pub.dartlang.org\vibration-1.0.2\android\src\main\java\com\benjaminabel\vibration\VibrationPlugin.java:54: warning: [deprecation] vibrate(long[],int) in Vibrator has been deprecated
                vibrator.vibrate(patternLong, repeat);
                        ^
2 warnings

This is the details extracted, but this seems to be correct in Logic...um....

@Tokenyet
Copy link
Author

Tokenyet commented May 1, 2019

Solved by using @SuppressWarnings("deprecation"). I have no idea why @SuppressLint("Deprecated") is not working.

There is also a list for SuppressLint provided by @akselwillgert in stackoverflow.

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

No branches or pull requests

1 participant