There’s nothing in your config or build settings that should cause a crash. Does it occur after performing some action in your app (like scrolling or selecting an item) or does it happen “by itself” so to speak? If you have the Android SDK installed on your system, you can view crash output by connecting the device via USB opening a Terminal window and typing
cd /android-sdk-mac_86/tools/adb logcat[/code]Then launch your app on the device and see what information is displayed in the terminal during the crash.Tim [import]uid: 8196 topic_id: 4370 reply_id: 13651[/import]
I found the problem was I tried to limit the text width with “…” at the end.
I have no idea how to do it appropriate in Lua.
So I use a loop to check labelText.contentWidth when added a char every time.
That’ why crashed in Android version.
Do you have any official ui component about limit Label width “…” when over a specific width?
I added some code below in ui.newLabel( the old ui component from previous version ) function…
coz I don’t know how to count the width by #string when double-byte character and English in same string…
labelText = display.newText( "", 0, 0, font, size )
local over = false
for k = 1, #s do
labelText.text = string.sub(s, 1 , k);
if (labelText.width \>= width) then
over = true
break
end
end
if over then labelText.text = labelText.text.."..." end
And I found another bug of Android version.
I builded the ListView from your Sample Code.
I found there is no button down reaction while I click the ListView app on my HTC Desire…
I mean the button down blue background view.