|
FORUMS PROFESSIONNELS WINDEV, WEBDEV et WINDEV Mobile |
| | | | | |
V25 090F - Erreur de generation Android: "cannot find symbol" |
Débuté par Peter Holemans (BE), 13 avr. 2021 11:40 - 4 réponses |
| |
| | | |
|
| |
Membre enregistré 123 messages Popularité : +7 (9 votes) |
|
Posté le 13 avril 2021 - 11:40 |
Bonjour
J'essaie de générer une application Android mais je reçois les erreurs suivantes qui viennent d'un appel ArraySeek()/TableauCherche() il me semble (Variable "Idx")...
Quelqu'un a une idée?
Failure creating the Android application named .
Command line: "C:\Program Files\Java\jdk1.8.0_172\bin\java.exe" -Duser.dir="C:\WX Projects\My Projects\PIXJDEMobileOrchestration\Android\gen" "-Dorg.gradle.appname=C:\WX Projects\My Projects\PIXJDEMobileOrchestration\Android\gen" -classpath "C:\WX\WinDev25\Personal\Android\Gradle\lib\gradle-launcher-5.4.1.jar" org.gradle.launcher.GradleMain assembleRelease -b "C:\WX Projects\My Projects\PIXJDEMobileOrchestration\Android\gen\build.gradle"
Error returned: :compileReleaseJavaWithJavac FAILED C:\WX Projects\My Projects\PIXJDEMobileOrchestration\Android\gen\src\eu\pixontri\pixjdemobileorchestration\wdgen\GWDCoJDEdwardsREST.java:4479: error: cannot find symbol if(vWD_idx.opSup(0)) ^ symbol: variable vWD_idx location: class GWDCoJDEdwardsREST C:\WX Projects\My Projects\PIXJDEMobileOrchestration\Android\gen\src\eu\pixontri\pixjdemobileorchestration\wdgen\GWDCoJDEdwardsREST.java:4482: error: cannot find symbol vWD_JDEMO.setValeur(mWD_WXJDEMediaObjectList.checkType(GWDCoJDEMediaObjectList.class).mWD_list.get(vWD_idx)); ^ symbol: variable vWD_idx location: class GWDCoJDEdwardsREST C:\WX Projects\My Projects\PIXJDEMobileOrchestration\Android\gen\src\eu\pixontri\pixjdemobileorchestration\wdgen\GWDCoJDEdwardsREST.java:4520: error: cannot find symbol if(vWD_idx.opSup(0)) ^ symbol: variable vWD_idx location: class GWDCoJDEdwardsREST C:\WX Projects\My Projects\PIXJDEMobileOrchestration\Android\gen\src\eu\pixontri\pixjdemobileorchestration\wdgen\GWDCoJDEdwardsREST.java:4523: error: cannot find symbol mWD_WXJDEMediaObjectList.checkType(GWDCoJDEMediaObjectList.class).mWD_list.get(vWD_idx).setValeur(vWD_JDEMO); ^ symbol: variable vWD_idx location: class GWDCoJDEdwardsREST C:\WX Projects\My Projects\PIXJDEMobileOrchestration\Android\gen\src\eu\pixontri\pixjdemobileorchestration\wdgen\GWDCoJDEdwardsREST.java:4837: error: cannot find symbol if(vWD_idx.opSup(0)) ^ symbol: variable vWD_idx location: class GWDCoJDEdwardsREST C:\WX Projects\My Projects\PIXJDEMobileOrchestration\Android\gen\src\eu\pixontri\pixjdemobileorchestration\wdgen\GWDCoJDEdwardsREST.java:4840: error: cannot find symbol vWD_JDEMO.setValeur(mWD_WXJDEMediaObjectList.checkType(GWDCoJDEMediaObjectList.class).mWD_list.get(vWD_idx)); ^ symbol: variable vWD_idx location: class GWDCoJDEdwardsREST C:\WX Projects\My Projects\PIXJDEMobileOrchestration\Android\gen\src\eu\pixontri\pixjdemobileorchestration\wdgen\GWDCoJDEdwardsREST.java:4902: error: cannot find symbol if(vWD_idx.opSup(0)) ^ symbol: variable vWD_idx location: class GWDCoJDEdwardsREST C:\WX Projects\My Projects\PIXJDEMobileOrchestration\Android\gen\src\eu\pixontri\pixjdemobileorchestration\wdgen\GWDCoJDEdwardsREST.java:4905: error: cannot find symbol mWD_WXJDEMediaObjectList.checkType(GWDCoJDEMediaObjectList.class).mWD_list.get(vWD_idx).setValeur(vWD_JDEMO); ^ symbol: variable vWD_idx location: class GWDCoJDEdwardsREST C:\WX Projects\My Projects\PIXJDEMobileOrchestration\Android\gen\src\eu\pixontri\pixjdemobileorchestration\wdgen\GWDCoJDEdwardsREST.java:5131: error: cannot find symbol if(vWD_idx.opSup(0)) ^ symbol: variable vWD_idx location: class GWDCoJDEdwardsREST C:\WX Projects\My Projects\PIXJDEMobileOrchestration\Android\gen\src\eu\pixontri\pixjdemobileorchestration\wdgen\GWDCoJDEdwardsREST.java:5134: error: cannot find symbol vWD_JDEMO.setValeur(mWD_WXJDEMediaObjectList.checkType(GWDCoJDEMediaObjectList.class).mWD_list.get(vWD_idx)); ^ symbol: variable vWD_idx location: class GWDCoJDEdwardsREST C:\WX Projects\My Projects\PIXJDEMobileOrchestration\Android\gen\src\eu\pixontri\pixjdemobileorchestration\wdgen\GWDCoJDEdwardsREST.java:5172: error: cannot find symbol if(vWD_idx.opSup(0)) ^ symbol: variable vWD_idx location: class GWDCoJDEdwardsREST C:\WX Projects\My Projects\PIXJDEMobileOrchestration\Android\gen\src\eu\pixontri\pixjdemobileorchestration\wdgen\GWDCoJDEdwardsREST.java:5175: error: cannot find symbol mWD_WXJDEMediaObjectList.checkType(GWDCoJDEMediaObjectList.class).mWD_list.get(vWD_idx).setValeur(vWD_JDEMO); ^ symbol: variable vWD_idx location: class GWDCoJDEdwardsREST C:\WX Projects\My Projects\PIXJDEMobileOrchestration\Android\gen\src\eu\pixontri\pixjdemobileorchestration\wdgen\GWDCoJDEdwardsREST.java:5487: error: cannot find symbol if(vWD_idx.opSup(0)) ^ symbol: variable vWD_idx location: class GWDCoJDEdwardsREST C:\WX Projects\My Projects\PIXJDEMobileOrchestration\Android\gen\src\eu\pixontri\pixjdemobileorchestration\wdgen\GWDCoJDEdwardsREST.java:5490: error: cannot find symbol vWD_JDEMO.setValeur(mWD_WXJDEMediaObjectList.checkType(GWDCoJDEMediaObjectList.class).mWD_list.get(vWD_idx)); ^ symbol: variable vWD_idx location: class GWDCoJDEdwardsREST C:\WX Projects\My Projects\PIXJDEMobileOrchestration\Android\gen\src\eu\pixontri\pixjdemobileorchestration\wdgen\GWDCoJDEdwardsREST.java:5552: error: cannot find symbol if(vWD_idx.opSup(0)) ^ symbol: variable vWD_idx location: class GWDCoJDEdwardsREST C:\WX Projects\My Projects\PIXJDEMobileOrchestration\Android\gen\src\eu\pixontri\pixjdemobileorchestration\wdgen\GWDCoJDEdwardsREST.java:5555: error: cannot find symbol mWD_WXJDEMediaObjectList.checkType(GWDCoJDEMediaObjectList.class).mWD_list.get(vWD_idx).setValeur(vWD_JDEMO); ^ symbol: variable vWD_idx location: class GWDCoJDEdwardsREST Note: Some input files use unchecked or unsafe operations. Note: Recompile with -Xlint:unchecked for details. 16 errors
FAILURE: Build failed with an exception.
* What went wrong: Execution failed for task ':compileReleaseJavaWithJavac'. Compilation failed; see the compiler error output for details.
* Try: Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
* Get more help at https://help.gradle.org
BUILD FAILED in 11s 10 actionable tasks: 6 executed, 4 up-to-date
-- Peter Holemans www.mcs2.eu www.pixontri.eu |
| |
| |
| | | |
|
| | |
| |
Membre enregistré 123 messages Popularité : +7 (9 votes) |
|
Posté le 14 avril 2021 - 09:13 |
Le soucis a été identifié. Une requête auprès le ST a été ouvert: ST/G061174
Le problème est que on ne peut pas utiliser une variable déclaré dans une section <COMPILE SI> même si cela devrait fonctionner (et fonctionne depuis le simulateur et pour toute autre plateforme cible).
Le cas:
<Compile IF ConfigurationType=Android> Idx is system int = WXJDEMediaObjectList.list.Seek(asLinearFirst,"moStructure;moKey;moSequence",pMOStructure,pMOKey,pMOSequence) <ELSE> Idx is system int = WXJDEMediaObjectList.list.Seek(tccIgnoreCase+tccIgnoreInsideSpace+tccIgnoreAccent+tccIgnoreSpace+asLinearFirst,"moStructure;moKey;moSequence",pMOStructure,pMOKey,pMOSequence) <END> IF Idx > 0 THEN JDEMO = WXJDEMediaObjectList.list[Idx] ELSE JDEMO.moStructure = pMOStructure JDEMO.moKey = pMOKey JDEMO.moSequence = pMOSequence JDEMO.moType = 0 END
Idx is system int <Compile IF ConfigurationType=Android> Idx = WXJDEMediaObjectList.list.Seek(asLinearFirst,"moStructure;moKey;moSequence",pMOStructure,pMOKey,pMOSequence) <ELSE> Idx = WXJDEMediaObjectList.list.Seek(tccIgnoreCase+tccIgnoreInsideSpace+tccIgnoreAccent+tccIgnoreSpace+asLinearFirst,"moStructure;moKey;moSequence",pMOStructure,pMOKey,pMOSequence) <END> IF Idx > 0 THEN JDEMO = WXJDEMediaObjectList.list[Idx] ELSE JDEMO.moStructure = pMOStructure JDEMO.moKey = pMOKey JDEMO.moSequence = pMOSequence JDEMO.moType = 0 END
-- Peter Holemans www.mcs2.eu www.pixontri.eu |
| |
| |
| | | |
|
| | |
| |
Membre enregistré 123 messages Popularité : +7 (9 votes) |
|
Posté le 14 avril 2021 - 09:18 |
Les <COMPILE SI...> ne sont pas affichés dans le code ci-dessus. Voilà en mode "Texte".
//### GENERATES ERRORS UPON GENERATION ### //--> Try to generate an Android app with a variable declaration (Idx) in a preprocessor compilation block and use it the statements after. //E.g.:
Idx is system int = WXJDEMediaObjectList.list.Seek(asLinearFirst,"moStructure;moKey;moSequence",pMOStructure,pMOKey,pMOSequence)
Idx is system int = WXJDEMediaObjectList.list.Seek(tccIgnoreCase+tccIgnoreInsideSpace+tccIgnoreAccent+tccIgnoreSpace+asLinearFirst,"moStructure;moKey;moSequence",pMOStructure,pMOKey,pMOSequence)
IF Idx > 0 THEN JDEMO = WXJDEMediaObjectList.list[Idx] ELSE JDEMO.moStructure = pMOStructure JDEMO.moKey = pMOKey JDEMO.moSequence = pMOSequence JDEMO.moType = 0 END
//### DOESN'T GENERATE ERRORS UPON GENERATION ### //Next move the declaration of the Idx variable outside of the block and notice how it generates correctly. //E.g.
Idx is system int
Idx = WXJDEMediaObjectList.list.Seek(asLinearFirst,"moStructure;moKey;moSequence",pMOStructure,pMOKey,pMOSequence)
Idx = WXJDEMediaObjectList.list.Seek(tccIgnoreCase+tccIgnoreInsideSpace+tccIgnoreAccent+tccIgnoreSpace+asLinearFirst,"moStructure;moKey;moSequence",pMOStructure,pMOKey,pMOSequence)
IF Idx > 0 THEN JDEMO = WXJDEMediaObjectList.list[Idx] ELSE JDEMO.moStructure = pMOStructure JDEMO.moKey = pMOKey JDEMO.moSequence = pMOSequence JDEMO.moType = 0 END
-- Peter Holemans www.mcs2.eu www.pixontri.eu |
| |
| |
| | | |
|
| | |
| |
Membre enregistré 123 messages Popularité : +7 (9 votes) |
|
Posté le 14 avril 2021 - 09:20 |
Même en mode texte cela ne fonctionne pas ci-dessus... Alors en brute: //### GENERATES ERRORS UPON GENERATION ### //--> Try to generate an Android app with a variable declaration (Idx) in a preprocessor compilation block and use it the statements after. //E.g.: <COMPILE IF ConfigurationType=Android> Idx is system int = WXJDEMediaObjectList.list.Seek(asLinearFirst,"moStructure;moKey;moSequence",pMOStructure,pMOKey,pMOSequence) <ELSE> Idx is system int = WXJDEMediaObjectList.list.Seek(tccIgnoreCase+tccIgnoreInsideSpace+tccIgnoreAccent+tccIgnoreSpace+asLinearFirst,"moStructure;moKey;moSequence",pMOStructure,pMOKey,pMOSequence) <END> IF Idx > 0 THEN JDEMO = WXJDEMediaObjectList.list[Idx] ELSE JDEMO.moStructure = pMOStructure JDEMO.moKey = pMOKey JDEMO.moSequence = pMOSequence JDEMO.moType = 0 END
//### DOESN'T GENERATE ERRORS UPON GENERATION ### //Next move the declaration of the Idx variable outside of the block and notice how it generates correctly. //E.g.
Idx is system int <COMPILE IF ConfigurationType=Android> Idx = WXJDEMediaObjectList.list.Seek(asLinearFirst,"moStructure;moKey;moSequence",pMOStructure,pMOKey,pMOSequence) <ELSE> Idx = WXJDEMediaObjectList.list.Seek(tccIgnoreCase+tccIgnoreInsideSpace+tccIgnoreAccent+tccIgnoreSpace+asLinearFirst,"moStructure;moKey;moSequence",pMOStructure,pMOKey,pMOSequence) <END> IF Idx > 0 THEN JDEMO = WXJDEMediaObjectList.list[Idx] ELSE JDEMO.moStructure = pMOStructure JDEMO.moKey = pMOKey JDEMO.moSequence = pMOSequence JDEMO.moType = 0 END
-- Peter Holemans www.mcs2.eu www.pixontri.eu |
| |
| |
| | | |
|
| | |
| |
Membre enregistré 81 messages Popularité : +7 (7 votes) |
|
Posté le 14 avril 2021 - 19:13 |
Merci pour partage |
| |
| |
| | | |
|
| | | | |
| | |
| | |
| |
|
|
|