I wanted to start using new Visual Designer (Android 4.0 style) with version 2.0 of Basic4Android and I have encountered problems with recompiling previous applications.
The error I got was in simple HTTP response sub.
An Error "android.os.NetworkOnMainThreadException" occurs on line - result = Response.GetString("UTF8").
After trying to find out what could be the problem, I have tried changing minSdkVersion number and I noticed that if it is set in Manifest to anything higher than 8 it comes out with this error.
How can I resolve this problem?
I have also tried to recompile another application and I get errors when trying to compile with SdkVersion 14.
This time, it is when I define type:
It is defined with the same name in Sub Globals in two different modules.
With minSdkVersion 14 (maybe from 10 up - I haven't checked it yet) it won't compile unless I use different names for type definition in each module.
It worked fine previously.
The error I got was in simple HTTP response sub.
B4X:
Sub hc_ResponseSuccess (Response As HttpResponse, TaskId As Int)
Dim result As String
result = Response.GetString("UTF8")
'Work with the result
End Sub
After trying to find out what could be the problem, I have tried changing minSdkVersion number and I noticed that if it is set in Manifest to anything higher than 8 it comes out with this error.
How can I resolve this problem?
I have also tried to recompile another application and I get errors when trying to compile with SdkVersion 14.
This time, it is when I define type:
B4X:
Type COMPLEX (r As Double, _
x As Double, _
z As Double, _
a As Double)
Dim a As COMPLEX
It is defined with the same name in Sub Globals in two different modules.
With minSdkVersion 14 (maybe from 10 up - I haven't checked it yet) it won't compile unless I use different names for type definition in each module.
It worked fine previously.