Layout is not available?

Theera

Well-Known Member
Licensed User
Longtime User
Hi all,
I learn to create the widget from Klaus's TwoActivity. I don't know that has error occured.

Best Regards
Theera
 
Last edited:

Theera

Well-Known Member
Licensed User
Longtime User
Which line raises this error?


Compile debug mode is complete,but have Error at line 36

Best Regards
Theera
 
Upvote 0

Theera

Well-Known Member
Licensed User
Longtime User
Picture that show error ocurred

Hi all,
Here you are. This is my error picture. Make me difficult.

Best Regards
Theera
 
Last edited:
Upvote 0

Theera

Well-Known Member
Licensed User
Longtime User
Hi all,
Not only that error,but also after I add designerscript,it still has new error belows

Best Regards
Theera
 
Last edited:
Upvote 0

aaronk

Well-Known Member
Licensed User
Longtime User
You could so something like:


In the Globals sub add:
B4X:
Dim set_textbox As String

Then use the following code in the Activity_Resume sub (replace your current code in this sub with the code below):

B4X:
If set_textbox = "txtbox1" Then
   txtbox1.Text = Activity2.tmpresult
End If

If set_textbox = "txtbox2" Then
   txtbox2.Text = Activity2.tmpresult
End If

Then in your Designer you will need to change the Event Name for ImgView1 & ImgView2.

So they will become:
ImgView1 Event Name = ImgView1
ImgView2 Event Name = ImgView2
(Rather than ImgView for both.)

Then use the following code in your Main Activity:

B4X:
Sub ImgView1_Click
   set_textbox = "txtbox1"
    StartActivity(Activity2)
End Sub

Sub ImgView2_Click
   set_textbox = "txtbox2"
    StartActivity(Activity2)
End Sub

Now when you press the image it will load your calendar activity and will load the date into the correct textbox when your calendar activity is closed.

There maybe other ways in doing this but it worked for me :)
 
Upvote 0

Theera

Well-Known Member
Licensed User
Longtime User
Hi all,
Thank you for your Strategy,aaronk ,but I will wait for someone answer others. Why don't I could do this my Strategy? Perhaps I have to learn more.

Best Regards
Theera
 
Upvote 0

Erel

B4X founder
Staff member
Licensed User
Longtime User
You can copy the error from the logs (right click on the logs). It is easier.

The compilation error is due to a bug in Java 1.7_10. You can either upgrade to B4A 2.5 which workarounds this bug or use a different version of Java.

Run your code in debug mode and put a breakpoint on this line. I guess that the Tag for this view is empty.
 
Upvote 0

Theera

Well-Known Member
Licensed User
Longtime User
You can copy the error from the logs (right click on the logs). It is easier.

The compilation error is due to a bug in Java 1.7_10. You can either upgrade to B4A 2.5 which workarounds this bug or use a different version of Java.

Run your code in debug mode and put a breakpoint on this line. I guess that the Tag for this view is empty.

Hi Erel,
I use jdk6 instead of jdk7 because both of Java 1.7_10 and 1.7_11 have the same problem. I follows to copy the log file as your guide this.
LogCat connected to: emulator-5554
problem reading network stats


java.lang.IllegalStateException: problem parsing line: null
at com.android.internal.net.NetworkStatsFactory.readNetworkStatsDetail(NetworkStatsFactory.java:313)
at com.android.server.NetworkManagementService.getNetworkStatsUidDetail(NetworkManagementService.java:1271)
at com.android.server.net.NetworkStatsService.performPollLocked(NetworkStatsService.java:810)
at com.android.server.net.NetworkStatsService.updateIfacesLocked(NetworkStatsService.java:721)
at com.android.server.net.NetworkStatsService.updateIfaces(NetworkStatsService.java:699)
at com.android.server.net.NetworkStatsService.access$000(NetworkStatsService.java:128)
at com.android.server.net.NetworkStatsService$1.onReceive(NetworkStatsService.java:589)
at android.app.LoadedApk$ReceiverDispatcher$Args.run(LoadedApk.java:728)
at android.os.Handler.handleCallback(Handler.java:605)
at android.os.Handler.dispatchMessage(Handler.java:92)
at android.os.Looper.loop(Looper.java:137)
at android.os.HandlerThread.run(HandlerThread.java:60)


