optimized dex. Error at B4A 1.90.

Amalkotey

Active Member
Licensed User
Longtime User
Hello,

after I b4a 1.90 tested, I converted my projects after B4A 1.90. Now, my projects are no longer compiled and created. I get following message and terminates the process.

B4X:
Compiling code.                         0.27
Compiling layouts code.                 0.03
Generating R file.                      0.00
Compiling generated Java code.          3.14
Convert byte code - optimized dex.      Error
Process timed out.
You can change the timeout value under Tools - IDE Options.   Standard dexer.

After I a complete restart of my systems have done, I then compile. A second attempt I get again then the message and the process is canceled. Why is that? Is there a way to convert the activities back in the version 1.80.

Thanks for the help in advance.

-Amalkotey-
 
Last edited:

Amalkotey

Active Member
Licensed User
Longtime User
@margret: I have set up the timeout value to 120.

@Erel: It is unabhängi which project is compiled. The error message is published in both the debug and release. The error appears sporadically.

-Amalkotey-
 
Upvote 0

klaus

Expert
Licensed User
Longtime User
Is there a way to convert the activities back in the version 1.80.
If you haven't used any new 1.90 function you can read the program with v1.80 without any problem.
You get a message that the code is from a new version but it is loaded.

Best regards.
V
 
Upvote 0

Amalkotey

Active Member
Licensed User
Longtime User
Now comes the error in "Packaging Files", after I had peace some time:

B4X:
Compiling code.                         0.19
Compiling layouts code.                 0.00
Generating R file.                      1.01
Compiling generated Java code.          2.59
Convert byte code - optimized dex.      0.87
Packaging files.                        Error
Process timed out.
You can change the timeout value under Tools - IDE Options.

-Amalkotey-
 
Upvote 0

margret

Well-Known Member
Licensed User
Longtime User
I have had a few times that things like this has happened. What I did to fix it is listed below. Be sure if you have created or added you own files in these paths to not delete any of your needed files.

I would first go to my project folder and then the Objects folder. Delete all files in the Objects folder. Delete the bin folder. Delete the gen folder. Delete the src folder. Change into the res folder and delete the layout & xml folder. Now, reload your project in B4A and try to compile.

This has worked each and every time this has happened to me in my projects, which has been 3 or 4 times. Hope it helps.
 
Upvote 0

Amalkotey

Active Member
Licensed User
Longtime User
I would first go to my project folder and then the Objects folder. Delete all files in the Objects folder. Delete the bin folder. Delete the gen folder. Delete the src folder. Change into the res folder and delete the layout & xml folder. Now, reload your project in B4A and try to compile.

I do this as well. So that I can delete this folder, I have to reboot every time the system, because a lock on it. This is not professional and productive. Since I don't know the cause, it is problematic to find a clean and fast solution for this problem. A hobbyists not comes clear so perhaps but a programmer, which works according to request of customer. It seems that the locking on the file "classes.dex" is located. If I knew which program or DLL is connected, I could also delete this file.

-Amalkotey-
 
Last edited:
Upvote 0

margret

Well-Known Member
Licensed User
Longtime User
You may of just found your issue. If you have to reboot each time because there is a lock on the directory, this is most likely the cause of B4A giving the error. You should be able to delete anything I listed without rebooting as long as you don't have that project open or loaded in B4A when you are trying to delete them.
 
Last edited:
Upvote 0

Amalkotey

Active Member
Licensed User
Longtime User
You may of just found your issue. If you have to reboot each time because there is a lock on the directory, this is most likely the cause of B4A giving the error. You should be able to delete anything I listed without rebooting as long as you don't have that project open or loaded in B4A when you are trying to delete them.

I have tested all this measure. In Windows, the problem may consist, that if a process has exited, still stay a DLL in memory and a dilapidated write protection on the file or folder is not lifted. The main process is closed, there is no way to stop this at Windows. Since Windows7 no longer knows entry "AlwaysUnloadDll" in "HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Explorer", DLL's are also not immediately terminated. Add also a manual not work, because the key is ignored.

I have my firewall KIS yesterday by KIS-2011 on KIS-2012 updated. Since the compiler goes through clean. Let's see whether it will remain so.

-Amalkotey-
 
Upvote 0

DarkAngel

Member
Licensed User
Longtime User
Hello,

I'm having this issue since I upgrade to b4a v5:

"B4A version: 5.02 (1)
Parsing code. (0.12s)
Running custom action. (0.24s)
Compiling code. (0.23s)
Compiling layouts code. (0.13s)
Generating R file. (0.88s)
Compiling generated Java code. (6.50s)
Convert byte code - optimized dex. Error
Process timed out.
You can change the timeout value under Tools - IDE Options."


I already changed the timeout to 120, the memory to 1024. But still I get this error.

Any idea what's causing this?

Thank you.
 
Upvote 0

AndrewJay

New Member
I am having problems loading the emulator. I am running Window 8 on a tablet and keep coming up with the following error shown in the uploaded image. Still using Evaluation Version so probably a week left to test so urgent to get this sorted. Much appreciated and look forward to sharing some kool code with you all. Andrew J
emulator error.jpg
 
Upvote 0

Gunther

Active Member
Licensed User
Longtime User
I had a lot of the time outs as well after I upgraded the Java to 1.8_45. CPU load raised to 100% during the work of the Dexter. Memory usage was 500-900k for Java.
I reverted back to 1.7_80 and the problems were gone.
The CPU load remains below 80% all the time during compilation.
So, may be an issue of the Java version!?
 
Upvote 0

DarkAngel

Member
Licensed User
Longtime User
Have you recently added a library that depends on Google Play Services? Try to disable the optimized dexer in the ini file.
Hi Erel,

I have a Google Play Service library, but was already there before update to BA4 5.02.
I already turned off optimized dex, and still have the same error.

The library I'm using is Google Play Maps, but was working before.

Can't compile the app, and don't now how to solve this...
 
Upvote 0
Top