Android Question A new installation with errors

acorrias

Member
Licensed User
Longtime User
Hi
I need some help. I got a new personal computer with win 8.1 (my previous one was based on win xp)

I reinstalled b4A after the install of java (\jdk1.8.0_66) and android sdk (\android-23). I'm getting errors trying to compile previous app that worked well under windows xp and my previuos setup.
Consider that I copied previous library content in the new one, in order to have b4a working well with all libraries I used previously.

I get this error:

B4A version: 5.50
Parsing code. (0.00s)
Compiling code. (0.01s)
Compiling layouts code. (0.00s)
Generating R file. (0.15s)
Compiling debugger engine code. (0.49s)
Compiling generated Java code. (0.60s)
Convert byte code - optimized dex. Error
UNEXPECTED TOP-LEVEL EXCEPTION:
java.lang.NullPointerException
at com.android.dx.cf.direct.ClassPathOpener.processDirectory(ClassPathOpener.java:217)
at com.android.dx.cf.direct.ClassPathOpener.processOne(ClassPathOpener.java:158)
at com.android.dx.cf.direct.ClassPathOpener.process(ClassPathOpener.java:144)
at com.android.dx.command.dexer.Main.processOne(Main.java:672)
at com.android.dx.command.dexer.Main.processAllFiles(Main.java:574)
at com.android.dx.command.dexer.Main.runMonoDex(Main.java:311)
at com.android.dx.command.dexer.Main.run(Main.java:277)
at com.android.dx.command.dexer.Main.main(Main.java:245)
at com.android.dx.command.Main.main(Main.java:106)
UNEXPECTED TOP-LEVEL EXCEPTION:
java.lang.NullPointerException
at com.android.dx.cf.direct.ClassPathOpener.processDirectory(ClassPathOpener.java:217)
at com.android.dx.cf.direct.ClassPathOpener.processOne(ClassPathOpener.java:158)
at com.android.dx.cf.direct.ClassPathOpener.process(ClassPathOpener.java:144)
at com.android.dx.command.dexer.Main.processOne(Main.java:672)
at com.android.dx.command.dexer.Main.processAllFiles(Main.java:574)
at com.android.dx.command.dexer.Main.runMonoDex(Main.java:311)
at com.android.dx.command.dexer.Main.run(Main.java:277)
at com.android.dx.command.dexer.Main.main(Main.java:245)
at com.android.dx.command.Main.main(Main.java:106)
UNEXPECTED TOP-LEVEL EXCEPTION:
java.lang.NullPointerException
at com.android.dx.cf.direct.ClassPathOpener.processDirectory(ClassPathOpener.java:217)
at com.android.dx.cf.direct.ClassPathOpener.processOne(ClassPathOpener.java:158)
at com.android.dx.cf.direct.ClassPathOpener.process(ClassPathOpener.java:144)
at com.android.dx.command.dexer.Main.processOne(Main.java:672)
at com.android.dx.command.dexer.Main.processAllFiles(Main.java:574)
at com.android.dx.command.dexer.Main.runMonoDex(Main.java:311)
at com.android.dx.command.dexer.Main.run(Main.java:277)
at com.android.dx.command.dexer.Main.main(Main.java:245)
at com.android.dx.command.Main.main(Main.java:106)
UNEXPECTED TOP-LEVEL EXCEPTION:
java.lang.NullPointerException
at com.android.dx.cf.direct.ClassPathOpener.processDirectory(ClassPathOpener.java:217)
at com.android.dx.cf.direct.ClassPathOpener.processOne(ClassPathOpener.java:158)
at com.android.dx.cf.direct.ClassPathOpener.process(ClassPathOpener.java:144)
at com.android.dx.command.dexer.Main.processOne(Main.java:672)
at com.android.dx.command.dexer.Main.processAllFiles(Main.java:574)
at com.android.dx.command.dexer.Main.runMonoDex(Main.java:311)
at com.android.dx.command.dexer.Main.run(Main.java:277)
at com.android.dx.command.dexer.Main.main(Main.java:245)
at com.android.dx.command.Main.main(Main.java:106)
4 errors; aborting


with a diffent source I got this error.

