Saturday, April 4, 2015

An error occurred while resigning the app 'selendroid-test-app-0.15.0.apk'

         
                     An error occurred while resigning the app 'selendroid-test-app-0.15.0.apk'


If you got the same error message while trying to start the Selendoid server with your apk file, try the below to fix it :

Solution : 

  1.  Check JAVA_HOME is set properly
    • Set System variable with name "JAVA_HOME"  with value set to Java jdk like "C:\Program Files\Java\jdk1.8.0_40\"
  2. Check ANDROID_HOME is set properly
    • Set System variable with name "ANDROID_HOME"  with value set to Android Sdk like "C:\Users\lalit\AppData\Local\Android\sdk\"


Still after setting the above variables correctly, if you see any error try to sign your app manually using below command

C:\Program Files\Java\jdk1.8.0_40\bin> jarsigner.exe -sigalg MD5withRSA -digestalg SHA1 -signedjar < apk file path >  -storepass android -keystore <keystore location> < apk file path >  androiddebugkey

Example:

C:\Program Files\Java\jdk1.8.0_40\bin > jarsigner.exe -sigalg MD5withRSA -digestalg SHA1 -signedjar C:\Users\lalit\Downloads\selendroid-test-app-0.15.0.apk -storepass android -keystore C:\Users\lalit\.android\debug.keystore C:\Users\lalit\Downloads\selendroid-test-app-0.15.0.apk androiddebugkey

If it fails and throws error like  jarsigner: unable to open jar file

Solution : 

  1. Try to rename your *.apk file to *.zip
  2. Open the zip file and verify its opened successfully, and if it does not then its currupt apk file :( and need to be changed :)

AWS Certified Solutions Architect Associate - AWS Introduction - Questions

All the Best !!! Show Result !! Try Again !! ×