I am trying to setup Ionic on my new machine but I have ran into a problem with building a Cordova Android project, that I cannot seem to fix.
The programs and versions I use are:
For building I use Java 8:
For building my android project I use SDK version
I have created an Ionic started project via the command:
ionic start test tabs and didn't change any code of the project.
While using the command
ionic build android I get the error
:CordovaLib:compileDebugJavaWithJavac - is not incremental (e.g. outputs have changed, no previous execution, etc.).
What I tried
I Tried running running cordova update and after that ionic build - This did not work.
After that I tried using an other java jdk version (
1.8.0_45). The setup on my old machine was working with this version. I also changed the JAVA_HOME variable with this attempt. Unfortunately I had no luck with this attempt.
On multiple topics it is suggested to use JDK 8, because JDK 7 is not compatible with android versions 21 and up. But I get this error while using JDK 8 so that doesn't solve my problem.
I tried removing the android platform and readd it. That also did not solve my problem. It gave me the same error message.
Adding the Android platform via the Ionic command
ionic platform add [email protected] gives me an error. It does not know that version number (but according to Android SDK manager 5.0.1 = android 21).
ionic platform add [email protected] gives me android version 23. So that does not work either.
Because of the problems above I manually changed the version numbers in the Android platform. I changed the version number to
21 on the following places:
I have had no problem before with changing the version numbers before.
Try to Update your JRE and JDK and IONIC as well.