B4A version: 5.50
Parsing code. (0.00s)
Compiling code. (0.01s)
Compiling layouts code. (0.00s)
Generating R file. (1.17s)
Compiling debugger engine code. (0.51s)
Compiling generated Java code. (0.59s)
Convert byte code - optimized dex. Error
UNEXPECTED TOP-LEVEL EXCEPTION:
java.lang.NullPointerException
at com.android.dx.cf.direct.ClassPathOpener.processDirectory(ClassPathOpener.java:217)
at com.android.dx.cf.direct.ClassPathOpener.processOne(ClassPathOpener.java:158)
at com.android.dx.cf.direct.ClassPathOpener.process(ClassPathOpener.java:144)
at com.android.dx.command.dexer.Main.processOne(Main.java:672)
at com.android.dx.command.dexer.Main.processAllFiles(Main.java:574)
at com.android.dx.command.dexer.Main.runMonoDex(Main.java:311)
at com.android.dx.command.dexer.Main.run(Main.java:277)
at com.android.dx.command.dexer.Main.main(Main.java:245)
at com.android.dx.command.Main.main(Main.java:106)
UNEXPECTED TOP-LEVEL EXCEPTION:
java.lang.NullPointerException
at com.android.dx.cf.direct.ClassPathOpener.processDirectory(ClassPathOpener.java:217)
at com.android.dx.cf.direct.ClassPathOpener.processOne(ClassPathOpener.java:158)
at com.android.dx.cf.direct.ClassPathOpener.process(ClassPathOpener.java:144)
at com.android.dx.command.dexer.Main.processOne(Main.java:672)
at com.android.dx.command.dexer.Main.processAllFiles(Main.java:574)
at com.android.dx.command.dexer.Main.runMonoDex(Main.java:311)
at com.android.dx.command.dexer.Main.run(Main.java:277)
at com.android.dx.command.dexer.Main.main(Main.java:245)
at com.android.dx.command.Main.main(Main.java:106)
UNEXPECTED TOP-LEVEL EXCEPTION:
java.lang.NullPointerException
at com.android.dx.cf.direct.ClassPathOpener.processDirectory(ClassPathOpener.java:217)
at com.android.dx.cf.direct.ClassPathOpener.processOne(ClassPathOpener.java:158)
at com.android.dx.cf.direct.ClassPathOpener.process(ClassPathOpener.java:144)
at com.android.dx.command.dexer.Main.processOne(Main.java:672)
at com.android.dx.command.dexer.Main.processAllFiles(Main.java:574)
at com.android.dx.command.dexer.Main.runMonoDex(Main.java:311)
at com.android.dx.command.dexer.Main.run(Main.java:277)
at com.android.dx.command.dexer.Main.main(Main.java:245)
at com.android.dx.command.Main.main(Main.java:106)
UNEXPECTED TOP-LEVEL EXCEPTION:
java.lang.NullPointerException
at com.android.dx.cf.direct.ClassPathOpener.processDirectory(ClassPathOpener.java:217)
at com.android.dx.cf.direct.ClassPathOpener.processOne(ClassPathOpener.java:158)
at com.android.dx.cf.direct.ClassPathOpener.process(ClassPathOpener.java:144)
at com.android.dx.command.dexer.Main.processOne(Main.java:672)
at com.android.dx.command.dexer.Main.processAllFiles(Main.java:574)
at com.android.dx.command.dexer.Main.runMonoDex(Main.java:311)
at com.android.dx.command.dexer.Main.run(Main.java:277)
at com.android.dx.command.dexer.Main.main(Main.java:245)
at com.android.dx.command.Main.main(Main.java:106)
4 errors; aborting


I considered the advice to install android under a folder whose path hasn't space in the string name (since I read something in the forum). So I installed java, android sdk and b4a under c:\programmi (the italian name of program name folder).
But I'm not sure that c:\programmi, as appears from Windows 8.1 gui, is the syntax renaming of an internal folder called "program files" (as realized from some debug activity); in this manner the errors are dued to the space in the folder name, I suppose.

But I need to be sure that the only workaround is to install b4a and android in a c:\new_dir folder.
Please could you give me some advices in order to let b4a work? I wish to use standard Windows folder, but if necessary I could install android and b4a in a different folder under root c:

Please could you advice me also about java installation folder? Is also necessary to install java in a folder without spaces? I want to avoid that other apps using java could not find it.

So , do you think that the errors come from space in folder path or there is some evidence of a different reason?

thanks in advance for the coming help and advices.
alessandro
 

Indy

Active Member
Licensed User
Longtime User
I had a similar problem. Check the ini file located in C:\Users\{your username}\AppData\Roaming\Anywhere Software\Basic4android\b4xV5.ini and make sure the MaxRamForDex settings (about half way down the file) is at least 1024. That's what I had to set to get my projects to (re)compile. You may need to increase this value based on the size of your projects.
 
Upvote 0

acorrias

Member
Licensed User
Longtime User
I had a similar problem. Check the ini file located in C:\Users\{your username}\AppData\Roaming\Anywhere Software\Basic4android\b4xV5.ini and make sure the MaxRamForDex settings (about half way down the file) is at least 1024. That's what I had to set to get my projects to (re)compile. You may need to increase this value based on the size of your projects.
Hi
I verified MaxRamForDex with the previous installed b5a v5 (5.2) on winxp and it was 512. I have just verified new installed b5a (v. 5.5.0.1) and it is 1024.

I will try to increase it even if the project is the same.
bye Alex
 
Upvote 0

acorrias

Member
Licensed User
Longtime User
Sorry
but I have increased MaxRamForDex to 2048 and B4a doesnt' compile
Next I have increaset MaxRamForDex t 4096 and it is the same (no compile)

Any suggestion?
 
Upvote 0

Indy

Active Member
Licensed User
Longtime User
Having looked at your error messages I noticed that you have a Null Pointer error. I think you need to re-check your code as there maybe be a bug in your code. Best way I always find is to comment out all but the basic code and see how things work. Then gradually bring other code back in and compile. I know this sort of things shouldn't happen after a simple Windows upgrade but, that's app development for you - you only have to change one things and things start to fail unexpectedily.

Sorry I can't be of more help.

Good luck.
 
Upvote 0

acorrias

Member
Licensed User
Longtime User
Hi all
after a few months without using B4A I decided to verify errors received with the compiling of an app. I got them again.
So I decided to uninstall jdk and android sdk. This to install android sdk in a new directory without space in the filename (as someone suggested).

