The app file is 18.0MB
The app file is 18.0MB
It took more than 1 minute for the system to load the AIA into AI2, which means the file is quite large. What server are you using? code.appinventor.mit.edu or ai2.appinventor.mit.edu?
The only screen the
Canvas appeared was
TABLERO, and from your APK, it completely works. However, I noticed that you have a lot of assets - more than 100 files.
Are you sure the app you published to Google Play is the exact same app you posted?
If they still don't work, please read these links and topics.
The file size is 18.1 MB for me, but 161346240 bytes is around 154 MB, which means something is not right.
To be honest, I know little about this topic, but I googled the error description and found these:
(not very relevant link from what I can see, but it is top 3 result)
(5 years 4 months ago, but it's Stack Overflow I guess?)
If I had to guess, I think your problem is that you are trying to draw a file that is either way too large or way too detailed for the screen size. I would suggest making any images you're using much smaller.
Try instead of publishing an APK to Google Play, use an AAB.
You're not the first person to encounter this problem before, some of us also had this issue.
@Gordon_Lu is more qualified; I wasn't even able to open the file. My last parting words of wisdom are "make sure you don't have any very large images"
Try to remove some big files that you do not need.
Asset limit for APK: < 10 MB, better < 5 MB
Asset limit for AAB: < 20 MB, better < 5 MB
I saw the same blogs.
They say that is a problem in android, android try to resize the image and that close the app.
somebody recomend to use this code
How can i put this code on app inventor?
In some mobiles the app close the first time and the second is running normaly, I use the abb on play console, google doesnt work with apk anymore
The problem is not the files, the problem is the first app run
You can't I believe; those people are working with Android Studio, which is a different platform altogether (a very similar one though).
As Gordon said, try using (packaging and publishing as) an AAB instead of an APK and see if that works.
i already use the aab file.
Well then I'm not sure what to do; I'd wait and see if someone else responds
I guess the main reason is still the assets, so it affects the first time loading but the second time is OK. Installing an app on Google Play does have some differences than directly downloading the app through the build QR code.
Meanwhile, I noticed that some of your images were text that could be easily replaced with the Label component, and sound files that could be replaced.with TextToSpeech. Please use built-in components to replace them.
Also don't forget that you can use a URL as a source for Images, Players and Sounds. You can upload a sound or image file in Google Drive, share it so that anyone on the web can view, and copy the share link. In you blocks (not in the Designer), set the Image/Player/Sound 's Picture/Source to the URL.
It is probably the image loaded to the canvas imageSprite OBJ_TABLERO on your TABLERO screen
Try loading it on screen initialise with a clock timer, to give the canvas some time (@250ms) to set its size before loading the image
If your app has a 1750 by 2500 image, is it intended for a phone the size of a handball court?
Note that just because an image is compressed doesn't imply that it is small. A 1750x2500 pixel image could be fairly small if using PNG compression on an image that is mostly solid colors without a lot of noise. However, in memory it still needs to be held in its uncompressed state, which is roughly 17.5 MB. If you end up loading a few images of this size you will cause the app to run out of memory (Fun fact: my first Android phone allowed apps to use up to 16 MB of RAM).