Pageobject.webElement throws Nullpointerexception when i use iOSXCUITFindBy,AndroidFindBy in appium V2 Beta and java client 8.3.0

I have framework to work on cross platform.According to my input, it’s opening simulator or emulator and installing the app. But when it try to interact with Web element , it says null pointer exception.

If i use “By” it’s working fine but i can’t use “By” locator as element locator for ios and android is different. Can somebody facing this issue? I’m thinking it may be related to lib incompatibility ,not sure? I tried different InitElement everything is showing null pointer exception in web element.

Elements:
@iOSXCUITFindBy(xpath = “//XCUIElementTypeImage[@name=‘xxx’]”)
@AndroidFindBy(xpath = “//android.widget.TextView[@text=‘xx’]”)
public static WebElement xxx;

SW details:

Appium v2.0.0-beta.55
npm 8.11.0
node v16.15.1
java.version: ‘11.0.18’
Other version details in gradle

Error:

[Appium] Welcome to Appium v2.0.0-beta.55
[Appium] Non-default server args:
[Appium] { address: ‘127.0.0.1’, port: 20383, sessionOverride: true }
[Appium] Attempting to load driver xcuitest…
[debug] [Appium] Requiring driver at /Users/390099/node_modules/appium-xcuitest-driver
[Appium] Attempting to load driver uiautomator2…
[debug] [Appium] Requiring driver at /Users/390099/node_modules/appium-uiautomator2-driver
[Appium] Attempting to load driver chromium…
[Appium] Could not load driver ‘chromium’, so it will not be available. Error in loading the driver was: Could not find a driver installed at /Users/390099/node_modules/appium-chromium-driver
[debug] [Appium] ReferenceError: Could not find a driver installed at /Users/390099/node_modules/appium-chromium-driver
[debug] [Appium] at DriverConfig.require (/opt/homebrew/lib/node_modules/appium/lib/extension/extension-config.js:539:13)
[debug] [Appium] at /opt/homebrew/lib/node_modules/appium/lib/extension/index.js:83:46
[debug] [Appium] at Array.map ()
[debug] [Appium] at getActiveDrivers (/opt/homebrew/lib/node_modules/appium/lib/extension/index.js:80:10)
[debug] [Appium] at main (/opt/homebrew/lib/node_modules/appium/lib/main.js:303:41)
[Appium] Appium REST http interface listener started on 127.0.0.1:20383
[Appium] Available drivers:
[Appium] - [email protected] (automationName ‘XCUITest’)
[Appium] - [email protected] (automationName ‘UiAutomator2’)
[Appium] - [email protected] (automationName ‘Chromium’)
[Appium] No plugins have been installed. Use the “appium plugin” command to install the one(s) you want to use.
[HTTP] --> GET /status
[HTTP] {}
[debug] [AppiumDriver@9453] Calling AppiumDriver.getStatus() with args: []
[debug] [AppiumDriver@9453] Responding to client with driver.getStatus() result: {“build”:{“version”:“2.0.0-beta.55”}}
[HTTP] <-- GET /status 200 2 ms - 47
[HTTP]
2023-03-07 10:15:05 INFO AppiumServerController:53 - Appium server started successfully
x
2023-03-07 10:15:05 INFO :100 -

 _______. _______ .______       _______ .__   __.  __  .___________.____    ____ 

/ || ____|| _ \ | ____|| \ | | | | | |\ \ / /






| (---- `| |__ | |_) | | |__ | \| | | |` —| |---- `\ \/ / \ \ | __| | / | __| | .`  | | | | | _  <em>/
.----) | | |</em> ___ | |\ ----.| |____ | |\ | | | | | | |
| *******/ |******* ||  *| `. *****||***** ______||| __| || |* *| |* _|