Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
Home » Developing U++ » Android » Android Builder (Android Builder failed to build for android. Javac file not found error is occuring.)
icon5.gif  Android Builder [message #57359] Mon, 19 July 2021 09:00 Go to next message
rapidUser is currently offline  rapidUser
Messages: 2
Registered: July 2021
Junior Member
while am trying to build AndroidHello example project from the distribution upp-win-15947.7z found at sourcefourge.net,

I am getting following error:
-------------------------------
Compiling java sources...
javac: file not found: D:\Installed\upp\out\examples\Android_Builder.Debug.Linux.No blitz.Posix\Sandbox\AndroidMath\AndroidProject\java\AndroidM ath\Vector.java

Usage: javac <options> <source files>
use -help for a list of possible options

There were errors. (0:01.42)
-------------------------------

I have configured the android builder as shown in the attachement pics


I have seen somewhere in the upp help that current android sdk only support jdk 7
should I install jdk 1.7.x or this is a error in theIDE.

I also tried creating new package but the same error is persist. The editor and ovarall ide is good enough. But Editor would be even
better if auto-complete and codefolding is made available with current line background. The tutorial and example are also well sufficient
but lack of common information such as (how to configure other compilers ?), (can i build .upp projects with other ide such as code::block and how? if yes.) for newcomers like me.

I know AndroidBuilder is experimental but i tried because many at the forum claims to successfully build simple android demo.
I want to know if i can build for android or not, till now.
Re: Android Builder [message #57379 is a reply to message #57359] Sun, 25 July 2021 19:01 Go to previous messageGo to next message
Klugier is currently offline  Klugier
Messages: 1075
Registered: September 2012
Location: Poland, Kraków
Senior Contributor
Hello RapidUser,

At the begging I would like to thank you for your report.

I made several fixes to AndroidBuilder in order to support JDK grate than 8. Right now it should work fine with all versions above 8. 7 is no longer supported. I tested on JDK 16 and it works as expected. Please try tomorrows (2021-07-26) nightly build. Also, I updated the documentation, however not everything is changed. Right now you need to download Android Studio and make configuration basing on it. Downloading SDK separately is no longer supported.

For some reason the path you are referring to is invalid:
D:\Installed\upp\out\examples\Android_Builder.Debug.Linux.No blitz.Posix\Sandbox\AndroidMath\AndroidProject\java\AndroidM ath\Vector.java // <- Yours
D:\Installed\upp\out\examples\Android_Builder.Debug.Linux.No blitz.Posix\Sandbox\AndroidMath\AndroidProject\java\AndroidMath\Vector.java // <- Valid (AndroidMath should be together without space)

Right now, I did not have opportunity to test this on Windows and it might be platform specific bug, however on Linux everything works as expected. I will try to test Windows version soon.

Here is my build method from Linux that compiles examples/AndroidMath (anroid-30 platform version is for Android 11 and the produced apk will be valid for that system and above):
index.php?t=getfile&id=6480&private=0

Klugier


U++ - one framework to rule them all.

[Updated on: Sun, 25 July 2021 19:05]

Report message to a moderator

Re: Android Builder [message #57435 is a reply to message #57379] Tue, 10 August 2021 04:00 Go to previous messageGo to next message
rapidUser is currently offline  rapidUser
Messages: 2
Registered: July 2021
Junior Member
Hi !, Sorry for not responding on time as I did not expected such a quick reply from you.Thanks a lot for reply.
I am from Nepal so I'm sorry for my bad English.
The space you are pointing between Android and Math is because of copy and pasting, this is not the matter.

I tried downloading the nightly build from your given link and found nothing different in the android builder.
I also downloaded all (lastest i.e. r31) sdk components from AndroidStudio (first-run) setup wizard and error still the same.
I am using windows 10 pro.

I have following things installed and working well in the AndroidStudio.
1. jdk_1.8.0 (path variable is also properly set and working)
2. Android_SDK (with following components)
i. Android SDK Tools (revision: 26.1.1)
ii. Android SDK Platform 31 (revision: 1)
iii. Android SDK Platform-Tools (revision: 31.0.3)
iv. Android SDK Build-Tools 31 (revision: 31.0.0)
v. Android Support Repository (revision: 47.0.0)
vi. Google Repository (revision: 58)
vii. SDK Patch Applier v4 (revision: 1)
viii. Android Emulator (revision: 30.7.5)
ix. Intel x86 Emulator Accelerator (revision: 7.6.5)
3. Android_NDK_r21b

I keep my directory on my own way but I'm 100% sure that there is not space in any of directory.
I think you are not getting me correctly the main problem is that javac.exe is expecting java files in the respective
out directory. I also tried mannually copying files to the expected path but it is getting deleted automatically and returns same error.

Here is my console output with [Be Verbose Enabled]. Sorry for spaces duty to copy and pasting.
D:\Files\apps\Installed\jdk1.8.0\bin\javac.exe -version
D:\Files\apps\Installed\jdk1.8.0\bin\javac.exe -version
Exitcode: 0
----- AndroidMathUtility ( ANDROID POSIX LINUX ANDROID ) (1 / 2)
cd C:\Users\Rijwan\Desktop\upp-win-16056\examples\AndroidMathUtility
D:\Files\apps\Installed\jdk1.8.0\bin\javac.exe -version
D:\Files\apps\Installed\jdk1.8.0\bin\javac.exe -version
Exitcode: 0
----- AndroidMath ( MAIN ANDROID POSIX LINUX ANDROID ) (2 / 2)
cd C:\Users\Rijwan\Desktop\upp-win-16056\examples\AndroidMath
C:\Users\Rijwan\Desktop\upp-win16056\out\examples\AndroidMath\Android.Linux.Main.Posix\Sandbox\AndroidMath\AndroidProject\java\.
C:\Users\Rijwan\Desktop\upp-win-16056\out\examples\AndroidMath\Android.Linux.Main.Posix\Sandbox\AndroidMath\AndroidProject\java\..
Building Android Project
-----
Compiling java sources...
D:\Files\apps\Installed\jdk1.8.0\bin\javac.exe -g:none -d C:\Users\Rijwan\Desktop\upp-win-16056\out\examples\AndroidMath\Android.Linux.Main.Posix\Sandbox\AndroidMath\AndroidProject\classes -classpath D:\WorkSpace\SDKs\SDK\platforms\android-29\android.jar;C:\Users\Rijwan\Desktop\upp-win-16056\out\examples\AndroidMath\Android.Linux.Main.Posix\Sandbox\AndroidMath\AndroidProject\build -sourcepath C:\Users\Rijwan\Desktop\upp-win-16056\out\examples\AndroidMath\Android.Linux.Main.Posix\Sandbox\AndroidMath\AndroidProject\java C:\Users\Rijwan\Desktop\upp-win-16056\out\examples\AndroidMath\Android.Linux.Main.Posix\Sandbox\AndroidMath\AndroidProject\java\AndroidMath\Vector.java C:\Users\Rijwan\Desktop\upp-win-16056\out\examples\AndroidMath\Android.Linux.Main.Posix\Sandbox\AndroidMath\AndroidProject\java\AndroidMath\AndroidMath.java C:\Users\Rijwan\Desktop\upp-win-16056\out\examples\AndroidMath\Android.Linux.Main.Posix\Sandbox\AndroidMath\AndroidProject\java\AndroidMath\AndroidMathActivity.java
D:\Files\apps\Installed\jdk1.8.0\bin\javac.exe -g:none -d C:\Users\Rijwan\Desktop\upp-win-16056\out\examples\AndroidMath\Android.Linux.Main.Posix\Sandbox\AndroidMath\AndroidProject\classes -classpath D:\WorkSpace\SDKs\SDK\platforms\android-29\android.jar;C:\Users\Rijwan\Desktop\upp-win-16056\out\examples\AndroidMath\Android.Linux.Main.Posix\Sandbox\AndroidMath\AndroidProject\build -sourcepath C:\Users\Rijwan\Desktop\upp-win-16056\out\examples\AndroidMath\Android.Linux.Main.Posix\Sandbox\AndroidMath\AndroidProject\java C:\Users\Rijwan\Desktop\upp-win-16056\out\examples\AndroidMath\Android.Linux.Main.Posix\Sandbox\AndroidMath\AndroidProject\java\AndroidMath\Vector.java C:\Users\Rijwan\Desktop\upp-win-16056\out\examples\AndroidMath\Android.Linux.Main.Posix\Sandbox\AndroidMath\AndroidProject\java\AndroidMath\AndroidMath.java C:\Users\Rijwan\Desktop\upp-win-16056\out\examples\AndroidMath\Android.Linux.Main.Posix\Sandbox\AndroidMath\AndroidProject\java\AndroidMath\AndroidMathActivity.java
Error executing D:\Files\apps\Installed\jdk1.8.0\bin\javac.exe -g:none -d C:\Users\Rijwan\Desktop\upp-win-16056\out\examples\AndroidMath\Android.Linux.Main.Posix\Sandbox\AndroidMath\AndroidProject\classes -classpath D:\WorkSpace\SDKs\SDK\platforms\android-29\android.jar;C:\Users\Rijwan\Desktop\upp-win-16056\out\examples\AndroidMath\Android.Linux.Main.Posix\Sandbox\AndroidMath\AndroidProject\build -sourcepath C:\Users\Rijwan\Desktop\upp-win-16056\out\examples\AndroidMath\Android.Linux.Main.Posix\Sandbox\AndroidMath\AndroidProject\java C:\Users\Rijwan\Desktop\upp-win-16056\out\examples\AndroidMath\Android.Linux.Main.Posix\Sandbox\AndroidMath\AndroidProject\java\AndroidMath\Vector.java C:\Users\Rijwan\Desktop\upp-win-16056\out\examples\AndroidMath\Android.Linux.Main.Posix\Sandbox\AndroidMath\AndroidProject\java\AndroidMath\AndroidMath.java C:\Users\Rijwan\Desktop\upp-win-16056\out\examples\AndroidMath\Android.Linux.Main.Posix\Sandbox\AndroidMath\AndroidProject\java\AndroidMath\AndroidMathActivity.java
Exitcode: 2
javac: file not found: C:\Users\Rijwan\Desktop\upp-win-16056\out\examples\AndroidMath\Android.Linux.Main.Posix\Sandbox\AndroidMath\AndroidProject\java\AndroidMath\Vector.java
Usage: javac <options> <source files>
use -help for a list of possible options


There were errors. (0:01.56)
D:\Files\apps\Installed\jdk1.8.0\bin\javac.exe -version
D:\Files\apps\Installed\jdk1.8.0\bin\javac.exe -version
Exitcode: 0


Ultimate++ is far better than others like wxWidgets in my perspective. It gives complete native looks and feels. For example the black theme in Windows 10 also working while wxWidgets only support default
white theme.
All I want from you is
1. Test it in Windows OS
2. Explain me the build process. I mean andorid studio currently use gradle-build, do i need specific version of gradle ?
3. If it working on Windows, provide me the link and specify versions of all tools required to build for android from theIDE.
4. If none of above is possible, I am happy with windows. Kindly tell me how much effort (is possible ?) is needed to port existing desktop application to Android when theIDE is ready.
  • Attachment: OS.png
    (Size: 16.82KB, Downloaded 119 times)
Re: Android Builder [message #59213 is a reply to message #57435] Sun, 27 November 2022 18:16 Go to previous messageGo to next message
Kees is currently offline  Kees
Messages: 2
Registered: November 2022
Junior Member
Hi rapidUser,

Did you ever get this working? I am having the same error. I think building an Android app was never tested under Windows as this looks like a wrong path reference in the software.
Re: Android Builder [message #59214 is a reply to message #57435] Sun, 27 November 2022 18:22 Go to previous messageGo to next message
Kees is currently offline  Kees
Messages: 2
Registered: November 2022
Junior Member
Hi rapidUser,

I get the same error while trying to build an Android app. I suspect this procedure was never tested under Windows as this looks like a wrong path reference in the software. Did you ever get it working? If so, please let me know what needs to be done to solve this error.

Kees
Re: Android Builder [message #59221 is a reply to message #59214] Mon, 28 November 2022 00:34 Go to previous message
Klugier is currently offline  Klugier
Messages: 1075
Registered: September 2012
Location: Poland, Kraków
Senior Contributor
Hello Kess,

I finally managed to find the problem and fix it. By accident on Windows before compilation we deleted all Java files moved to Sandbox directory. It happened because of using GetFodler() we used GetDirectory() instead. More information you can find in this commit. You can check with tomorrows (28th of November) nightly builds.

In the context of Windows, I didn't have time to test the Android builder on that platform in the past. The development took place on POSIX platform and especially LINUX.

Thanks for raising this concern, without your message I wouldn't be motivated enough to fix it Wink However, please remember that Android builder is experimental technology. Even if you compile the exemplary code and run app on your phoneit will be prof of concept. There is no U++ UI code compatible with Android, yet.

Klugier


U++ - one framework to rule them all.

[Updated on: Mon, 28 November 2022 00:35]

Report message to a moderator

Previous Topic: Android GUI with ultimate
Next Topic: Android Builder updated to 2022 stack
Goto Forum:
  


Current Time: Thu Mar 28 16:33:14 CET 2024

Total time taken to generate the page: 0.01274 seconds