I can't get an apk file (Solved)

#1

Hi guys. I made a mobile application using Ionic, which i wanted to throw on google play. But i have almost given up, because i simply can’t figure out how to get the apk file from my project, which is why i considered to learn android studio instead. However i really like ionic, and would love if i could get some help, but all the guides I’ve found on the internet havn’t worked for me yet.

So if anyone have some updated tips on how to acquire the apk from an ionic project, i would be beyond grateful.
I’m using a windows 10 pc.
thanks in Advance

#2

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.

#3

I have also removed Java, and reinstalled the 1.8

however it still doesn’t work =)

#4

Run > ionic cordova build android
If done, U can get the apk

#5

did you used this one ? https://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html

install first one Windows x64 207.46 MB [jdk-8u201-windows-x64.exe](javascript: void(0))

#6

Thanks a lot man, it just got better now. However my next question may seem a little stupid.
But i am getting a lot of :

“All imports on this line are unused”. (for all my pages on my application)

However it still says:
BUILD SUCCESSFUL in 10s
1 actionable task: 1 executed
Subproject Path: CordovaLib
Subproject Path: app

#7

My biggest problem may be this atm:

You have not accepted the license agreements of the following SDK components:
[Android SDK Platform 26].
Before building your project, you need to accept the license agreements and complete the installation of the missing components using the Android Studio SDK Manager.
Alternatively, to learn how to transfer the license agreements from one workstation to another, go to http://d.android.com/r/studio-ui/export-licenses.html

#8

I made it work in the end. But your help was a push to the final solution =) thanks again