Caused by: java.io.FileNotFoundException: /proc/net/xt_qtaguid/stats: open failed: ENOENT (No such file or directory)
at libcore.io.IoBridge.open(IoBridge.java:406)
at java.io.FileInputStream.<init>(FileInputStream.java:78)
at java.io.FileReader.<init>(FileReader.java:42)
at com.android.internal.net.NetworkStatsFactory.readNetworkStatsDetail(NetworkStatsFactory.java:272)
... 11 more
Caused by: libcore.io.ErrnoException: open failed: ENOENT (No such file or directory)
at libcore.io.Posix.open(Native Method)
at libcore.io.BlockGuardOs.open(BlockGuardOs.java:98)
at libcore.io.IoBridge.open(IoBridge.java:390)
... 14 more
** Activity (main) Create, isFirst = true **


** Activity (main) Resume **

I don't know to continue.

Best Regards
Theera
 
Upvote 0

charro98120165

Member
Licensed User
Longtime User
mi too have this error
Im tried conect arduino adk with android tablet.

LogCat connected to: emulator-5554
problem reading network stats


java.lang.IllegalStateException: problem parsing line: null
at com.android.internal.net.NetworkStatsFactory.readNetworkStatsDetail(NetworkStatsFactory.java:313)
at com.android.server.NetworkManagementService.getNetworkStatsUidDetail(NetworkManagementService.java:1271)
at com.android.server.net.NetworkStatsService.performPollLocked(NetworkStatsService.java:810)
at com.android.server.net.NetworkStatsService.updateIfacesLocked(NetworkStatsService.java:721)
at com.android.server.net.NetworkStatsService.updateIfaces(NetworkStatsService.java:699)
at com.android.server.net.NetworkStatsService.access$000(NetworkStatsService.java:128)
at com.android.server.net.NetworkStatsService$1.onReceive(NetworkStatsService.java:589)
at android.app.LoadedApk$ReceiverDispatcher$Args.run(LoadedApk.java:728)
at android.os.Handler.handleCallback(Handler.java:605)
at android.os.Handler.dispatchMessage(Handler.java:92)
at android.os.Looper.loop(Looper.java:137)
at android.os.HandlerThread.run(HandlerThread.java:60)


Caused by: java.io.FileNotFoundException: /proc/net/xt_qtaguid/stats: open failed: ENOENT (No such file or directory)
at libcore.io.IoBridge.open(IoBridge.java:406)
at java.io.FileInputStream.<init>(FileInputStream.java:78)
at java.io.FileReader.<init>(FileReader.java:42)
at com.android.internal.net.NetworkStatsFactory.readNetworkStatsDetail(NetworkStatsFactory.java:272)
... 11 more
Caused by: libcore.io.ErrnoException: open failed: ENOENT (No such file or directory)
at libcore.io.Posix.open(Native Method)
at libcore.io.BlockGuardOs.open(BlockGuardOs.java:98)
at libcore.io.IoBridge.open(IoBridge.java:390)
... 14 more
** Activity (main) Create, isFirst = true **


main_encuentraaccesorio (B4A line: 53)


ListaAccesorios = Manejador.GetAccessories
** Activity (main) Create, isFirst = true **


main_encuentraaccesorio (B4A line: 53)


ListaAccesorios = Manejador.GetAccessories
 
Upvote 0

Theera

Well-Known Member
Licensed User
Longtime User
My question is solved by using version 2.52 instead of 2.50
 
Upvote 0
Top