androidvue.jsapkquasar-frameworkbluestacks

Why won't apk install in BlueStacks?


Please suggest. I have a project on vue quasar I want to create an apk application and run it through bluestacks The device emulator works correctly. 1.start the project using the command quasar build -m cordova -T android enter image description here

The only warning is from Gradle about the version enter image description here

Then I ran gradle --warning-mode all to understand the reasons. The result is on the screenshot above.

Next, I drop the created apk into bluestaks, but it gives an error The application is not installed, it looks like the package is damaged. I don’t understand just what is worth paying attention to? why not install or compile incorrectly?


Solution

  • I ran into the same issue. The reason it wouldn't install was the apk not being signed.

    you have to use keytool to generate a keystore first. keytool is located in your java jdk folder the following example will generate a keystore. I would suggest running the command where you want to store the keystore for example from c:\dev\android\keys\

    Note: you may have to type the full path to run keytool, and jarsigner. or add the jdk bin folder to your system paths

    keytool -genkey -v -keystore myquasar-release-key.keystore -alias myquasar-release -keyalg RSA -keysize 2048 -validity 20000
    

    after creating the keystore you have to sign the apk with jarsigner which also comes with the java jdk

    jarsigner -verbose -sigalg SHA1withRSA -digestalg SHA1 -keystore c:\dev\android\keys\myquasar-release-key.keystore app-release-unsigned.apk myquasar-release
    

    To finish up we need to run zipalign this will generate the final apk file. zipalign comes with the android sdk when installing android studio.

    C:\Users\yourusername\AppData\Local\Android\Sdk\build-tools\versionnumber\zipalign -v 4 app-release-unsigned.apk myquasar.signed.apk
    

    After doing these three steps you can now install on your phone/bluestacks/etc. while installing you may get a warning that play-protect does not recognize the organization. This is fine since you built the apk you know where it came from. On a side note. if you upload to google play. You must use the same keystore every time you update your app.

    A guide showing this off with a simple application can be found here https://www.kevin7.net/post_detail/use-quasar-to-build-an-android-app