Android build error: 'Some input files use or override a deprecated API'

I’m no more able to build a APK. It worked fine up to yesterday but now I keep getting the following error:

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

I build with the command: uno build --configuration=Release --target=Android --clean -v -l. Following I report part of the verbose output of the process that in my opinion may be significant:

'Packages.SourcePaths' was not found in .unoconfig

...\Fuse.Controls.Primitives\0.47.7\textcontrols\fallbacktextrenderer\$.uno(166): W4139: Uno.Content.Fonts.CharacterSets is obsolete
...\Uno.Data.Json\0.47.4\source\$.uno(182): W4139: 'Uno.Data.Json.JsonReader.AsFloat()' is obsolete: 'Use AsNumber() instead'
...\Uno.Data.Json\0.47.4\source\$.uno(192): W4139: 'Uno.Data.Json.JsonReader.AsInteger()' is obsolete: 'Use AsNumber() instead'
...\UnoCore\0.47.13\source\uno\$.uno(95): W4139: 'Uno.Application.set_Window(Uno.Platform.Window)' is obsolete: 'Deprecated on mobile. Please interact with UI through fuselibs'
...\Fuse.Reactive.JavaScript\0.47.7\$.uno(1758): W4139: 'Uno.Application.get_Current()' is obsolete: 'Application.Current class is deprecated on mobile. Please use CoreApp.Current'
...\Fuse.Controls.Primitives\0.47.7\textcontrols\fallbacktextrenderer\$.uno(164): W4139: Uno.Content.Fonts.BitmapFont is obsolete
...\Fuse.Controls.Primitives\0.47.7\textcontrols\fallbacktextrenderer\$.uno(167): W4139: Uno.Content.Fonts.BitmapFont is obsolete.
...\Fuse.Controls.Primitives\0.47.7\textcontrols\fallbacktextrenderer\$.uno(65): W4139: Uno.Content.Fonts.BitmapFont is obsolete
...\Fuse.Controls.Primitives\0.47.7\textcontrols\fallbacktextrenderer\$.uno(184): W4139: Uno.Content.Fonts.TextTransform is obsolete
...\Fuse.Controls\0.47.7\$.uno(266): W4139: 'Fuse.Controls.Control.CreateNativeView()' is obsolete
...\Fuse.Android\0.47.7\$.uno(698): W4139: 'Uno.Application.get_Current()' is obsolete: 'Application.Current class is deprecated on mobile. Please use CoreApp.Current'

[...]

Running dex in-process requires build tools 23.0.2.
For faster builds update this project to use the latest build tools.

[...]

A problem occurred configuring project ':app'.
> java.lang.NullPointerException (no error message)

I updated Android SDK using fuse install Android. I updated Java (don’t know if necessary). After updating I rebooted the PC and uno clean the project. My project does not use any foreing code, external APIs, other complex things, etc. It simpy fetches data from a MySQL dB using an PHP API I made by myself and it worked fine up to yesterday.

The APK is actually built and saved in the /Release folder but when I try to install it to my Huawei Honor 7 (Android 6.0) I get “APK not compatible” (from the Huawei’s PC software). As said, it worked fine.

The -Xlint:deprecation option suggested by uno build seems to not be present (I tried uno build --help and it is not listed).

Preview works despite the errors:
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.

(Fuse 0.36.1, build 12010, Window 10 64bit)

Hi Enrico, Sorry to hear about the problem, it does sound very odd.

We’ll get through the simple questions first so we can narrow in on the meat of the problem.

It worked fine up to yesterday

Were there any updates to Fuse or Android libs that you are aware of between yesterday and today?

my Huawei Honor 7

Is this the same phone you have been testing with before?

-Xlint:deprecation
don’t worry about those. It’s some warnings from some fuse libraries which we need to squash. We have some WIP fixes internally for these.

Preview works despite the errors
Preview on Desktop or on the Device?

I build with the command: uno build --configuration=Release --target=Android --clean -v -l

Please try uno clean && uno build -tandroid and see what messages you get. If that works please try uno clean && uno build -crelease -tandroid

If either of them fail please post both full build logs in this thread.

Also please you unoproj file and the result of running uno config here.

Thanks, it’s a lot but should give us lots of data to get started with.

Hi Chris,

Too long to read: WORKS

  1. «It worked fine up to yesterday»: actually it did not worked immediately. I had the same exact issue, but after a fuse install android I managed to install the APK. The day after, again it did not work (same problem) but this time a new fuse install android (which downloaded and installed some packages) did not solve the issue.

  2. «Huawei Honor 7»: Yes, the phone is always the same.

  3. I built the Preview on device from inside Sublime Text, right click on MainView.ux

  4. uno clean && uno build -tandroid built a APK in the /Debug folder which I managed to install and it works correctly. The only output I got is:

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

  5. uno clean && uno build -crelease -tandroid built a APK in the /Release folder which I installed and it works fine (Please let me say that I did not touch anything, I did not even powered on my PC before these tests!). The output is:

    Release build specified with no Key info in the unoproj. Defaulting to debug.keystore
    Generazione in corso di una coppia di chiavi RSA da 2.048 bit e di un certificato autofirmato (SHA256withRSA) con una validità di 14.000 giorni
    per: CN=Unknown, OU=Unknown, O=Unknown, L=Unknown, ST=Unknown, C=Unknown
    [Memorizzazione di debug.keystore] in corso
    Note: Some input files use or override a deprecated API.
    Note: Recompile with -Xlint:deprecation for details.

    (the italian part talks about a 14.000 days selfsigned certificate)

  6. I even tried building from Sublime’s menu Build with… -> Android, and it worked: I installed the APK from the /Release folder easily as always (This absolutely did not worked last night!)

Chris, again, last night when I posted the issue nothing worked. Now it works and I did absolutely nothing (no updates, no downloads, no changes to my App, nothing). As said I powered the PC only to do these tests (yes, I did reboot the PC several times last night).

Thank you for your time.