FAQ #19901, published on 2020-03-30
Dealing with "error: package android.support.v4.content does not exist" in WINDEV MOBILE 25

Starting with version version 250083H, when generating an Android application with WINDEV Mobile 25, the generated applications include the support of AndroidX recommended by Google. 

If your application uses native Java code, with libraries that are not compatible with AndroidX, the generation may fail with the following return : 


:compileReleaseJavaWithJavac
error: package android.support.v4.content does not exist
import android.support.v4.content.ContextCompat;
error: cannot find symbol
Task :compileReleaseJavaWithJavac FAILED
FAILURE: Build failed with an exception.


The package names causing errors usually start with "android.support".

In order to compile without error, the existing native code must be adapted to be compatible with AndroidX. It is mainly a question of modifying the "import".

The following page shows how to replace the old classes with the matching ones suited for AndroidX : 


https://developer.android.com/jetpack/androidx/migrate/class-mappings