2017년 6월 6일 화요일

APK Doesn't Work With All Android Phones...


I've finished a project on App Inventor 2 and I've build my APK...

The app works on my device ( Samsung GT-S7390, Android Version: 4.1.2)...but when I install the apk on a Samsung Galaxy S5 with Android 6.0 the app crashes when I change screen (Screen 1 actually works P-E-R-F-E-C-T-L-Y)...

Any suggestions???

--
see the following general tips


2. App Inventor works best if you use images whose size matches the size you want them to appear on your screen. If you import larger images into your app, your app may run out of system memory. Using Images with App Inventor

--
I resized and reposition the images on the screen by doing these two Procedures...

I supposed to have a 1280 x 720 canvas...


-- 
Show us the various Inkscape procedures?

-- 
Actually my "src" folder in .aia archive is larger tha 5mb...It was 8 MB then I cleaned the project and now is 6 MB...

Should this folder be under 5 MB ?


-- 
as explained here Using Images with App Inventor
you should reduce the width and height of the images to the max size you need

-- 
Your Inkscape conversion functions look fishy.

The multiplication by 100 then division by 100 suggests you might be
thinking that AI2 does integer arithmetic and rounds or truncates automatically.

That's not the case.  

Both procedures are just (parameter * (Height/1280))

I vaguely remember seeing reports of fractional px values in
positioning or size settings causing problems.

I suggest wrapping the formula with a floor() or round() to lop off fractional parts.
Also, the *100/100 layers serve no purpose that I can see.

Search YouTube for a video on InkScape in AI2.

App sizes between 5 and 10 MB are marginal.

-- 
I don't understand why my app works on an outdated phone and not on a powerful galaxy S5...

-- 
to find out more about the Runtime Error, you can use Logcat

I normally use Eclipse and Logcat there, but if you have installed the App InventorSoftware (see also Installing and Running the Emulator in AI2), you already have everything you need to use logcat...

How to use Logcat
1. connect your device using USB with your computer
2. in File Manager go to the App Inventor directory, which is  C:\Program Files\App Inventor or similar
3. press Shift and right mouse click the subdirectory commands-for-Appinventor to get the context menu
4. select "open command window here" and you will get a command window of that subdirectory
5. enter adb logcat and the logcat will start running
6. start your app to elicit the error
7. copy the log (see below)

To copy your log, right click, click "select all" and enter to copy the complete log into the clipboard, then open Notepad and paste it using ctrl-v.



--


댓글 없음:

댓글 쓰기