Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

ionic build with "SplashScreen.java uses or overrides a deprecated API." error

I managed to build a apk file successfully using ionic after running the command ionic build android. However, this apk file could not be installed successfully onto my Android phone.

During the built process, I encountered the following warnings:

:CordovaLib:generateDebugSources :CordovaLib:compileDebugJavaNote:
> Some input files use or override a deprecated API. Note: Recompile
> with -Xlint:deprecation for details.

:compileDebugJavaNote:
> C:\Users\own\Dropbox\Workplace\xampp568\htdocs\stkview\stkApp\platforms\android\src\org\apache\cordova\splashscreen\SplashScreen.java
> uses or overrides a deprecated API. Note: Recompile with
> -Xlint:deprecation for details.

Could this be the cause? How do I remove these warnings?

like image 432
guagay_wk Avatar asked Jul 04 '26 13:07

guagay_wk


1 Answers

I have encountered this error before. What happened on my PC was that the system variable JAVA_HOME was not defined. After defining JAVA_HOME=C:\Program Files\java\jdk1.7.0_67, the warning disappeared and the installation was done successfully. Not sure if it works on your machine. Hopefully, it helps.

like image 114
guagay_wk Avatar answered Jul 06 '26 02:07

guagay_wk



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!