HELP, i can not get an apk from my ionic projekt on windows no matter what i do

#1

I am desperate. I’m trying to publish an application on google store, but every time i to to make build, i keep getting errors.
When i write
ionic cordova build --release android
on the cli, it says that “all imports on this line are unused” for every page presented.

i cannot go further either by using the

keytool -genkey -v -keystore my-release-key.keystore -alias alias_name -keyalg RSA -keysize 2048 -validity 10000

then it says “keytool is not recognized as an internal or external command”
operable program or batch file"

Also no build is created under platforms/anroid

-I am starting to lose hope and give up. So any help will me very appreciated.
Thanks it advance!

#2

‘$’ is used conventionally to mean “prompt”. You aren’t supposed to type it, you’re supposed to type whatever comes after it at whatever a command prompt looks like on your system.

#3

Sorry I’ve put it wrong in the here then :slight_smile:
I did not implement the “$” in the cli

#4

IF the CLI is reporting unused lines, maybe you can remove them.

Do you have Android Studio and JAVA installed? You might need to include the full path to that tool if something is not installed correctly

#5

Hey Chris, thanks for your reply. My problem at the moment seems to be the Java at the moment =)

cordova build android --release
Android Studio project detected

ANDROID_HOME=C:\Users\FAH19\AppData\Local\Android\sdk
JAVA_HOME=C:\Program Files\java\jdk-11.0.2
Requirements check failed for JDK 1.8 or greater
[01:29:10] tslint: …esktop/htdocs/natural-gym-app/gym-app-nat/src/pages/extraprogram/extraprogram.ts, line: 3
All imports on this line are unused.