Issue
I am facing an error during the installation of Appium for mobile automation testing. I have installed android studio in drive G instead of C. When I start the session it shows the error below:
An unknown server-side error occurred while processing the command. Original error:
Cannot verify the signature of 'C:\Users\Thinkcenter\AppData\Local\Programs\Appium\resources \app\node_modules\appium\node_modules\appium-uiautomator2-server\apks\appium-uiautomator2-server-v4.21.1.apk'. Original error: Error: could not open `G:\androidsdk\platform-tools\lib\jvm.cfg'
Solution
The first thing that pops into my mind is setting up your environment variables correctly (does not do that automatically when installing Android Studio), but you may first want to debug your environment through appium-doctor.
Option 1 Use NPM (Node.js package manager) to install appium-doctor globally from cmd:
npm install -g appium-doctor
run appium-doctor to check all your environment settings for Android:
appium-doctor --android
Make sure everything in the section ### Diagnostic for necessary dependencies starting ### is green
Option 2 Check your environment variables
- Add a new path on system level: Name = "ANDROID_HOME", value = "G:\PATH\TO\AppData\Local\Android\Sdk"
- Add two new values to the already existing variable: "Path" on system level (open it in the list of system variables): Add these values (1) "%ANDROID_HOME%\tools", (2) "ANDROID_HOME%\platform-tools"
Edit: Option 3 I have seen your screenshot and I see some problems with your Desired Capabilities. Set the correct ones the following way:
- platformName: "Android"
- platformVersion: [API 28 = "9"]
- deviceName: "emulator-5554"
- now appPackage and appActivity are the important part - you have to define both full paths if you don't have an .apk file
- appPackage: "com.android.calculator2"
- appActivity: "com.android.calculator2.Calculator"
Don't know the appPackage and appActivity? use Apk Analyze (https://play.google.com/store/apps/details?id=sk.styk.martin.apkanalyzer&hl=nl&gl=US) to scan for .apk files and their respective appPackage and appActivity
Answered By - kenneth
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.