Welcome! Log In Create A New Profile

Advanced

WM Android Generation with JAR 3rd party class

Posted by StefanoG 
StefanoG
WM Android Generation with JAR 3rd party class
November 01, 2018 02:18PM
Hi, I'm quite new to Windev Mobile (20, no Graddle).

I'm trying to compile a project including a 3rd party class for barcode scanner manager, delivered by the device's manufacturer.

I followed the WM guides for using 3rd party Java classes: creation of Java (static) procedures, inclusion of the jar in apk generation, etc.

The first time I run the generation procedure it's ok: i get my .apk
The first time "C:\My Mobile Projects\TestAndroidJava\Android\Generation" folder is empty.
From now, any further recompile o generation fails, saying something about "R.layout.activity... cannot find symbol".

The only way I found (randomly) to regenerate the apk is deleting by hand the "C:\My Mobile Projects\TestAndroidJava\Android\Generation\bin" folder, each team before apk generation. It seems weird to me, I'm missing something for sure.
Another option is excluding the java set of procedure from the configuration but it means not using the JAR, absurd.

In addiction, if I want to have a window in the project (obvious) I need to
1) delete \Generation\bin
2) include the JAVA procedure in configuration and not the window
3) make a generation
4) inlude also the window in the configuration
5) delete \Generation\bin
6) make the second generation
This is the only way to complete the APK generation with both JAVA 3rd party class and a window in the configuration. Foolish.

What am I doing wrong? Is it something related to AndroidManifest, namespaces, or packages?
Thanks.


IT FOLLOWS the error i get:

Failure creating the Android application named <C:\My Mobile Projects\TestAndroidJava\Exe\TestAndroidJava.apk>.


Command Line: "C:\Program Files (x86)\Java\jdk1.8.0_60\bin\javac.exe" -encoding UTF-8 -nowarn -source 1.5 -target 1.5 -d bin\classes -bootclasspath "C:\Program Files (x86)\Android\android-sdk\platforms\android-23\android.jar" gen\com\mycompany\testandroidjava\*.java src\com\mycompany\testandroidjava\wdgen\*.java -classpath "libs;bin\classes;libs\android-support-v4.jar;libs\EdaScan.jar"


Error returned:
src\com\mycompany\testandroidjava\wdgen\GWDCPCOL_Java.java:100: error: cannot find symbol
setContentView(R.layout.activity_barcode);
^
symbol: variable layout
location: class R
src\com\mycompany\testandroidjava\wdgen\GWDCPCOL_Java.java:148: error: cannot find symbol
barcodeList = (ListView) findViewById(R.id.listViewBarcodeData);
^
symbol: variable id
location: class R
src\com\mycompany\testandroidjava\wdgen\GWDCPCOL_Java.java:238: error: cannot find symbol
setContentView(R.layout.activity_barcode);
^
symbol: variable layout
location: class R
src\com\mycompany\testandroidjava\wdgen\GWDCPCOL_Java.java:286: error: cannot find symbol
barcodeList = (ListView) findViewById(R.id.listViewBarcodeData);
^
symbol: variable id
location: class R
src\com\mycompany\testandroidjava\wdgen\GWDCPCOL_Java.java:399: error: cannot find symbol
setContentView(R.layout.activity_main);
^
symbol: variable layout
location: class R
src\com\mycompany\testandroidjava\wdgen\GWDCPCOL_Java.java:423: error: cannot find symbol
getMenuInflater().inflate(R.menu.activity_main, menu);
^
symbol: variable menu
location: class R
src\com\mycompany\testandroidjava\wdgen\GWDCPCOL_Java.java:435: error: cannot find symbol
btnAutomaticBarcode = (Button) findViewById(R.id.buttonAutomaticBarcode);
^
symbol: variable id
location: class R
src\com\mycompany\testandroidjava\wdgen\GWDCPCOL_Java.java:445: error: cannot find symbol
btnClientBarcode = (Button) findViewById(R.id.buttonClientBarcode);
^
symbol: variable id
location: class R
src\com\mycompany\testandroidjava\wdgen\GWDCPCOL_Java.java:455: error: cannot find symbol
btnScannerSelectBarcode = (Button) findViewById(R.id.buttonScannerSelectBarcode);
^
symbol: variable id
location: class R
src\com\mycompany\testandroidjava\wdgen\GWDCPCOL_Java.java:510: error: cannot find symbol
setContentView(R.layout.activity_selection_barcode);
^
symbol: variable layout
location: class R
src\com\mycompany\testandroidjava\wdgen\GWDCPCOL_Java.java:513: error: cannot find symbol
barcodeList = (ListView) findViewById(R.id.listViewBarcodeData);
^
symbol: variable id
location: class R
src\com\mycompany\testandroidjava\wdgen\GWDCPCOL_Java.java:515: error: cannot find symbol
mSwitchScannersButton = (Button) findViewById(R.id.buttonSwitchScanners);
^
symbol: variable id
location: class R
src\com\mycompany\testandroidjava\wdgen\GWDCPCOL_Java.java:668: error: cannot find symbol
scannerSelectDialog.setContentView(R.layout.scanner_select_dialog);
^
symbol: variable layout
location: class R
src\com\mycompany\testandroidjava\wdgen\GWDCPCOL_Java.java:670: error: cannot find symbol
.findViewById(R.id.dialogButtonOK);
^
symbol: variable id
location: class R
src\com\mycompany\testandroidjava\wdgen\GWDCPCOL_Java.java:682: error: cannot find symbol
.findViewById(R.id.listScanners);
^
symbol: variable id
location: class R
15 errors
Author:

Your Email:


Subject:


Spam prevention:
Please, enter the code that you see below in the input field. This is for blocking bots that try to post this form automatically. If the code is hard to read, then just try to guess it right. If you enter the wrong code, a new image is created and you get another chance to enter it right.
Message: