Android problem with deprecated methods


#1

Hi,

I’m getting the following messages when building for android:

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

compileDebugJavaNote: /Users/mjpwall/Dev/TIM_DEV/tim/platforms/android/src/org/apache/cordova/splashscreen/SplashScreen.java uses or overrides a deprecated API.
Note: Recompile with -Xlint:deprecation for details.

Having trouble running the app on an android emulator (genymotion) but runs fine on iOS


#2

Have you found a solution? I’ve same problem, with “SplashScreen.java uses or overrides a deprecated API”


#3

Hi.
I have similar problem:
:CompileDebugJavaNote: Some input files use or override a deprecated API. Note: Recompile with -Xlint:deprecation for details.

My config:
Cordova CLI: 5.3.3
Gulp version: CLI version 3.9.0
Gulp local:
Ionic Version: 1.1.0
Ionic CLI Version: 1.6.5
Ionic App Lib Version: 0.3.9
OS: Windows 7 SP1
Node Version: v0.12.7

I don’t understand where is a problem. I tried reinstal Java JDK, i have almost all packages in Android SDK and still have the same error.


#4

haven’t found a solution, but it seems to be intermittent - sometimes shows the error sometimes not


#5

From stackoverflow.com and this help me:

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.


#6

removing the platforms and plugins and re adding them now seems to solve this issue, for me at least.


#7

Set the JAVA_HOME Variable

  1. Right-click the My Computer icon on your desktop and select Properties.
  2. Click the Advanced tab, then click the Environment Variables button.
  3. Under System Variables, click New.
  4. Enter the variable name as JAVA_HOME.
    5.Enter the variable value as the installation path for the Java Development Kit (ex. C:\Program Files\Java\jdk1.8.0_60).
  5. Go up, User Variables, if don´t exist the variable “PATH”, click new and enter the variable name “PATH” and value %JAVA_HOME%\bin
  6. if exist then click edit and enter the value ;%JAVA_HOME%\bin in the end.

now seems to solve this issue with javac.