So I created a directory called java, under c:\. (You could see the ini file at the end of this post.

I uninstalled also java and install again jdk.
So I started with some of previous complied app and I got the same errors. this is the log

^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
4A version: 5.50
Parsing code. (0.00s)
Compiling code. (0.02s)
Compiling layouts code. (0.00s)
Generating R file. (0.17s)
Compiling debugger engine code. (0.55s)
Compiling generated Java code. (0.75s)
Convert byte code - optimized dex. Error
UNEXPECTED TOP-LEVEL EXCEPTION:
java.lang.NullPointerException
at com.android.dx.cf.direct.ClassPathOpener.processDirectory(ClassPathOpener.java:217)
at com.android.dx.cf.direct.ClassPathOpener.processOne(ClassPathOpener.java:158)
at com.android.dx.cf.direct.ClassPathOpener.process(ClassPathOpener.java:144)
at com.android.dx.command.dexer.Main.processOne(Main.java:672)
at com.android.dx.command.dexer.Main.processAllFiles(Main.java:574)
at com.android.dx.command.dexer.Main.runMonoDex(Main.java:311)
at com.android.dx.command.dexer.Main.run(Main.java:277)
at com.android.dx.command.dexer.Main.main(Main.java:245)
at com.android.dx.command.Main.main(Main.java:106)
UNEXPECTED TOP-LEVEL EXCEPTION:
java.lang.NullPointerException
at com.android.dx.cf.direct.ClassPathOpener.processDirectory(ClassPathOpener.java:217)
at com.android.dx.cf.direct.ClassPathOpener.processOne(ClassPathOpener.java:158)
at com.android.dx.cf.direct.ClassPathOpener.process(ClassPathOpener.java:144)
at com.android.dx.command.dexer.Main.processOne(Main.java:672)
at com.android.dx.command.dexer.Main.processAllFiles(Main.java:574)
at com.android.dx.command.dexer.Main.runMonoDex(Main.java:311)
at com.android.dx.command.dexer.Main.run(Main.java:277)
at com.android.dx.command.dexer.Main.main(Main.java:245)
at com.android.dx.command.Main.main(Main.java:106)
UNEXPECTED TOP-LEVEL EXCEPTION:
java.lang.NullPointerException
at com.android.dx.cf.direct.ClassPathOpener.processDirectory(ClassPathOpener.java:217)
at com.android.dx.cf.direct.ClassPathOpener.processOne(ClassPathOpener.java:158)
at com.android.dx.cf.direct.ClassPathOpener.process(ClassPathOpener.java:144)
at com.android.dx.command.dexer.Main.processOne(Main.java:672)
at com.android.dx.command.dexer.Main.processAllFiles(Main.java:574)
at com.android.dx.command.dexer.Main.runMonoDex(Main.java:311)
at com.android.dx.command.dexer.Main.run(Main.java:277)
at com.android.dx.command.dexer.Main.main(Main.java:245)
at com.android.dx.command.Main.main(Main.java:106)
3 errors; aborting
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

this is the ini file

^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Left=148
Top=23
ClientSizeWidth=1936
ClientSizeHeight=1056
WindowState=True
AutoSave=True
CompileMode=0
NumberOfRecentFiles=12
ClearLogsWhenSaving=True
RemoteCompilationMode=False
UseLegacyDebugger=False
RecentFile1=C:\Users\myname\Desktop\Anywhere Software\Basic4android\demo\dialogs\DialogsDemo.b4a
UseOptimizedDexer=True
OptimizedDexerPort=13968
DesignerDesktopPort=36728
DesignerDevicePort=5000
SignKeyAlias=b4a
SignKeyFile=
SignKeyPassword=
DebugDesktopPort=12121
MaxRamForDex=1024
ProcessesTimeoutSeconds=60
BackgroundGuiThreadInterval2=50
backgroundIndexerThreadInterval=1000
DisableImplicitAutoComplete=False
PlatformFolder=C:\java\Android\android-sdk\platforms\android-23
ToolsFolder=C:\java\Android\android-sdk\tools\
JavaBin=C:\Program Files\Java\jdk1.8.0_74\bin
AdditionalLibrariesFolder=
SharedModulesFolder=
IdeTheme=MetroLight
CodeTheme=Light
SavedIp1=192.168.1.133
DesignerWindow=H4sIAAAAAAAEAHNJLc5Mz0stivdJTSuxNTI24eVygQmF5BegiTjnZKbmlQRnVqWGZ6aUZNgaGhgYYJX2SM1MzyixtUCRDs/MS8kvDy5JLEm1dUvMKU7l5

QIAgeUQzX8AAAA=
FontName2=Consolas
FontSize2=12
logs_FontName2=Segoe UI
logs_FontSize2=12
TabSize=4
WordWrap=False
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^


I tryes to compile this simple app

#Region Project Attributes
#ApplicationLabel: B4A Example
#VersionCode: 1
#VersionName:
'SupportedOrientations possible values: unspecified, landscape or portrait.
#SupportedOrientations: unspecified
#CanInstallToExternalStorage: False
#End Region

#Region Activity Attributes
#FullScreen: False
#IncludeTitle: True
#End Region

Sub Process_Globals
'These global variables will be declared once when the application starts.
'These variables can be accessed from all modules.

End Sub

Sub Globals
'These global variables will be redeclared each time the activity is created.
'These variables can only be accessed from this module.

End Sub

Sub Activity_Create(FirstTime As Boolean)
Log("ciao")
Msgbox("Ciao","aa")

End Sub


Sub Activity_Resume

End Sub

Sub Activity_Pause (UserClosed As Boolean)

End Sub

and I get the same error


B4A version: 5.50
Parsing code. (0.00s)
Compiling code. (0.02s)
Compiling layouts code. (0.00s)
Generating R file. (0.17s)
Compiling debugger engine code. (0.55s)
Compiling generated Java code. (0.66s)
Convert byte code - optimized dex. Error
UNEXPECTED TOP-LEVEL EXCEPTION:
java.lang.NullPointerException

at com.android.dx.cf.direct.ClassPathOpener.processDirectory(ClassPathOpener.java:217)
at com.android.dx.cf.direct.ClassPathOpener.processOne(ClassPathOpener.java:158)
at com.android.dx.cf.direct.ClassPathOpener.process(ClassPathOpener.java:144)
at com.android.dx.command.dexer.Main.processOne(Main.java:672)
at com.android.dx.command.dexer.Main.processAllFiles(Main.java:574)
at com.android.dx.command.dexer.Main.runMonoDex(Main.java:311)
at com.android.dx.command.dexer.Main.run(Main.java:277)
at com.android.dx.command.dexer.Main.main(Main.java:245)
at com.android.dx.command.Main.main(Main.java:106)
UNEXPECTED TOP-LEVEL EXCEPTION:
java.lang.NullPointerException

at com.android.dx.cf.direct.ClassPathOpener.processDirectory(ClassPathOpener.java:217)
at com.android.dx.cf.direct.ClassPathOpener.processOne(ClassPathOpener.java:158)
at com.android.dx.cf.direct.ClassPathOpener.process(ClassPathOpener.java:144)
at com.android.dx.command.dexer.Main.processOne(Main.java:672)
at com.android.dx.command.dexer.Main.processAllFiles(Main.java:574)
at com.android.dx.command.dexer.Main.runMonoDex(Main.java:311)
at com.android.dx.command.dexer.Main.run(Main.java:277)
at com.android.dx.command.dexer.Main.main(Main.java:245)
at com.android.dx.command.Main.main(Main.java:106)
UNEXPECTED TOP-LEVEL EXCEPTION:
java.lang.NullPointerException

at com.android.dx.cf.direct.ClassPathOpener.processDirectory(ClassPathOpener.java:217)
at com.android.dx.cf.direct.ClassPathOpener.processOne(ClassPathOpener.java:158)
at com.android.dx.cf.direct.ClassPathOpener.process(ClassPathOpener.java:144)
at com.android.dx.command.dexer.Main.processOne(Main.java:672)
at com.android.dx.command.dexer.Main.processAllFiles(Main.java:574)
at com.android.dx.command.dexer.Main.runMonoDex(Main.java:311)
at com.android.dx.command.dexer.Main.run(Main.java:277)
at com.android.dx.command.dexer.Main.main(Main.java:245)
at com.android.dx.command.Main.main(Main.java:106)
3 errors; aborting









please could give me a suggestion about how to solve this problem?
thanks in advance
 
Last edited:
Upvote 0

acorrias

Member
Licensed User
Longtime User
Hi Erel.
yes I get the error with every app. I tried with previous correctly tested apps. Then, in order to avoid lib with conflicts, I tested with the simplest app
Sub Activity_Create(FirstTime As Boolean)
Log("ciao")
Msgbox("Ciao","aa")
End Sub.
Consider that I installed b4a in a new personal computer and I copyed all libs onto the file system.
 
Last edited:
Upvote 0

Pendrush

Well-Known Member
Licensed User
Longtime User
Do not set MaxRamForDex over 1024 if you use JDK x86 (32bit). With 32bit Java I'm unable to compile anything if MaxRamForDex is set over 1024.
I'm using Win10 x64 with JDK x64. MaxRamForDex = 4096, my computer have 8GB ram and I don't have any problem compiling extreme large projects.
You can try to download JDK x64, and set MaxRamForDex for example to 3072 or above. Also, you need to change javac.exe (to JDK x64) path inside B4A.
 
Upvote 0

acorrias

Member
Licensed User
Longtime User
Hi all.
I removed b4a and reinstalled it. with the new release
I did a clean install removing any previous file.
I got no errors.
My problems now is that I have to recycle libraries and that I don't know if some one generates some conflict.

Any suggestion?

HI all. I have moved all the libs in lIbraries folder without update the new installed with the last version of B4A.
Now it is all ok
 
Last edited:
Upvote 0
Top