When i am trying to just add the in_app_purchase plugging in the apps pubspec.yaml file the following error is occurred.
Just after adding the plugin. not related to any specific code.
Note: /Users/tanzimfahim/flutter/.pub-cache/hosted/pub.dartlang.org/in_app_purchase-0.2.0+3/android/src/main/java/io/flutter/plugins/inapppurchase/InAppPurchasePlugin.java uses unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
Most plugins, certainly all Flutter favorites, are tested. If unchecked or unsafe operations are left in, the authors have determined that these operations are fine in their use case.
If you want to know about unchecked or unsafe operations, you can use below command: Note: PrintArrayListMain.java uses unchecked or unsafe operations. Note: Recompile with -Xlint:unchecked for details. How to resolve warning message: uses unchecked or unsafe operations.
The "unchecked or unsafe operations" warning is very common. This is just a warning, not an error. These warnings will only appear when you compile the plugin for the first time, i.e. every time you use flutter clean or add a new plugin; generally when you compile a plugin for the first time.
Note: PrintArrayListMain.java uses unchecked or unsafe operations. Note: Recompile with -Xlint:unchecked for details. As you can see, compile gives us warning message that PrintArrayListMain.java uses unchecked or unsafe operations.
When adding plugins to Flutter and running your app on Android, you will often see warnings. The "unchecked or unsafe operations" warning is very common.
You do not have to worry about it because:
This is just a warning, not an error. These warnings will only appear when you compile the plugin for the first time, i.e. every time you use flutter clean
or add a new plugin; generally when you compile a plugin for the first time.
Most plugins, certainly all Flutter favorites, are tested. If unchecked or unsafe operations are left in, the authors have determined that these operations are fine in their use case.
As I outlined above, you do not have to do anything about them.
What you can do is file an issue about it or create a pull request directly to either suppress the warning or find an alternative solution in code.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With