[android] .focus() causes "illegal number of arguments for 'updateHotspot' command." error.
See original GitHub issueOn Android when i try to apply focus to a TouchableOpacity
element i greeted with an error
illegal number of arguments for 'updateHotspot' command.
export class Test extends Component {
render() {
return (
<>
<TouchableOpacity ref={(ref) => (this._ref = ref)} onFocus={() => console.log("I HAVE BEEN FOCUSSED")}>
<Text>Should get focus</Text>
</TouchableOpacity>
<TouchableOpacity onPress={() => this._ref.focus()}>
<Text>Should trigger focus</Text>
</TouchableOpacity>
</>
)
}
}
please note that in my actuall code i DO check if this._ref
exists first before calling focus etc.
React Native version:
info
System:
OS: macOS Mojave 10.14.5
CPU: (8) x64 Intel(R) Core(TM) i5-8279U CPU @ 2.40GHz
Memory: 23.23 MB / 16.00 GB
Shell: 3.2.57 - /bin/bash
Binaries:
Node: 12.10.0 - /usr/local/bin/node
npm: 6.11.3 - /usr/local/bin/npm
SDKs:
iOS SDK:
Platforms: iOS 13.0, DriverKit 19.0, macOS 10.15, tvOS 13.0, watchOS 6.0
Android SDK:
API Levels: 28, 29
Build Tools: 28.0.3, 29.0.2
System Images: android-25 | Google APIs Intel x86 Atom, android-29 | Google APIs Intel x86 Atom
IDEs:
Android Studio: 3.5 AI-191.8026.42.35.5791312
Xcode: 11.0/11A420a - /usr/bin/xcodebuild
npmPackages:
react: 16.9.0 => 16.9.0
react-native: 0.61.2 => 0.61.2
npmGlobalPackages:
react-native-cli: 2.0.1
Repoduce
- create a
ref
from aTouchableOpacity
on Android. - try to focus to that ref.
- observe error.
Expected
the TouchableOpacity
to be focussed and onFocus
to be called…
Issue Analytics
- State:
- Created 4 years ago
- Comments:7
Top Results From Across the Web
react native android causes illegal number of arguments ...
... with TouchableOpacity ref and call method .focus() , i getting error. illegal number of arguments for update hotspot command when trying ...
Read more >Focus Input after update to 1.4.1 (28 Oct 2020) crashes app
I am starting my app using the android kitchen sink/preview app (1.9.20) - the ... illegal number of arguments for 'updateHotspot' command.
Read more >[Solved]-React Native Android run causes "Illegal number ...
Coding example for the question React Native Android run causes "Illegal number of arguments for updateHotspot command"-React Native.
Read more >com.amazon.avod.thirdpartyclient_v3.0.219.32341- ...
Minimum SDK: 16 (Jelly Bean); Target SDK: 25 (); Version Code: 219032341 ... Illegal number of arguments for \'updateHotspot\' command.
Read more >Liberica JDK 16+36 Release Notes
The version number is 16. Liberica JDK 16+36. Liberica is a certified, Java SE 16-compliant distribution of OpenJDK 16 which works on server...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
This issue is still ongoing.
Still relevant.