-
Content Count
112 -
Joined
-
Last visited
-
Days Won
1
Posts posted by Ugochukwu Mmaduekwe
-
-
4 minutes ago, Uwe Raabe said:In general, no! Unless, in very specific scenarios, when the number you want to fill the array with consists of four similar bytes (like $04040404).
Well thanks for the answer, I guess I will resort to using a for loop for what I want to achieve.
-
11 minutes ago, Ondrej Kelle said:FillChar expects a byte value as the last paramater. You're filling a memory block with byte value 4 and your results show it (67372036 decimal is $04040404).
Thanks for the explanation.
-
24 minutes ago, Uwe Raabe said:FillChar is a byte oriented method it will fill the underlying memory with the given number of bytes of the given value. Check Sizeof(a) and you will see that it is 24 and not 6. The UINT32 cast has no effect as FillChar will only use the lowest byte of that parameter.
Oh I see, Thanks for replying.
Is it possible for me to use FillChar on arrays of UInt32 properly?
Let's say an equivalent of FillChar that works with array of UInt32 other than using a loop.
-
Hello all, I encountered a weird behaviour of FillChar today.
The Demo below illustrates the bug.
program Project1; {$APPTYPE CONSOLE} {$R *.res} uses SysUtils; procedure PrintArray(const ar: array of UInt32); var i: Int32; begin for i := Low(ar) to High(ar) do begin WriteLn(ar[i]); end; end; var a: array [0 .. 5] of UInt32; begin try { TODO -oUser -cConsole Main : Insert code here } FillChar(a, SizeOf(a), UInt32(4)); PrintArray(a); ReadLn; except on E: Exception do WriteLn(E.ClassName, ': ', E.Message); end; end.
I expected
Quote4
4
4
4
4
4
but got the strange values in the image below.
Any idea what's wrong?
-
Aeroplanes are dangerous, does that mean we don't take flights?
-
25 minutes ago, Dalija Prasnikar said:Could you please report your issue with Java 9 to Quality Portal. Having different Java versions should not be an issue.
-
Thanks all, I finally got it to work. Unfortunately I had to uninstall every other Java version leaving only JDK 1.8_60.
It seems Tokyo only works with JDK 1.8_60.Thanks once again.
-
54 minutes ago, Dave Nottage said:Earlier I said: "You will probably need to change that to the corresponding path for your JDK version 7 (mine is C:\Program Files\Java\jdk1.7.0_80)"
Ok, I just installed JDK 7 ( jdk1.7.0_80 ) and changed the corresponding path as you stated, restarted my PC, same issues,
Am gradually losing my mind here. -
16 minutes ago, Dave Nottage said:Your PATH is still pointing to C:\Program Files\Java\jdk-9.0.1\bin. (it's in the first few lines of the output you provided) This tool makes it easy to change it:
Ok, so I just changed the JDK path from C:\Program Files\Java\jdk-9.0.1\bin to C:\Program Files\Java\jdk1.8.0_60\bin (stock Tokyo version) using the tool you specified (thanks).
Now here is my output tab log, pretty much the same error.QuoteBuild started 11/29/2018 2:03:36 AM.
__________________________________________________
Project "C:\Users\Xor-el\Documents\Embarcadero\Studio\Projects\FMX\Project1.dproj" (Build target(s)):
Target BuildClassesDex:
PATH C:\Program Files\Java\jdk1.8.0_60\bin;C:\Program Files (x86)\Embarcadero\Studio\19.0\bin;C:\Users\Xor-el\Documents\Embarcadero\Studio\19.0\Bpl;C:\Program Files (x86)\Embarcadero\Studio\19.0\bin64;C:\Users\Xor-el\Documents\Embarcadero\Studio\19.0\Bpl\Win64;C:\Program Files (x86)\Embarcadero\Studio\19.0\bin;C:\Users\Public\Documents\Embarcadero\Studio\19.0\Bpl;C:\Program Files (x86)\Embarcadero\Studio\19.0\bin64;C:\Users\Public\Documents\Embarcadero\Studio\19.0\Bpl\Win64;C:\ProgramData\Oracle\Java\javapath;C:\Program Files (x86)\Intel\iCLS Client\;C:\Program Files\Intel\iCLS Client\;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0\;C:\Program Files (x86)\Calibre2\;C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\DAL;C:\Program Files\Intel\Intel(R) Management Engine Components\DAL;C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\IPT;C:\Program Files\Intel\Intel(R) Management Engine Components\IPT;C:\WINDOWS\system32\config\systemprofile\.dnx\bin;C:\Program Files\Microsoft DNX\Dnvm\;C:\Program Files\Microsoft SQL Server\130\Tools\Binn\;C:\ProgramData\ComposerSetup\bin;C:\Program Files\Calibre2\;C:\Program Files\nodejs\;C:\WINDOWS\System32\OpenSSH\;C:\Program Files\Intel\WiFi\bin\;C:\Program Files\Common Files\Intel\WirelessCommon\;C:\Program Files\dotnet\;C:\Program Files\Git\cmd;C:\Program Files\PuTTY\;C:\Users\Xor-el\AppData\Local\Programs\Python\Python36\Scripts\;C:\Users\Xor-el\AppData\Local\Programs\Python\Python36\;C:\Users\Xor-el\AppData\Local\GitHubDesktop\bin;C:\Program Files\Microsoft VS Code\bin;C:\Users\Xor-el\AppData\Local\Microsoft\WindowsApps;C:\xampp\php;C:\Users\Xor-el\AppData\Roaming\Composer\vendor\bin;C:\xampp\mysql\bin;C:\Users\Xor-el\AppData\Roaming\npm;C:\Program Files\Heroku\bin;C:\Program Files\Intel\WiFi\bin\;C:\Program Files\Common Files\Intel\WirelessCommon\;C:\Users\Xor-el\AppData\Local\Programs\Microsoft VS Code\bin; & "C:\Users\Xor-el\Documents\Embarcadero\Studio\19.0\PlatformSDKs\android-sdk-windows\build-tools\28.0.3\dx.bat" --dex --output="C:\Users\Xor-el\Documents\Embarcadero\Studio\Projects\FMX\Android\Release\classes.dex" "c:\program files (x86)\embarcadero\studio\19.0\lib\Android\Release\android-support-v4.dex.jar" "c:\program files (x86)\embarcadero\studio\19.0\lib\Android\Release\cloud-messaging.dex.jar" "c:\program files (x86)\embarcadero\studio\19.0\lib\Android\Release\fmx.dex.jar" "c:\program files (x86)\embarcadero\studio\19.0\lib\Android\Release\google-analytics-v2.dex.jar" "c:\program files (x86)\embarcadero\studio\19.0\lib\Android\Release\google-play-billing.dex.jar" "c:\program files (x86)\embarcadero\studio\19.0\lib\Android\Release\google-play-licensing.dex.jar"
-Djava.ext.dirs=C:\Users\Xor-el\Documents\Embarcadero\Studio\19.0\PlatformSDKs\android-sdk-windows\build-tools\28.0.3\lib is not supported. Use -classpath instead.
Error: Could not create the Java Virtual Machine.
Error: A fatal exception has occurred. Program will exit.
c:\program files (x86)\embarcadero\studio\19.0\bin\CodeGear.Common.Targets(894,5): error MSB3073: The command "PATH C:\Program Files\Java\jdk1.8.0_60\bin;C:\Program Files (x86)\Embarcadero\Studio\19.0\bin;C:\Users\Xor-el\Documents\Embarcadero\Studio\19.0\Bpl;C:\Program Files (x86)\Embarcadero\Studio\19.0\bin64;C:\Users\Xor-el\Documents\Embarcadero\Studio\19.0\Bpl\Win64;C:\Program Files (x86)\Embarcadero\Studio\19.0\bin;C:\Users\Public\Documents\Embarcadero\Studio\19.0\Bpl;C:\Program Files (x86)\Embarcadero\Studio\19.0\bin64;C:\Users\Public\Documents\Embarcadero\Studio\19.0\Bpl\Win64;C:\ProgramData\Oracle\Java\javapath;C:\Program Files (x86)\Intel\iCLS Client\;C:\Program Files\Intel\iCLS Client\;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0\;C:\Program Files (x86)\Calibre2\;C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\DAL;C:\Program Files\Intel\Intel(R) Management Engine Components\DAL;C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\IPT;C:\Program Files\Intel\Intel(R) Management Engine Components\IPT;C:\WINDOWS\system32\config\systemprofile\.dnx\bin;C:\Program Files\Microsoft DNX\Dnvm\;C:\Program Files\Microsoft SQL Server\130\Tools\Binn\;C:\ProgramData\ComposerSetup\bin;C:\Program Files\Calibre2\;C:\Program Files\nodejs\;C:\WINDOWS\System32\OpenSSH\;C:\Program Files\Intel\WiFi\bin\;C:\Program Files\Common Files\Intel\WirelessCommon\;C:\Program Files\dotnet\;C:\Program Files\Git\cmd;C:\Program Files\PuTTY\;C:\Users\Xor-el\AppData\Local\Programs\Python\Python36\Scripts\;C:\Users\Xor-el\AppData\Local\Programs\Python\Python36\;C:\Users\Xor-el\AppData\Local\GitHubDesktop\bin;C:\Program Files\Microsoft VS Code\bin;C:\Users\Xor-el\AppData\Local\Microsoft\WindowsApps;C:\xampp\php;C:\Users\Xor-el\AppData\Roaming\Composer\vendor\bin;C:\xampp\mysql\bin;C:\Users\Xor-el\AppData\Roaming\npm;C:\Program Files\Heroku\bin;C:\Program Files\Intel\WiFi\bin\;C:\Program Files\Common Files\Intel\WirelessCommon\;C:\Users\Xor-el\AppData\Local\Programs\Microsoft VS Code\bin; & "C:\Users\Xor-el\Documents\Embarcadero\Studio\19.0\PlatformSDKs\android-sdk-windows\build-tools\28.0.3\dx.bat" --dex --output="C:\Users\Xor-el\Documents\Embarcadero\Studio\Projects\FMX\Android\Release\classes.dex" "c:\program files (x86)\embarcadero\studio\19.0\lib\Android\Release\android-support-v4.dex.jar" "c:\program files (x86)\embarcadero\studio\19.0\lib\Android\Release\cloud-messaging.dex.jar" "c:\program files (x86)\embarcadero\studio\19.0\lib\Android\Release\fmx.dex.jar" "c:\program files (x86)\embarcadero\studio\19.0\lib\Android\Release\google-analytics-v2.dex.jar" "c:\program files (x86)\embarcadero\studio\19.0\lib\Android\Release\google-play-billing.dex.jar" "c:\program files (x86)\embarcadero\studio\19.0\lib\Android\Release\google-play-licensing.dex.jar" " exited with code 1.
Done building target "BuildClassesDex" in project "Project1.dproj" -- FAILED.
Done building project "Project1.dproj" -- FAILED.
Build FAILED.
c:\program files (x86)\embarcadero\studio\19.0\bin\CodeGear.Common.Targets(894,5): error MSB3073: The command "PATH C:\Program Files\Java\jdk1.8.0_60\bin;C:\Program Files (x86)\Embarcadero\Studio\19.0\bin;C:\Users\Xor-el\Documents\Embarcadero\Studio\19.0\Bpl;C:\Program Files (x86)\Embarcadero\Studio\19.0\bin64;C:\Users\Xor-el\Documents\Embarcadero\Studio\19.0\Bpl\Win64;C:\Program Files (x86)\Embarcadero\Studio\19.0\bin;C:\Users\Public\Documents\Embarcadero\Studio\19.0\Bpl;C:\Program Files (x86)\Embarcadero\Studio\19.0\bin64;C:\Users\Public\Documents\Embarcadero\Studio\19.0\Bpl\Win64;C:\ProgramData\Oracle\Java\javapath;C:\Program Files (x86)\Intel\iCLS Client\;C:\Program Files\Intel\iCLS Client\;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0\;C:\Program Files (x86)\Calibre2\;C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\DAL;C:\Program Files\Intel\Intel(R) Management Engine Components\DAL;C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\IPT;C:\Program Files\Intel\Intel(R) Management Engine Components\IPT;C:\WINDOWS\system32\config\systemprofile\.dnx\bin;C:\Program Files\Microsoft DNX\Dnvm\;C:\Program Files\Microsoft SQL Server\130\Tools\Binn\;C:\ProgramData\ComposerSetup\bin;C:\Program Files\Calibre2\;C:\Program Files\nodejs\;C:\WINDOWS\System32\OpenSSH\;C:\Program Files\Intel\WiFi\bin\;C:\Program Files\Common Files\Intel\WirelessCommon\;C:\Program Files\dotnet\;C:\Program Files\Git\cmd;C:\Program Files\PuTTY\;C:\Users\Xor-el\AppData\Local\Programs\Python\Python36\Scripts\;C:\Users\Xor-el\AppData\Local\Programs\Python\Python36\;C:\Users\Xor-el\AppData\Local\GitHubDesktop\bin;C:\Program Files\Microsoft VS Code\bin;C:\Users\Xor-el\AppData\Local\Microsoft\WindowsApps;C:\xampp\php;C:\Users\Xor-el\AppData\Roaming\Composer\vendor\bin;C:\xampp\mysql\bin;C:\Users\Xor-el\AppData\Roaming\npm;C:\Program Files\Heroku\bin;C:\Program Files\Intel\WiFi\bin\;C:\Program Files\Common Files\Intel\WirelessCommon\;C:\Users\Xor-el\AppData\Local\Programs\Microsoft VS Code\bin; & "C:\Users\Xor-el\Documents\Embarcadero\Studio\19.0\PlatformSDKs\android-sdk-windows\build-tools\28.0.3\dx.bat" --dex --output="C:\Users\Xor-el\Documents\Embarcadero\Studio\Projects\FMX\Android\Release\classes.dex" "c:\program files (x86)\embarcadero\studio\19.0\lib\Android\Release\android-support-v4.dex.jar" "c:\program files (x86)\embarcadero\studio\19.0\lib\Android\Release\cloud-messaging.dex.jar" "c:\program files (x86)\embarcadero\studio\19.0\lib\Android\Release\fmx.dex.jar" "c:\program files (x86)\embarcadero\studio\19.0\lib\Android\Release\google-analytics-v2.dex.jar" "c:\program files (x86)\embarcadero\studio\19.0\lib\Android\Release\google-play-billing.dex.jar" "c:\program files (x86)\embarcadero\studio\19.0\lib\Android\Release\google-play-licensing.dex.jar" " exited with code 1.
0 Warning(s)
1 Error(s)
Time Elapsed 00:00:01.59 -
9 minutes ago, Dave Nottage said:Your PATH is still pointing to C:\Program Files\Java\jdk-9.0.1\bin. (it's in the first few lines of the output you provided) This tool makes it easy to change it:
Do you mean Delphi Tokyo 10.2.3 can't use JDK 9?
My Tokyo came with jdk1.8.0_60, should I change my path to this (jdk1.8.0_60)?
-
55 minutes ago, Dave Nottage said:That's not strange; you can have a base SDK that started from 25.x.x and add later platforms and build tools using the Android SDK Manager, which is exactly what I've done on my systems.
If you analyze the message, you will see that it can be a problem with the command that follows the ampersand (&), i.e. the one that starts with:
"C:\Users\Xor-el\Documents\Embarcadero\Studio\19.0\PlatformSDKs\android-sdk-windows\build-tools\28.0.3\dx.bat"
If you check the Output tab of the messages window, it has more detail about the error. It's likely to be that dex is failing, and is likely to be because of a JDK mismatch. I see you have in your path:
C:\Program Files\Java\jdk-9.0.1\bin
You will probably need to change that to the corresponding path for your JDK version 7 (mine is C:\Program Files\Java\jdk1.7.0_80)Thanks for replying.
Have done as you said, unfortunately, no progress.
below is my output tab log.
it's saying something about could not create the java virtual machine, have restarted my PC countless times to no avail, uninstalled and reinstalled the JDK multiple times too.
if I run java -version in cmd, I getjava version "9.0.1"
Java(TM) SE Runtime Environment (build 9.0.1+11)
Java HotSpot(TM) 64-Bit Server VM (build 9.0.1+11, mixed mode)
The annoying thing is that everything was working fine about 2 days ago.QuoteBuild started 11/29/2018 1:21:33 AM.
__________________________________________________
Project "C:\Users\Xor-el\Documents\Embarcadero\Studio\Projects\FMX\Project1.dproj" (Build target(s)):
Target BuildClassesDex:
PATH C:\Program Files\Java\jdk-9.0.1\bin;C:\Program Files (x86)\Embarcadero\Studio\19.0\bin;C:\Users\Xor-el\Documents\Embarcadero\Studio\19.0\Bpl;C:\Program Files (x86)\Embarcadero\Studio\19.0\bin64;C:\Users\Xor-el\Documents\Embarcadero\Studio\19.0\Bpl\Win64;C:\Program Files (x86)\Embarcadero\Studio\19.0\bin;C:\Users\Public\Documents\Embarcadero\Studio\19.0\Bpl;C:\Program Files (x86)\Embarcadero\Studio\19.0\bin64;C:\Users\Public\Documents\Embarcadero\Studio\19.0\Bpl\Win64;C:\ProgramData\Oracle\Java\javapath;C:\Program Files (x86)\Intel\iCLS Client\;C:\Program Files\Intel\iCLS Client\;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0\;C:\Program Files (x86)\Calibre2\;C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\DAL;C:\Program Files\Intel\Intel(R) Management Engine Components\DAL;C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\IPT;C:\Program Files\Intel\Intel(R) Management Engine Components\IPT;C:\WINDOWS\system32\config\systemprofile\.dnx\bin;C:\Program Files\Microsoft DNX\Dnvm\;C:\Program Files\Microsoft SQL Server\130\Tools\Binn\;C:\ProgramData\ComposerSetup\bin;C:\Program Files\Calibre2\;C:\Program Files\nodejs\;C:\WINDOWS\System32\OpenSSH\;C:\Program Files\Intel\WiFi\bin\;C:\Program Files\Common Files\Intel\WirelessCommon\;C:\Program Files\dotnet\;C:\Program Files\Git\cmd;C:\Program Files\PuTTY\;C:\Users\Xor-el\AppData\Local\Programs\Python\Python36\Scripts\;C:\Users\Xor-el\AppData\Local\Programs\Python\Python36\;C:\Users\Xor-el\AppData\Local\GitHubDesktop\bin;C:\Program Files\Microsoft VS Code\bin;C:\Users\Xor-el\AppData\Local\Microsoft\WindowsApps;C:\xampp\php;C:\Users\Xor-el\AppData\Roaming\Composer\vendor\bin;C:\xampp\mysql\bin;C:\Users\Xor-el\AppData\Roaming\npm;C:\Program Files\Heroku\bin;C:\Program Files\Intel\WiFi\bin\;C:\Program Files\Common Files\Intel\WirelessCommon\;C:\Users\Xor-el\AppData\Local\Programs\Microsoft VS Code\bin; & "C:\Users\Xor-el\Documents\Embarcadero\Studio\19.0\PlatformSDKs\android-sdk-windows\build-tools\28.0.3\dx.bat" --dex --output="C:\Users\Xor-el\Documents\Embarcadero\Studio\Projects\FMX\Android\Release\classes.dex" "c:\program files (x86)\embarcadero\studio\19.0\lib\Android\Release\android-support-v4.dex.jar" "c:\program files (x86)\embarcadero\studio\19.0\lib\Android\Release\cloud-messaging.dex.jar" "c:\program files (x86)\embarcadero\studio\19.0\lib\Android\Release\fmx.dex.jar" "c:\program files (x86)\embarcadero\studio\19.0\lib\Android\Release\google-analytics-v2.dex.jar" "c:\program files (x86)\embarcadero\studio\19.0\lib\Android\Release\google-play-billing.dex.jar" "c:\program files (x86)\embarcadero\studio\19.0\lib\Android\Release\google-play-licensing.dex.jar"
Error: Could not create the Java Virtual Machine.
Error: A fatal exception has occurred. Program will exit.
-Djava.ext.dirs=C:\Users\Xor-el\Documents\Embarcadero\Studio\19.0\PlatformSDKs\android-sdk-windows\build-tools\28.0.3\lib is not supported. Use -classpath instead.
c:\program files (x86)\embarcadero\studio\19.0\bin\CodeGear.Common.Targets(894,5): error MSB3073: The command "PATH C:\Program Files\Java\jdk-9.0.1\bin;C:\Program Files (x86)\Embarcadero\Studio\19.0\bin;C:\Users\Xor-el\Documents\Embarcadero\Studio\19.0\Bpl;C:\Program Files (x86)\Embarcadero\Studio\19.0\bin64;C:\Users\Xor-el\Documents\Embarcadero\Studio\19.0\Bpl\Win64;C:\Program Files (x86)\Embarcadero\Studio\19.0\bin;C:\Users\Public\Documents\Embarcadero\Studio\19.0\Bpl;C:\Program Files (x86)\Embarcadero\Studio\19.0\bin64;C:\Users\Public\Documents\Embarcadero\Studio\19.0\Bpl\Win64;C:\ProgramData\Oracle\Java\javapath;C:\Program Files (x86)\Intel\iCLS Client\;C:\Program Files\Intel\iCLS Client\;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0\;C:\Program Files (x86)\Calibre2\;C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\DAL;C:\Program Files\Intel\Intel(R) Management Engine Components\DAL;C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\IPT;C:\Program Files\Intel\Intel(R) Management Engine Components\IPT;C:\WINDOWS\system32\config\systemprofile\.dnx\bin;C:\Program Files\Microsoft DNX\Dnvm\;C:\Program Files\Microsoft SQL Server\130\Tools\Binn\;C:\ProgramData\ComposerSetup\bin;C:\Program Files\Calibre2\;C:\Program Files\nodejs\;C:\WINDOWS\System32\OpenSSH\;C:\Program Files\Intel\WiFi\bin\;C:\Program Files\Common Files\Intel\WirelessCommon\;C:\Program Files\dotnet\;C:\Program Files\Git\cmd;C:\Program Files\PuTTY\;C:\Users\Xor-el\AppData\Local\Programs\Python\Python36\Scripts\;C:\Users\Xor-el\AppData\Local\Programs\Python\Python36\;C:\Users\Xor-el\AppData\Local\GitHubDesktop\bin;C:\Program Files\Microsoft VS Code\bin;C:\Users\Xor-el\AppData\Local\Microsoft\WindowsApps;C:\xampp\php;C:\Users\Xor-el\AppData\Roaming\Composer\vendor\bin;C:\xampp\mysql\bin;C:\Users\Xor-el\AppData\Roaming\npm;C:\Program Files\Heroku\bin;C:\Program Files\Intel\WiFi\bin\;C:\Program Files\Common Files\Intel\WirelessCommon\;C:\Users\Xor-el\AppData\Local\Programs\Microsoft VS Code\bin; & "C:\Users\Xor-el\Documents\Embarcadero\Studio\19.0\PlatformSDKs\android-sdk-windows\build-tools\28.0.3\dx.bat" --dex --output="C:\Users\Xor-el\Documents\Embarcadero\Studio\Projects\FMX\Android\Release\classes.dex" "c:\program files (x86)\embarcadero\studio\19.0\lib\Android\Release\android-support-v4.dex.jar" "c:\program files (x86)\embarcadero\studio\19.0\lib\Android\Release\cloud-messaging.dex.jar" "c:\program files (x86)\embarcadero\studio\19.0\lib\Android\Release\fmx.dex.jar" "c:\program files (x86)\embarcadero\studio\19.0\lib\Android\Release\google-analytics-v2.dex.jar" "c:\program files (x86)\embarcadero\studio\19.0\lib\Android\Release\google-play-billing.dex.jar" "c:\program files (x86)\embarcadero\studio\19.0\lib\Android\Release\google-play-licensing.dex.jar" " exited with code 1.
Done building target "BuildClassesDex" in project "Project1.dproj" -- FAILED.
Done building project "Project1.dproj" -- FAILED.
Build FAILED.
c:\program files (x86)\embarcadero\studio\19.0\bin\CodeGear.Common.Targets(894,5): error MSB3073: The command "PATH C:\Program Files\Java\jdk-9.0.1\bin;C:\Program Files (x86)\Embarcadero\Studio\19.0\bin;C:\Users\Xor-el\Documents\Embarcadero\Studio\19.0\Bpl;C:\Program Files (x86)\Embarcadero\Studio\19.0\bin64;C:\Users\Xor-el\Documents\Embarcadero\Studio\19.0\Bpl\Win64;C:\Program Files (x86)\Embarcadero\Studio\19.0\bin;C:\Users\Public\Documents\Embarcadero\Studio\19.0\Bpl;C:\Program Files (x86)\Embarcadero\Studio\19.0\bin64;C:\Users\Public\Documents\Embarcadero\Studio\19.0\Bpl\Win64;C:\ProgramData\Oracle\Java\javapath;C:\Program Files (x86)\Intel\iCLS Client\;C:\Program Files\Intel\iCLS Client\;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0\;C:\Program Files (x86)\Calibre2\;C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\DAL;C:\Program Files\Intel\Intel(R) Management Engine Components\DAL;C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\IPT;C:\Program Files\Intel\Intel(R) Management Engine Components\IPT;C:\WINDOWS\system32\config\systemprofile\.dnx\bin;C:\Program Files\Microsoft DNX\Dnvm\;C:\Program Files\Microsoft SQL Server\130\Tools\Binn\;C:\ProgramData\ComposerSetup\bin;C:\Program Files\Calibre2\;C:\Program Files\nodejs\;C:\WINDOWS\System32\OpenSSH\;C:\Program Files\Intel\WiFi\bin\;C:\Program Files\Common Files\Intel\WirelessCommon\;C:\Program Files\dotnet\;C:\Program Files\Git\cmd;C:\Program Files\PuTTY\;C:\Users\Xor-el\AppData\Local\Programs\Python\Python36\Scripts\;C:\Users\Xor-el\AppData\Local\Programs\Python\Python36\;C:\Users\Xor-el\AppData\Local\GitHubDesktop\bin;C:\Program Files\Microsoft VS Code\bin;C:\Users\Xor-el\AppData\Local\Microsoft\WindowsApps;C:\xampp\php;C:\Users\Xor-el\AppData\Roaming\Composer\vendor\bin;C:\xampp\mysql\bin;C:\Users\Xor-el\AppData\Roaming\npm;C:\Program Files\Heroku\bin;C:\Program Files\Intel\WiFi\bin\;C:\Program Files\Common Files\Intel\WirelessCommon\;C:\Users\Xor-el\AppData\Local\Programs\Microsoft VS Code\bin; & "C:\Users\Xor-el\Documents\Embarcadero\Studio\19.0\PlatformSDKs\android-sdk-windows\build-tools\28.0.3\dx.bat" --dex --output="C:\Users\Xor-el\Documents\Embarcadero\Studio\Projects\FMX\Android\Release\classes.dex" "c:\program files (x86)\embarcadero\studio\19.0\lib\Android\Release\android-support-v4.dex.jar" "c:\program files (x86)\embarcadero\studio\19.0\lib\Android\Release\cloud-messaging.dex.jar" "c:\program files (x86)\embarcadero\studio\19.0\lib\Android\Release\fmx.dex.jar" "c:\program files (x86)\embarcadero\studio\19.0\lib\Android\Release\google-analytics-v2.dex.jar" "c:\program files (x86)\embarcadero\studio\19.0\lib\Android\Release\google-play-billing.dex.jar" "c:\program files (x86)\embarcadero\studio\19.0\lib\Android\Release\google-play-licensing.dex.jar" " exited with code 1.
0 Warning(s)
1 Error(s)
Time Elapsed 00:00:01.31 -
53 minutes ago, Dalija Prasnikar said:Sorry. There was some other thing but I don't remember exactly.
One thing that also does sound strange in your config is that you have selected platform-28 and it says Android SDK 25..x.x
no problems.
about the config, it worked fine that way before the upgrade.
-
-
Hi all,
So I recently upgraded my Android SDK Version to 25.2.5 from 24.3.3 (the stock version in Tokyo).
I also updated my JDK version from JDK 1.8U60 ( the Tokyo stock version) to 9.0.1 because I needed to use IntellijIDEA and my problem started.
My Android FMX projects refuses to compile, I have even tried a blank form yet I get the error belowQuote[Exec Error] The command "PATH C:\Program Files\Java\jdk-9.0.1\bin;C:\Program Files (x86)\Embarcadero\Studio\19.0\bin;C:\Users\Xor-el\Documents\Embarcadero\Studio\19.0\Bpl;C:\Program Files (x86)\Embarcadero\Studio\19.0\bin64;C:\Users\Xor-el\Documents\Embarcadero\Studio\19.0\Bpl\Win64;C:\Program Files (x86)\Embarcadero\Studio\19.0\bin;C:\Users\Public\Documents\Embarcadero\Studio\19.0\Bpl;C:\Program Files (x86)\Embarcadero\Studio\19.0\bin64;C:\Users\Public\Documents\Embarcadero\Studio\19.0\Bpl\Win64;C:\ProgramData\Oracle\Java\javapath;C:\Program Files (x86)\Intel\iCLS Client\;C:\Program Files\Intel\iCLS Client\;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0\;C:\Program Files (x86)\Calibre2\;C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\DAL;C:\Program Files\Intel\Intel(R) Management Engine Components\DAL;C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\IPT;C:\Program Files\Intel\Intel(R) Management Engine Components\IPT;C:\WINDOWS\system32\config\systemprofile\.dnx\bin;C:\Program Files\Microsoft DNX\Dnvm\;C:\Program Files\Microsoft SQL Server\130\Tools\Binn\;C:\ProgramData\ComposerSetup\bin;C:\Program Files\Calibre2\;C:\Program Files\nodejs\;C:\WINDOWS\System32\OpenSSH\;C:\Program Files\Intel\WiFi\bin\;C:\Program Files\Common Files\Intel\WirelessCommon\;C:\Program Files\dotnet\;C:\Program Files\Git\cmd;C:\Program Files\PuTTY\;C:\Users\Xor-el\AppData\Local\Programs\Python\Python36\Scripts\;C:\Users\Xor-el\AppData\Local\Programs\Python\Python36\;C:\Users\Xor-el\AppData\Local\GitHubDesktop\bin;C:\Program Files\Microsoft VS Code\bin;C:\Users\Xor-el\AppData\Local\Microsoft\WindowsApps;C:\xampp\php;C:\Users\Xor-el\AppData\Roaming\Composer\vendor\bin;C:\xampp\mysql\bin;C:\Users\Xor-el\AppData\Roaming\npm;C:\Program Files\Heroku\bin;C:\Program Files\Intel\WiFi\bin\;C:\Program Files\Common Files\Intel\WirelessCommon\;C:\Users\Xor-el\AppData\Local\Programs\Microsoft VS Code\bin; & "C:\Users\Xor-el\Documents\Embarcadero\Studio\19.0\PlatformSDKs\android-sdk-windows\build-tools\28.0.3\dx.bat" --dex --output="C:\Users\Xor-el\Documents\Embarcadero\Studio\Projects\FMXAndroid\Android\Debug\classes.dex" "c:\program files (x86)\embarcadero\studio\19.0\lib\Android\Debug\android-support-v4.dex.jar" "c:\program files (x86)\embarcadero\studio\19.0\lib\Android\Debug\cloud-messaging.dex.jar" "c:\program files (x86)\embarcadero\studio\19.0\lib\Android\Debug\fmx.dex.jar" "c:\program files (x86)\embarcadero\studio\19.0\lib\Android\Debug\google-analytics-v2.dex.jar" "c:\program files (x86)\embarcadero\studio\19.0\lib\Android\Debug\google-play-billing.dex.jar" "c:\program files (x86)\embarcadero\studio\19.0\lib\Android\Debug\google-play-licensing.dex.jar" "c:\program files (x86)\embarcadero\studio\19.0\lib\Android\Debug\google-play-services-ads-7.0.0.dex.jar" "c:\program files (x86)\embarcadero\studio\19.0\lib\Android\Debug\google-play-services-analytics-7.0.0.dex.jar" "c:\program files (x86)\embarcadero\studio\19.0\lib\Android\Debug\google-play-services-base-7.0.0.dex.jar" "c:\program files (x86)\embarcadero\studio\19.0\lib\Android\Debug\google-play-services-gcm-7.0.0.dex.jar" "c:\program files (x86)\embarcadero\studio\19.0\lib\Android\Debug\google-play-services-identity-7.0.0.dex.jar" "c:\program files (x86)\embarcadero\studio\19.0\lib\Android\Debug\google-play-services-maps-7.0.0.dex.jar" "c:\program files (x86)\embarcadero\studio\19.0\lib\Android\Debug\google-play-services-panorama-7.0.0.dex.jar" "c:\program files (x86)\embarcadero\studio\19.0\lib\Android\Debug\google-play-services-plus-7.0.0.dex.jar" "c:\program files (x86)\embarcadero\studio\19.0\lib\Android\Debug\google-play-services-wallet-7.0.0.dex.jar" " exited with code 1.
The annoying thing is that my Window Path contains the path to the JDK
System Environment VariableQuoteC:\Program Files\Java\jdk-9.0.1\bin;C:\Program Files (x86)\Embarcadero\Studio\19.0\bin;C:\Users\Xor-el\Documents\Embarcadero\Studio\19.0\Bpl;C:\Program Files (x86)\Embarcadero\Studio\19.0\bin64;C:\Users\Xor-el\Documents\Embarcadero\Studio\19.0\Bpl\Win64;C:\Program Files (x86)\Embarcadero\Studio\19.0\bin;C:\Users\Public\Documents\Embarcadero\Studio\19.0\Bpl;C:\Program Files (x86)\Embarcadero\Studio\19.0\bin64;C:\Users\Public\Documents\Embarcadero\Studio\19.0\Bpl\Win64;C:\ProgramData\Oracle\Java\javapath;C:\Program Files (x86)\Intel\iCLS Client\;C:\Program Files\Intel\iCLS Client\;%SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System32\Wbem;%SYSTEMROOT%\System32\WindowsPowerShell\v1.0\;C:\Program Files (x86)\Calibre2\;C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\DAL;C:\Program Files\Intel\Intel(R) Management Engine Components\DAL;C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\IPT;C:\Program Files\Intel\Intel(R) Management Engine Components\IPT;%USERPROFILE%\.dnx\bin;C:\Program Files\Microsoft DNX\Dnvm\;C:\Program Files\Microsoft SQL Server\130\Tools\Binn\;C:\ProgramData\ComposerSetup\bin;C:\Program Files\Calibre2\;C:\Program Files\nodejs\;%SYSTEMROOT%\System32\OpenSSH\;C:\Program Files\Intel\WiFi\bin\;C:\Program Files\Common Files\Intel\WirelessCommon\;C:\Program Files\dotnet\;C:\Program Files\Git\cmd;C:\Program Files\PuTTY\;
Any help is appreciated, I have been stuck on this for over 12 hours now and have tried everything I could see on the internet (stackoverflow) yet no progress.
Screenshots of MY SDK Settings are attached below
-
14 minutes ago, Cristian Peța said:It can brake reference counting only if you move() to string.
When you only move() from string the string is not affected in any way. Move() doesn't change the source.
Thanks a lot for the explanation.
-
8 minutes ago, Schokohase said:Option 1
uses System.SysUtils; class function TUtilities.StringToCharArray(const S: String) : TCharArray; begin Result := S.ToCharArray(); end;
Option 2 (found at System.SysUtils.TStringHelper.ToCharArray)
class function TUtilities.StringToCharArray(const S: String) : TCharArray; begin SetLength(Result, Length(S)); Move(PChar(PChar(S))^, Result[0], Length(S) * SizeOf(Char)); end;
Thanks but am trying to avoid the string helper functions, I also want to avoid using *move* on strings because I heard some time back that it breaks reference counting on strings.
-
26 minutes ago, Kryvich said:function StringToCharArray(const S: string): TCharArray; begin PChar(Result) := PChar(S); end;
Oddly enough, this seems to work.
Another function in my arsenal.
Thanks.
-
43 minutes ago, KodeZwerg said:This should be SetLength(Result, Length(S) * SizeOf( AnsiChar ) );
program Project1; {$APPTYPE CONSOLE} {$R *.res} uses System.SysUtils; function MyStringToMyCharArray( const S: String ): TCharArray; begin SetLength(Result, Length(S) * SizeOf( AnsiChar ) ); if Length( S ) > 0 then begin StrPLCopy( PChar( Result ), S, Length( Result ) ); end; end; var S: String; C: TCharArray; I: Integer; begin try { TODO -oUser -cConsole Main : Insert code here } S := 'My Test String'; C := MyStringToMyCharArray( S ); for i := 0 to Length( C ) -1 do write( c[ i ] ); writeln; readln; except on E: Exception do Writeln(E.ClassName, ': ', E.Message); end; end.
This will give the same access violation as the previous one if you run it multiple times in a loop.
The +1 space for the null terminator still applies.
-
35 minutes ago, Schokohase said:You should try this
class function TUtilities.StringToCharArray(const S: String) : TCharArray; begin System.SetLength(Result, System.Length(S)); if System.Length(S) > 0 then begin StrPLCopy(PChar(Result), S, System.Length(Result)); end; end;
unfortunately, this did not work, but thanks either way.
-
5 hours ago, Attila Kovacs said:it's in the help
Note: Dest should point to a location with room for MaxLen + 1 characters, including the null terminator.
too bad that the compiler can't detect the out of range
Thanks a lot, this did solve the problem.
-
Hi all,
I wrote a simple function to help me convert a string to an array of char but I keep getting random occurring access violations.
class function TUtilities.StringToCharArray(const S: String) : TCharArray; begin if System.Length(S) > 0 then begin System.SetLength(Result, System.Length(S)); StrPLCopy(PChar(Result), S, System.Length(Result)); end; end;
Anyone know the cause?
Thanks. -
It did work beautifully for me.
May be it has been resolved or am just lucky.
-
QuoteQRCodeGenLib4Pascal is a simple to use Delphi/FPC QRCode Generator. It provides an easy to use interface for generating QR Codes.
GitHub Repository
QRCodeGenLib4PascalI know most of you are already aware of this but I just wanted to indicate that I recently just added *experimental* FMX Support and if everything goes well, I plan to merge it to the official repository.
I will appreciate it if you all can help me test support in other supported Firemonkey platforms, I have just been able to test on only the Windows Platform and it seems to work fine.
FMX Branch can be found here
Instructions on how to Compile the Library for FMX can be found in the FMX Branch README.
Thanks.
- 1
- 3
-
9 minutes ago, Kryvich said:@Ugochukwu Mmaduekwe OK Put FMX.Types to the top of the uses clause of your project file.
thanks for the help but I have already found another way round the issue.
either I use the method proposed by @Uwe Raabe above or I enable a define in my include file when I want to compile for FMX.
I think these options looks cleaner.
CrossPlatform uPnP solutions for Delphi
in Network, Cloud and Web
Posted
As the title implies, any suggestions please.