2014년 12월 9일 화요일

Problems with finished program, but no problems on emulator

I´ve made a program. It works perfectly on Emulator. When i make APK and install on my phone (Galaxy s3 9305) i get problems. More specific i can start the program but when i call a function that uses the (Select list item list)block, I get error message "Attempt to get item number two of a list of length one". I understand the error message, but its wrong and there is no problems on the Emulator.




Hvordan er du Peter? There is no reason to double post.   Your first message is viewed by all.

I suspect the reason the app works in the emulator your list is stored there in the emulator or you set the values while running the app. 

 In the app, the list is stupid and needs to be initialized from a csv file or a TinyDB.     .You do not post the code where you show the list as the app is being initialized,
so I do not know.

Is this possible?



Okay i will not double post again :)

The problem is that the block "split text"(text block) is(can be) percieved as a list when running on the emulator, but not on the phone. i wanted to split an arbitrary reel number ex 45.9876 in 45 and 9876. The "split text" block could do that easely, but gave me the other problem. Ive found a couple of solutions

The easyest is to hide the "split text" result as a list, local variable. So i think that was what you where saying :)

Thx im really happy for the help



You could also use the Mod block... The mod of 45.9876/45  is .9876.



I get error message "Attempt to get item number two of a list of length one". I understand the error message, but its wrong and there is no problems on the Emulator.
probably this is because of different language settings in the emulator compared with your device?
for european languages, the comma is used as decimal delimiter...


댓글 없음:

댓글 쓰기