react-native-wifi-and-hotspot-wizard icon indicating copy to clipboard operation
react-native-wifi-and-hotspot-wizard copied to clipboard

Getting Error method.invoke

Open arirah opened this issue 2 years ago • 10 comments

"react-native": "^0.60.5", "react-native-wifi-and-hotspot-wizard": "^1.0.6-beta.1",

\react-native-wifi-and-hotspot-wizard\android\src\main\java\com\reactnativewifiandhotspotwizard\RNWifiAndHotspotWizardModule.java:108: warning: non-varargs call of varargs method with inexact argument type for last parameter; int actualState = (Integer) method.invoke(wifi,null); ^

arirah avatar Mar 01 '22 11:03 arirah

Hey that one seems to be a warning

prafulla-codes avatar Mar 01 '22 11:03 prafulla-codes

  • Try: Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

  • Get more help at https://help.gradle.org

BUILD FAILED in 30s

at checkExecSyncError (child_process.js:629:11)
at execFileSync (child_process.js:647:13)
at runOnAllDevices (F:\android\nidlemobile\node_modules\@react-native-community\cli-platform-android\build\commands\runAndroid\runOnAllDevices.js:74:39)
at buildAndRun (F:\android\nidlemobile\node_modules\@react-native-community\cli-platform-android\build\commands\runAndroid\index.js:158:41)
at then.result (F:\android\nidlemobile\node_modules\@react-native-community\cli-platform-android\build\commands\runAndroid\index.js:125:12)
at process._tickCallback (internal/process/next_tick.js:68:7)

npm ERR! code ELIFECYCLE npm ERR! errno 1 npm ERR! [email protected] android: npx react-native link && npx react-native run-android --no-jetifier && npx react-native log-android npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the [email protected] android script. npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in: npm ERR! C:\Users\1600000064\AppData\Roaming\npm-cache_logs\2022-03-01T11_29_21_470Z-debug.log

arirah avatar Mar 01 '22 11:03 arirah

But i am getting build failed !!

arirah avatar Mar 01 '22 11:03 arirah

                                        ^

F:\android\nidlemobile\node_modules\react-native-wifi-and-hotspot-wizard\android\src\main\java\com\reactnativewifiandhotspotwizard\RNWifiAndHotspotWizardModule.java:108: warning: non-varargs call of varargs method with inexact argument type for last parameter; int actualState = (Integer) method.invoke(wifi,null); ^ cast to Object for a varargs call cast to Object[] for a non-varargs call and to suppress this warning F:\android\nidlemobile\node_modules\react-native-wifi-and-hotspot-wizard\android\src\main\java\com\reactnativewifiandhotspotwizard\RNWifiAndHotspotWizardModule.java:135: warning: non-varargs call of varargs method with inexact argument type for last parameter; int actualState = (Integer) method.invoke(wifi,null); ^ cast to Object for a varargs call cast to Object[] for a non-varargs call and to suppress this warning Note: F:\android\nidlemobile\node_modules\react-native-wifi-and-hotspot-wizard\android\src\main\java\com\reactnativewifiandhotspotwizard\RNWifiAndHotspotWizardModule.java uses or overrides a deprecated API. Note: Recompile with -Xlint:deprecation for details. 1 error 5 warnings

arirah avatar Mar 01 '22 11:03 arirah

@prafulla-codes can you help me ?

arirah avatar Mar 02 '22 12:03 arirah

Sure, I will check on this and get back to you

prafulla-codes avatar Mar 02 '22 12:03 prafulla-codes

Finally, it is working for API 28, after downgrading my API target Version.

This method was deprecated in API level 29.

a) See WifiNetworkSpecifier.Builder#build() for new mechanism to trigger connection to a Wi-Fi network. b) See addNetworkSuggestions(java.util.List), removeNetworkSuggestions(java.util.List) for new API to add Wi-Fi networks for consideration when auto-connecting to wifi. Compatibility Note: For applications targeting Build.VERSION_CODES.Q or above, this API will always fail and return -1.

arirah avatar Mar 05 '22 10:03 arirah

Hey that one seems to be a warning

You imported import sun.security.ec.point.ProjectivePoint.Mutable;

But where did you use it? I think this import creates some errors, If you comment this line , error will be fixed.

arirah avatar Mar 05 '22 10:03 arirah

not working to me also can you give me a guide on how to be able run this library?

Anthony-333 avatar Apr 22 '22 11:04 Anthony-333

I am upgrading the library to support the latest version, this should fix the sun.security.ec.point.ProjectivePoint.Mutable error

prafulla-codes avatar Jan 29 '23 09:01 prafulla-codes