I think this is probably something I've missed out, in updating in getting to 2.50, I was on 2.20 or 2.30 before.. From 14 Oct 2012...
I've tried regenning code, and it failed, with the Tabhost Dim.. I tried the Tutorial code - that doesn't work either - I get the following problem when the code executes (either my code or the Tutorial - both have the same Null Pointer Exception). Any thoughts? I'm sure it's a problem with my setup, but I can't seem to work out what.
I am using javac.exe : C:\Program Files\Java\jdk1.6.0_26\bin\javac.exe
android.jar : C:\Android\android-sdk\platforms\android-16\android.jar
I'm guessing it's something to do with my outdated libraries, but have attempted to keep my code as widely useable as possible, by as many Android devices.
Happy to supply any further information if it will help to work out what the problem is.
:sign0163:
ETA : I've updated to JDK 1.7 - no difference. I rebuilt some other code I have, no Tabhosts, this works fine. So maybe it is a bug??
I've tried regenning code, and it failed, with the Tabhost Dim.. I tried the Tutorial code - that doesn't work either - I get the following problem when the code executes (either my code or the Tutorial - both have the same Null Pointer Exception). Any thoughts? I'm sure it's a problem with my setup, but I can't seem to work out what.
B4X:
main_activity_create (B4A line: 26)
TabHost1.AddTabWithIcon ("Name", bmp1, bmp2, "page1") 'load the layout file of each page
java.lang.NullPointerException
at anywheresoftware.b4a.objects.PanelWrapper.LoadLayout(PanelWrapper.java:91)
at anywheresoftware.b4a.objects.TabHostWrapper.createPanelForLayoutFile(TabHostWrapper.java:115)
at anywheresoftware.b4a.objects.TabHostWrapper.AddTabWithIcon(TabHostWrapper.java:157)
at anywheresoftware.b4a.samples.tabhost.main._activity_create(main.java:253)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:507)
at anywheresoftware.b4a.BA.raiseEvent2(BA.java:167)
at anywheresoftware.b4a.samples.tabhost.main.afterFirstLayout(main.java:85)
at anywheresoftware.b4a.samples.tabhost.main.access$100(main.java:16)
at anywheresoftware.b4a.samples.tabhost.main$WaitForLayout.run(main.java:72)
at android.os.Handler.handleCallback(Handler.java:587)
at android.os.Handler.dispatchMessage(Handler.java:92)
at android.os.Looper.loop(Looper.java:123)
at android.app.ActivityThread.main(ActivityThread.java:3683)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:507)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:839)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:597)
at dalvik.system.NativeStart.main(Native Method)
java.lang.NullPointerException
I am using javac.exe : C:\Program Files\Java\jdk1.6.0_26\bin\javac.exe
android.jar : C:\Android\android-sdk\platforms\android-16\android.jar
I'm guessing it's something to do with my outdated libraries, but have attempted to keep my code as widely useable as possible, by as many Android devices.
Happy to supply any further information if it will help to work out what the problem is.
:sign0163:
ETA : I've updated to JDK 1.7 - no difference. I rebuilt some other code I have, no Tabhosts, this works fine. So maybe it is a bug??
Last edited: