Gex Gaming

unread,
Apr 27, 2019, 10:05:12 AM4/27/19
to mitappinv...@googlegroups.com
nothing work when i start the app it close immediatly with a black screen and the text "myapp" has shutdown
i have put more than 240 image in invisible so its maybe because of this but i can't remove so what i need to do ?

TimAI2

unread,
Apr 27, 2019, 10:59:55 AM4/27/19
to mitappinv...@googlegroups.com
Probably too many images of the wrong dimensions / size / resolution, including the app icon (no more than 96x96 png format) ?
Possibly switching screens issues, if you have more than one screen ?
Can only guess without seeing your blocks or project file (aia)

Use different screens wisely

If you decided to use different screens, then you should switch them correctly, else you will run out of memory after a while...      
The recommended method of switching screens in App Inventor
(Thanks Taifun)

Also see demo: multiscreen.aia

If you haven't done it already....

Gex Gaming

unread,
Apr 27, 2019, 11:33:00 AM4/27/19
to MIT App Inventor Forum
this is my app
i have 1 screen
apperror.aia

Chris Ward

unread,
Apr 27, 2019, 1:56:40 PM4/27/19
to MIT App Inventor Forum
Hi

Counter Strike Nexon Zombies?

The Project will not load into App Inventor on my machine (Huge Win7 workstation!).

Images
There is an issue with the images. Dimensionally, most images should be fine, looks like they are the finished size for the App?  If they are not, that's an area for improvement. Unfortunately, the images are all compressed 100%, so as the App Screen Initializes, the phone is being asked to decompress and load to memory 274 images. I think that process is a problem and in any event means the App would take an age to load. No matter how the images will be eventually handled, you need to modify them such that they are zero compression - that removes a major processor task. Also convert the JPG images to PNG.
 
See my guidelines here:

Blocks
Hardly any blocks, just five global variables - is that correct?

GUI
The GUI has 269 image components. Even though the images are relatively small, that is probably too many. Must have taken ages for you to get them into App Inventor. However, I think we may have to find a better way to manage the images. It's a gallery of weapons, but image components do not have an associated event, so there is no way to pick them - What are they there for? Is it just for the gamers to look-up info about the weapons available in CSNZ? If that is the case, then it might be better to assemble them in an HTML file and display that with a WebView component (html file stored on the phone, no internet required).



TimAI2

unread,
Apr 27, 2019, 2:57:58 PM4/27/19
to MIT App Inventor Forum
As Chris says loading all those images into individual image components is not the way to go about things

Delete all the image components except one
Create a list (csv) of all your images
Call the csv into your app (File component) and create a list
Assign list to a listpicker elements
Use the listpicker to allow the user to select an image from the list
Display image in remaining image component
Allow actions based upon index of image in the list

BodyMindPower

unread,
Apr 27, 2019, 3:46:41 PM4/27/19
to MIT App Inventor Forum
275 images (png) are loaded when opening the app. Although these are all invisible at first, the memory problem may arise as a result.
I could easily open the app with an offline version of AI2. Also the apk opens without problems, but the test device has enough RAM. Maybe your device has not enough RAM.

Why should all images be loaded at the same time at the beginning and why not only load them when they should be displayed? Then e.g. via a list and "image.Picture to xxx.png" ...

Anke

PS: If you are working with the online version of AI2 and you want to import an aia with so many files in the assets, you get into trouble and have to remove a lot of files before.

BodyMindPower

unread,
Apr 27, 2019, 3:50:53 PM4/27/19
to MIT App Inventor Forum
Hi Tim, I have seen your suggestions too late (after my post)

TimAI2

unread,
Apr 27, 2019, 3:53:06 PM4/27/19
to MIT App Inventor Forum
:) @ Anke
Reply all
Reply to author
Forward
0 new messages