v. 2.5.286.86
WinDev, WebDev and WinDev Mobile consulting
(empty)
Loading...

Let's start by discussing the situation:

- You are development an Android app using WinDev Mobile

- You need a function that is NOT available in wlanguage

- You found some JAVA code that SHOULD do the trick

- After integrating it in a global procedure you have generation error with a message saying ...compileDebugJavaWithJavac - is not incremental...

- You don't really SPEAK JAVA...

 

So, if you are in that situation, this is what's happening. Your java code is using keywords that are part of an Android package (think library) and you need to IMPORT it in your project, so that the generation can succeed... And to do that it is as simple as adding a line before your function saying:

import packagename;

 

The ONLY problem is to find the name of the package... And for that, there is a very handy website page: Go here: https://developer.android.com/reference/packages.html and click on the SEARCH icon.

Now, what do you look for? Let's take an example...

In your JAVA code, you have the line: Activity tmpActivity = getCurrentActivity();

and in your error message, the word Activity is showned as the source of the error. So that's what you are looking for. Type Activity in the search area, and in the results displayed, the first line says: android.app.Activity

So type as the first line of your code:

import android.app.Activity;

When you recreate your app, that error should be gone...

 

So, if you are, like me a total JAVA ignoramus, and you just want to pilfer the JAVA forums for some useful functions, that's how you start...

 

Enjoy