Doesn't run apk on old Android API [SOLVED]

I have build a clean project (OpenFL + Lime), but it doesn’t run on old Android API. Show black screen and just app turn off. But it’s work fine on API 16+.

Main.hx:

package;
import openfl.display.Sprite;
class Main extends Sprite {
	public function new() {
		super();
	}
}

project.xml:

<?xml version="1.0" encoding="utf-8"?>
<project>
	
	<meta title="GOOPENFL" package="com.z3lf.goopenfl" version="1.0.0" company="Z3LF" />
	<app path="bin" file="GOOPENFL" main="Main" />
	
	<window width="960" height="540" unless="mobile"/>
	<window background="#FF0000" fps="10"/>
	
	<source path="src" />
	<haxelib name="openfl" />
	
	<icon path="assets/openfl.svg" />
	<assets path="assets/img" rename="img" />
	
	<android target-sdk-version="16" />
	<certificate path="cert/GOOPENFL.keystore" alias="GOOPENFL" password="***********" if="android" />
	<template path="libs/AndroidManifest.xml" rename="AndroidManifest.xml" if="android"/>
	
</project>

AndroidManifest.xml:

<?xml version="1.0" encoding="utf-8"?>
<manifest 	xmlns:android="http://schemas.android.com/apk/res/android" 
			package="com.z3lf.goopenfl" 
			android:versionCode="1" 
			android:versionName="1.0.0"
			android:installLocation="preferExternal">
			
    <uses-feature android:glEsVersion="0x00020000" android:required="true" />

	<uses-sdk android:minSdkVersion="9" android:targetSdkVersion="16"/>
	
	<application 	android:label="GOOPENFL" 
					android:theme="@android:style/Theme.Black.NoTitleBar.Fullscreen"
					android:icon="@drawable/icon">
					
		<activity 	android:name=".MainActivity" 
					android:label="GOOPENFL"
					android:launchMode="singleTask"
					android:screenOrientation="landscape">
					
			<intent-filter>
				<action android:name="android.intent.action.MAIN" />
				<category android:name="android.intent.category.LAUNCHER" />
			</intent-filter>
			
		</activity>
		
	</application>
	
</manifest>

What could be the problem?

P.S. Tested the API 8-13. :dizzy_face:
P.S.S Sorry for my “amazing” english.

OpenFL is probably using features specific to API version 16. Although it is building with the more recent SDK, the same build of your app should be compatible with Android version with API 9 and up (2.3 Gingerbread+) because of this line in the manifest:

<uses-sdk android:minSdkVersion="9" android:targetSdkVersion="16"/>

Is the version built with SDK 16 not working on older devices or are you trying to build with earlier SDKs?

Yes, i tried build SDK8 and SDK10 (can’t build with SDK9 ; Android SDK Manager hasn’t it for download). Nothing has changed… :frowning:

haxelibs:

actuate: 1.7.5 [1.8.1]
box2d: [1.2.3]
hxcpp: 3.1.48 [3.1.68]
layout: [1.1.0]
lime: [2.0.6]
nme: [5.2.13]
openfl-samples: 2.1.0 [2.2.1]
openfl: [2.2.4]
swf: 1.7.2 [1.7.6]

All version Android SDK is installed.

Is there any reason you need an earlier SDK? Using API 16 you can target any Android device from Gingerbread to the latest version.

I tried use API 16 and different versions SDK (newer and earlier). But app doesn’t work on device of gingerbread version. :frowning:

No, but want get it on gingerbread.

For now stick with API 16. On your computer can you run

[Android SDK Folder]/tools/monitor.bat

It will open a program that can get debug messages from your device. Try running your app on your device with it connected to your computer via usb. You will see a lot of messages but if possible can you try find any errors related to OpenFL, Lime, OpenAL or your app’s name. If we can see where the problem is it may help the devs find a fix.

There are ways within that monitor app to filter messages but it takes a bit of playing about to find what you want.

log from android monitor device (used AVD for check app):

02-06 15:53:45.107: I/ActivityManager(60): Starting: Intent { act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] flg=0x10200000 cmp=com.z3lf.goopenfl/.MainActivity } from pid 141
02-06 15:53:45.157: I/ActivityManager(60): Start proc com.z3lf.goopenfl for activity com.z3lf.goopenfl/.MainActivity: pid=678 uid=10034 gids={}
02-06 15:53:45.227: D/dalvikvm(32): GC_EXPLICIT freed 10K, 53% free 2538K/5379K, external 410K/517K, paused 73ms
02-06 15:53:45.317: D/dalvikvm(32): GC_EXPLICIT freed <1K, 53% free 2538K/5379K, external 410K/517K, paused 75ms
02-06 15:53:45.347: I/WindowManager(60): Setting rotation to 1, animFlags=1
02-06 15:53:45.357: I/ActivityManager(60): Config changed: { scale=1.0 imsi=310/260 loc=en_US touch=3 keys=2/1/2 nav=3/1 orien=2 layout=17 uiMode=17 seq=11}
02-06 15:53:45.427: D/dalvikvm(32): GC_EXPLICIT freed <1K, 53% free 2538K/5379K, external 410K/517K, paused 112ms
02-06 15:53:45.567: I/dalvikvm(678): Could not find method android.view.View.setSystemUiVisibility, referenced from method org.haxe.lime.GameActivity.onStart
02-06 15:53:45.567: W/dalvikvm(678): VFY: unable to resolve virtual method 94: Landroid/view/View;.setSystemUiVisibility (I)V
02-06 15:53:45.567: D/dalvikvm(678): VFY: replacing opcode 0x6e at 0x0013
02-06 15:53:45.567: I/dalvikvm(678): Could not find method android.app.Activity.onTrimMemory, referenced from method org.haxe.lime.GameActivity.onTrimMemory
02-06 15:53:45.567: W/dalvikvm(678): VFY: unable to resolve virtual method 12: Landroid/app/Activity;.onTrimMemory (I)V
02-06 15:53:45.567: D/dalvikvm(678): VFY: replacing opcode 0x6f at 0x0006
02-06 15:53:45.567: D/dalvikvm(678): VFY: dead code 0x0009-001e in Lorg/haxe/lime/GameActivity;.onTrimMemory (I)V
02-06 15:53:45.577: D/dalvikvm(678): Trying to load lib /data/data/com.z3lf.goopenfl/lib/libstd.so 0x405157c0
02-06 15:53:45.577: D/dalvikvm(678): Added shared lib /data/data/com.z3lf.goopenfl/lib/libstd.so 0x405157c0
02-06 15:53:45.577: D/dalvikvm(678): No JNI_OnLoad found in /data/data/com.z3lf.goopenfl/lib/libstd.so 0x405157c0, skipping init
02-06 15:53:45.587: D/dalvikvm(678): Trying to load lib /data/data/com.z3lf.goopenfl/lib/libregexp.so 0x405157c0
02-06 15:53:45.587: D/dalvikvm(678): Added shared lib /data/data/com.z3lf.goopenfl/lib/libregexp.so 0x405157c0
02-06 15:53:45.587: D/dalvikvm(678): No JNI_OnLoad found in /data/data/com.z3lf.goopenfl/lib/libregexp.so 0x405157c0, skipping init
02-06 15:53:45.587: D/dalvikvm(678): Trying to load lib /data/data/com.z3lf.goopenfl/lib/libzlib.so 0x405157c0
02-06 15:53:45.587: D/dalvikvm(678): Added shared lib /data/data/com.z3lf.goopenfl/lib/libzlib.so 0x405157c0
02-06 15:53:45.587: D/dalvikvm(678): No JNI_OnLoad found in /data/data/com.z3lf.goopenfl/lib/libzlib.so 0x405157c0, skipping init
02-06 15:53:45.587: D/dalvikvm(678): Trying to load lib /data/data/com.z3lf.goopenfl/lib/liblime.so 0x405157c0
02-06 15:53:45.718: I/DEBUG(30): *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
02-06 15:53:45.727: I/DEBUG(30): Build fingerprint: 'generic/sdk/generic:2.3.3/GRI34/101070:eng/test-keys'
02-06 15:53:45.727: I/DEBUG(30): pid: 678, tid: 678  >>> com.z3lf.goopenfl <<<
02-06 15:53:45.727: I/DEBUG(30): signal 4 (SIGILL), code 1 (ILL_ILLOPC), fault addr 8084b0d4
02-06 15:53:45.737: I/DEBUG(30):  r0 80c80804  r1 00000000  r2 8084b7a2  r3 ffffff01
02-06 15:53:45.737: I/DEBUG(30):  r4 80c80804  r5 00000013  r6 00000004  r7 00000000
02-06 15:53:45.747: I/DEBUG(30):  r8 80017f40  r9 0000ce48  10 410acc3c  fp 41d48bb8
02-06 15:53:45.747: I/DEBUG(30):  ip 80c7ef9c  sp be8503c4  lr 8084b7a8  pc 8084b0d4  cpsr 80000010
02-06 15:53:45.857: I/DEBUG(30):          #00  pc 0004b0d4  /data/data/com.z3lf.goopenfl/lib/liblime.so
02-06 15:53:45.857: I/DEBUG(30):          #01  pc 0004b7a4  /data/data/com.z3lf.goopenfl/lib/liblime.so
02-06 15:53:45.857: I/DEBUG(30): code around pc:
02-06 15:53:45.867: I/DEBUG(30): 8084b0b4 e8bd8010 e52d4004 e59f0074 e59f4074 
02-06 15:53:45.867: I/DEBUG(30): 8084b0c4 e3e030fe e08f0000 e3a01000 e08f4004 
02-06 15:53:45.867: I/DEBUG(30): 8084b0d4 e300c1ff e1a02004 e2800f41 e2844f41 
02-06 15:53:45.867: I/DEBUG(30): 8084b0e4 e4824005 e2833001 e5c21000 e153000c 
02-06 15:53:45.867: I/DEBUG(30): 8084b0f4 e0802003 0a00000b e3530000 b3a01000 
02-06 15:53:45.867: I/DEBUG(30): code around lr:
02-06 15:53:45.867: I/DEBUG(30): 8084b788 13a03004 e5802024 e5804010 e5803020 
02-06 15:53:45.867: I/DEBUG(30): 8084b798 e8bd0010 e12fff1e e92d4010 ebfffe43 
02-06 15:53:45.867: I/DEBUG(30): 8084b7a8 e59f3008 e08f3003 e5830304 e8bd8010 
02-06 15:53:45.867: I/DEBUG(30): 8084b7b8 00435050 e92d4070 e1a06002 e1a02003 
02-06 15:53:45.867: I/DEBUG(30): 8084b7c8 e5913018 e1a05001 e1a04000 e1a01006 
02-06 15:53:45.877: I/DEBUG(30): stack:
02-06 15:53:45.877: I/DEBUG(30):     be850384  afd4717c  
02-06 15:53:45.877: I/DEBUG(30):     be850388  80017f40  /system/lib/libdvm.so
02-06 15:53:45.877: I/DEBUG(30):     be85038c  0000ce48  [heap]
02-06 15:53:45.877: I/DEBUG(30):     be850390  410acc3c  
02-06 15:53:45.877: I/DEBUG(30):     be850394  afd2983f  /system/lib/libc.so
02-06 15:53:45.877: I/DEBUG(30):     be850398  00000000  
02-06 15:53:45.877: I/DEBUG(30):     be85039c  afd1ca59  /system/lib/libc.so
02-06 15:53:45.877: I/DEBUG(30):     be8503a0  80c80668  /data/data/com.z3lf.goopenfl/lib/liblime.so
02-06 15:53:45.877: I/DEBUG(30):     be8503a4  80c80800  /data/data/com.z3lf.goopenfl/lib/liblime.so
02-06 15:53:45.877: I/DEBUG(30):     be8503a8  00000014  
02-06 15:53:45.877: I/DEBUG(30):     be8503ac  80a64244  /data/data/com.z3lf.goopenfl/lib/liblime.so
02-06 15:53:45.887: I/DEBUG(30):     be8503b0  80c80800  /data/data/com.z3lf.goopenfl/lib/liblime.so
02-06 15:53:45.887: I/DEBUG(30):     be8503b4  80c80610  /data/data/com.z3lf.goopenfl/lib/liblime.so
02-06 15:53:45.887: I/DEBUG(30):     be8503b8  df002777  
02-06 15:53:45.887: I/DEBUG(30):     be8503bc  e3a070ad  
02-06 15:53:45.887: I/DEBUG(30):     be8503c0  00000014  
02-06 15:53:45.887: I/DEBUG(30): #00 be8503c4  80c695cc  /data/data/com.z3lf.goopenfl/lib/liblime.so
02-06 15:53:45.887: I/DEBUG(30): #01 be8503c8  80c695cc  /data/data/com.z3lf.goopenfl/lib/liblime.so
02-06 15:53:45.887: I/DEBUG(30):     be8503cc  b00037f5  /system/bin/linker
02-06 15:53:45.887: I/DEBUG(30):     be8503d0  b000d4ac  
02-06 15:53:45.887: I/DEBUG(30):     be8503d4  b000d4a8  
02-06 15:53:45.887: I/DEBUG(30):     be8503d8  00002732  
02-06 15:53:45.897: I/DEBUG(30):     be8503dc  b00038a7  /system/bin/linker
02-06 15:53:45.897: I/DEBUG(30):     be8503e0  00489000  
02-06 15:53:45.897: I/DEBUG(30):     be8503e4  afd00000  /system/lib/libc.so
02-06 15:53:45.897: I/DEBUG(30):     be8503e8  00000022  
02-06 15:53:45.897: I/DEBUG(30):     be8503ec  b000d3c8  
02-06 15:53:45.897: I/DEBUG(30):     be8503f0  80c7edbc  /data/data/com.z3lf.goopenfl/lib/liblime.so
02-06 15:53:45.897: I/DEBUG(30):     be8503f4  b000d3c8  
02-06 15:53:45.897: I/DEBUG(30):     be8503f8  00002732  
02-06 15:53:45.897: I/DEBUG(30):     be8503fc  b0004f9f  /system/bin/linker
02-06 15:53:45.897: I/DEBUG(30):     be850400  00000022  
02-06 15:53:45.897: I/DEBUG(30):     be850404  b000d454  
02-06 15:53:45.907: I/DEBUG(30):     be850408  b000d3c8  
02-06 15:53:45.907: I/DEBUG(30):     be85040c  00000006  
02-06 15:53:46.787: I/BootReceiver(60): Copying /data/tombstones/tombstone_04 to DropBox (SYSTEM_TOMBSTONE)
02-06 15:53:46.817: D/Zygote(32): Process 678 terminated by signal (4)
02-06 15:53:46.867: D/dalvikvm(60): GC_FOR_MALLOC freed 223K, 45% free 4294K/7687K, external 710K/1222K, paused 61ms
**02-06 15:53:46.867: I/ActivityManager(60): Process com.z3lf.goopenfl (pid 678) has died.**
02-06 15:53:46.947: D/dalvikvm(60): GC_EXPLICIT freed 28K, 44% free 4347K/7687K, external 710K/1222K, paused 53ms
02-06 15:53:46.977: I/WindowManager(60): Setting rotation to 0, animFlags=1
02-06 15:53:46.977: I/ActivityManager(60): Config changed: { scale=1.0 imsi=310/260 loc=en_US touch=3 keys=2/1/2 nav=3/1 orien=1 layout=17 uiMode=17 seq=12}
02-06 15:53:47.067: W/InputManagerService(60): Window already focused, ignoring focus gain of: [email protected]
02-06 15:53:49.327: D/dalvikvm(60): GC_EXPLICIT freed 251K, 46% free 4153K/7687K, external 710K/1222K, paused 107ms
02-06 15:56:00.027: I/dalvikvm(60): Jit: resizing JitTable from 1024 to 2048

It looks like this bug may be related. Maybe try what it says here: https://code.google.com/p/android/issues/detail?id=72610

log from monitor (tested on AVD):

02-06 15:53:45.107: I/ActivityManager(60): Starting: Intent { act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] flg=0x10200000 cmp=com.z3lf.goopenfl/.MainActivity } from pid 141
02-06 15:53:45.157: I/ActivityManager(60): Start proc com.z3lf.goopenfl for activity com.z3lf.goopenfl/.MainActivity: pid=678 uid=10034 gids={}
02-06 15:53:45.227: D/dalvikvm(32): GC_EXPLICIT freed 10K, 53% free 2538K/5379K, external 410K/517K, paused 73ms
02-06 15:53:45.317: D/dalvikvm(32): GC_EXPLICIT freed <1K, 53% free 2538K/5379K, external 410K/517K, paused 75ms
02-06 15:53:45.347: I/WindowManager(60): Setting rotation to 1, animFlags=1
02-06 15:53:45.357: I/ActivityManager(60): Config changed: { scale=1.0 imsi=310/260 loc=en_US touch=3 keys=2/1/2 nav=3/1 orien=2 layout=17 uiMode=17 seq=11}
02-06 15:53:45.427: D/dalvikvm(32): GC_EXPLICIT freed <1K, 53% free 2538K/5379K, external 410K/517K, paused 112ms
02-06 15:53:45.567: I/dalvikvm(678): Could not find method android.view.View.setSystemUiVisibility, referenced from method org.haxe.lime.GameActivity.onStart
02-06 15:53:45.567: W/dalvikvm(678): VFY: unable to resolve virtual method 94: Landroid/view/View;.setSystemUiVisibility (I)V
02-06 15:53:45.567: D/dalvikvm(678): VFY: replacing opcode 0x6e at 0x0013
02-06 15:53:45.567: I/dalvikvm(678): Could not find method android.app.Activity.onTrimMemory, referenced from method org.haxe.lime.GameActivity.onTrimMemory
02-06 15:53:45.567: W/dalvikvm(678): VFY: unable to resolve virtual method 12: Landroid/app/Activity;.onTrimMemory (I)V
02-06 15:53:45.567: D/dalvikvm(678): VFY: replacing opcode 0x6f at 0x0006
02-06 15:53:45.567: D/dalvikvm(678): VFY: dead code 0x0009-001e in Lorg/haxe/lime/GameActivity;.onTrimMemory (I)V
02-06 15:53:45.577: D/dalvikvm(678): Trying to load lib /data/data/com.z3lf.goopenfl/lib/libstd.so 0x405157c0
02-06 15:53:45.577: D/dalvikvm(678): Added shared lib /data/data/com.z3lf.goopenfl/lib/libstd.so 0x405157c0
02-06 15:53:45.577: D/dalvikvm(678): No JNI_OnLoad found in /data/data/com.z3lf.goopenfl/lib/libstd.so 0x405157c0, skipping init
02-06 15:53:45.587: D/dalvikvm(678): Trying to load lib /data/data/com.z3lf.goopenfl/lib/libregexp.so 0x405157c0
02-06 15:53:45.587: D/dalvikvm(678): Added shared lib /data/data/com.z3lf.goopenfl/lib/libregexp.so 0x405157c0
02-06 15:53:45.587: D/dalvikvm(678): No JNI_OnLoad found in /data/data/com.z3lf.goopenfl/lib/libregexp.so 0x405157c0, skipping init
02-06 15:53:45.587: D/dalvikvm(678): Trying to load lib /data/data/com.z3lf.goopenfl/lib/libzlib.so 0x405157c0
02-06 15:53:45.587: D/dalvikvm(678): Added shared lib /data/data/com.z3lf.goopenfl/lib/libzlib.so 0x405157c0
02-06 15:53:45.587: D/dalvikvm(678): No JNI_OnLoad found in /data/data/com.z3lf.goopenfl/lib/libzlib.so 0x405157c0, skipping init
02-06 15:53:45.587: D/dalvikvm(678): Trying to load lib /data/data/com.z3lf.goopenfl/lib/liblime.so 0x405157c0
02-06 15:53:45.718: I/DEBUG(30): *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
02-06 15:53:45.727: I/DEBUG(30): Build fingerprint: 'generic/sdk/generic:2.3.3/GRI34/101070:eng/test-keys'
02-06 15:53:45.727: I/DEBUG(30): pid: 678, tid: 678  >>> com.z3lf.goopenfl <<<
02-06 15:53:45.727: I/DEBUG(30): signal 4 (SIGILL), code 1 (ILL_ILLOPC), fault addr 8084b0d4
02-06 15:53:45.737: I/DEBUG(30):  r0 80c80804  r1 00000000  r2 8084b7a2  r3 ffffff01
02-06 15:53:45.737: I/DEBUG(30):  r4 80c80804  r5 00000013  r6 00000004  r7 00000000
02-06 15:53:45.747: I/DEBUG(30):  r8 80017f40  r9 0000ce48  10 410acc3c  fp 41d48bb8
02-06 15:53:45.747: I/DEBUG(30):  ip 80c7ef9c  sp be8503c4  lr 8084b7a8  pc 8084b0d4  cpsr 80000010
02-06 15:53:45.857: I/DEBUG(30):          #00  pc 0004b0d4  /data/data/com.z3lf.goopenfl/lib/liblime.so
02-06 15:53:45.857: I/DEBUG(30):          #01  pc 0004b7a4  /data/data/com.z3lf.goopenfl/lib/liblime.so
02-06 15:53:45.857: I/DEBUG(30): code around pc:
02-06 15:53:45.867: I/DEBUG(30): 8084b0b4 e8bd8010 e52d4004 e59f0074 e59f4074 
02-06 15:53:45.867: I/DEBUG(30): 8084b0c4 e3e030fe e08f0000 e3a01000 e08f4004 
02-06 15:53:45.867: I/DEBUG(30): 8084b0d4 e300c1ff e1a02004 e2800f41 e2844f41 
02-06 15:53:45.867: I/DEBUG(30): 8084b0e4 e4824005 e2833001 e5c21000 e153000c 
02-06 15:53:45.867: I/DEBUG(30): 8084b0f4 e0802003 0a00000b e3530000 b3a01000 
02-06 15:53:45.867: I/DEBUG(30): code around lr:
02-06 15:53:45.867: I/DEBUG(30): 8084b788 13a03004 e5802024 e5804010 e5803020 
02-06 15:53:45.867: I/DEBUG(30): 8084b798 e8bd0010 e12fff1e e92d4010 ebfffe43 
02-06 15:53:45.867: I/DEBUG(30): 8084b7a8 e59f3008 e08f3003 e5830304 e8bd8010 
02-06 15:53:45.867: I/DEBUG(30): 8084b7b8 00435050 e92d4070 e1a06002 e1a02003 
02-06 15:53:45.867: I/DEBUG(30): 8084b7c8 e5913018 e1a05001 e1a04000 e1a01006 
02-06 15:53:45.877: I/DEBUG(30): stack:
02-06 15:53:45.877: I/DEBUG(30):     be850384  afd4717c  
02-06 15:53:45.877: I/DEBUG(30):     be850388  80017f40  /system/lib/libdvm.so
02-06 15:53:45.877: I/DEBUG(30):     be85038c  0000ce48  [heap]
02-06 15:53:45.877: I/DEBUG(30):     be850390  410acc3c  
02-06 15:53:45.877: I/DEBUG(30):     be850394  afd2983f  /system/lib/libc.so
02-06 15:53:45.877: I/DEBUG(30):     be850398  00000000  
02-06 15:53:45.877: I/DEBUG(30):     be85039c  afd1ca59  /system/lib/libc.so
02-06 15:53:45.877: I/DEBUG(30):     be8503a0  80c80668  /data/data/com.z3lf.goopenfl/lib/liblime.so
02-06 15:53:45.877: I/DEBUG(30):     be8503a4  80c80800  /data/data/com.z3lf.goopenfl/lib/liblime.so
02-06 15:53:45.877: I/DEBUG(30):     be8503a8  00000014  
02-06 15:53:45.877: I/DEBUG(30):     be8503ac  80a64244  /data/data/com.z3lf.goopenfl/lib/liblime.so
02-06 15:53:45.887: I/DEBUG(30):     be8503b0  80c80800  /data/data/com.z3lf.goopenfl/lib/liblime.so
02-06 15:53:45.887: I/DEBUG(30):     be8503b4  80c80610  /data/data/com.z3lf.goopenfl/lib/liblime.so
02-06 15:53:45.887: I/DEBUG(30):     be8503b8  df002777  
02-06 15:53:45.887: I/DEBUG(30):     be8503bc  e3a070ad  
02-06 15:53:45.887: I/DEBUG(30):     be8503c0  00000014  
02-06 15:53:45.887: I/DEBUG(30): #00 be8503c4  80c695cc  /data/data/com.z3lf.goopenfl/lib/liblime.so
02-06 15:53:45.887: I/DEBUG(30): #01 be8503c8  80c695cc  /data/data/com.z3lf.goopenfl/lib/liblime.so
02-06 15:53:45.887: I/DEBUG(30):     be8503cc  b00037f5  /system/bin/linker
02-06 15:53:45.887: I/DEBUG(30):     be8503d0  b000d4ac  
02-06 15:53:45.887: I/DEBUG(30):     be8503d4  b000d4a8  
02-06 15:53:45.887: I/DEBUG(30):     be8503d8  00002732  
02-06 15:53:45.897: I/DEBUG(30):     be8503dc  b00038a7  /system/bin/linker
02-06 15:53:45.897: I/DEBUG(30):     be8503e0  00489000  
02-06 15:53:45.897: I/DEBUG(30):     be8503e4  afd00000  /system/lib/libc.so
02-06 15:53:45.897: I/DEBUG(30):     be8503e8  00000022  
02-06 15:53:45.897: I/DEBUG(30):     be8503ec  b000d3c8  
02-06 15:53:45.897: I/DEBUG(30):     be8503f0  80c7edbc  /data/data/com.z3lf.goopenfl/lib/liblime.so
02-06 15:53:45.897: I/DEBUG(30):     be8503f4  b000d3c8  
02-06 15:53:45.897: I/DEBUG(30):     be8503f8  00002732  
02-06 15:53:45.897: I/DEBUG(30):     be8503fc  b0004f9f  /system/bin/linker
02-06 15:53:45.897: I/DEBUG(30):     be850400  00000022  
02-06 15:53:45.897: I/DEBUG(30):     be850404  b000d454  
02-06 15:53:45.907: I/DEBUG(30):     be850408  b000d3c8  
02-06 15:53:45.907: I/DEBUG(30):     be85040c  00000006  
02-06 15:53:46.787: I/BootReceiver(60): Copying /data/tombstones/tombstone_04 to DropBox (SYSTEM_TOMBSTONE)
02-06 15:53:46.817: D/Zygote(32): Process 678 terminated by signal (4)
02-06 15:53:46.867: D/dalvikvm(60): GC_FOR_MALLOC freed 223K, 45% free 4294K/7687K, external 710K/1222K, paused 61ms
**02-06 15:53:46.867: I/ActivityManager(60): Process com.z3lf.goopenfl (pid 678) has died.**
02-06 15:53:46.947: D/dalvikvm(60): GC_EXPLICIT freed 28K, 44% free 4347K/7687K, external 710K/1222K, paused 53ms
02-06 15:53:46.977: I/WindowManager(60): Setting rotation to 0, animFlags=1
02-06 15:53:46.977: I/ActivityManager(60): Config changed: { scale=1.0 imsi=310/260 loc=en_US touch=3 keys=2/1/2 nav=3/1 orien=1 layout=17 uiMode=17 seq=12}
02-06 15:53:47.067: W/InputManagerService(60): Window already focused, ignoring focus gain of: [email protected]
02-06 15:53:49.327: D/dalvikvm(60): GC_EXPLICIT freed 251K, 46% free 4153K/7687K, external 710K/1222K, paused 107ms
02-06 15:56:00.027: I/dalvikvm(60): Jit: resizing JitTable from 1024 to 2048

warning (i think in this problem):

02-06 15:53:45.567: W/dalvikvm(678): VFY: unable to resolve virtual method 94: Landroid/view/View;.setSystemUiVisibility (I)V
02-06 15:53:45.567: W/dalvikvm(678): VFY: unable to resolve virtual method 12: Landroid/app/Activity;.onTrimMemory (I)V
02-06 15:53:47.067: W/InputManagerService(60): Window already focused, ignoring focus gain of: [email protected]

https://github.com/openfl/lime/blob/ec283d01f9ec5d469698da9abbdb003bf080171b/legacy/templates/android/template/src/org/haxe/lime/GameActivity.java#L537 This is likely to be where the problem is but the call is guarded as expected so it doesn’t break older devices. Somehow it is still being run and is crashing because the function doesn’t exist on Gingerbread. I’m not sure why.

Perhaps we need to wrap these calls into some kind of Java reflection call, maybe the device is getting upset by the code without actually realizing it’s guarded

Hello again!
I did some test on GameActivity.java - did REMOVE(i don’t understand why condition “IF” doesn’t work) actions setSystemUiVisibility, onTrimMemory and tried to test build project with android device monitor on AVD(API10).

log verbose:

02-07 12:52:05.157: I/ActivityManager(60): Starting: Intent { act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] flg=0x10200000 cmp=com.z3lf.goopenfl/.MainActivity } from pid 137
02-07 12:52:05.226: I/ActivityManager(60): Start proc com.z3lf.goopenfl for activity com.z3lf.goopenfl/.MainActivity: pid=303 uid=10034 gids={}
02-07 12:52:05.326: I/WindowManager(60): Setting rotation to 1, animFlags=1
02-07 12:52:05.326: I/ActivityManager(60): Config changed: { scale=1.0 imsi=310/260 loc=en_US touch=3 keys=2/1/2 nav=3/1 orien=2 layout=17 uiMode=17 seq=7}
02-07 12:52:05.517: D/dalvikvm(303): Trying to load lib /data/data/com.z3lf.goopenfl/lib/libstd.so 0x40514a60
02-07 12:52:05.526: D/dalvikvm(303): Added shared lib /data/data/com.z3lf.goopenfl/lib/libstd.so 0x40514a60
02-07 12:52:05.526: D/dalvikvm(303): No JNI_OnLoad found in /data/data/com.z3lf.goopenfl/lib/libstd.so 0x40514a60, skipping init
02-07 12:52:05.526: D/dalvikvm(303): Trying to load lib /data/data/com.z3lf.goopenfl/lib/libregexp.so 0x40514a60
02-07 12:52:05.526: D/dalvikvm(303): Added shared lib /data/data/com.z3lf.goopenfl/lib/libregexp.so 0x40514a60
02-07 12:52:05.526: D/dalvikvm(303): No JNI_OnLoad found in /data/data/com.z3lf.goopenfl/lib/libregexp.so 0x40514a60, skipping init
02-07 12:52:05.526: D/dalvikvm(303): Trying to load lib /data/data/com.z3lf.goopenfl/lib/libzlib.so 0x40514a60
02-07 12:52:05.536: D/dalvikvm(303): Added shared lib /data/data/com.z3lf.goopenfl/lib/libzlib.so 0x40514a60
02-07 12:52:05.536: D/dalvikvm(303): No JNI_OnLoad found in /data/data/com.z3lf.goopenfl/lib/libzlib.so 0x40514a60, skipping init
02-07 12:52:05.536: D/dalvikvm(303): Trying to load lib /data/data/com.z3lf.goopenfl/lib/liblime.so 0x40514a60
02-07 12:52:05.667: I/DEBUG(30): *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
02-07 12:52:05.667: I/DEBUG(30): Build fingerprint: 'generic/sdk/generic:2.3.3/GRI34/101070:eng/test-keys'
02-07 12:52:05.667: I/DEBUG(30): pid: 303, tid: 303  >>> com.z3lf.goopenfl <<<
02-07 12:52:05.667: I/DEBUG(30): signal 4 (SIGILL), code 1 (ILL_ILLOPC), fault addr 8084b0d4
02-07 12:52:05.677: I/DEBUG(30):  r0 80c80804  r1 00000000  r2 8084b7a2  r3 ffffff01
02-07 12:52:05.677: I/DEBUG(30):  r4 80c80804  r5 00000013  r6 00000004  r7 00000000
02-07 12:52:05.677: I/DEBUG(30):  r8 80017f40  r9 0000ce48  10 410acc3c  fp 41d48bb8
02-07 12:52:05.687: I/DEBUG(30):  ip 80c7ef9c  sp be9713c4  lr 8084b7a8  pc 8084b0d4  cpsr 80000010
02-07 12:52:05.776: I/DEBUG(30):          #00  pc 0004b0d4  /data/data/com.z3lf.goopenfl/lib/liblime.so
02-07 12:52:05.776: I/DEBUG(30):          #01  pc 0004b7a4  /data/data/com.z3lf.goopenfl/lib/liblime.so
02-07 12:52:05.776: I/DEBUG(30): code around pc:
02-07 12:52:05.776: I/DEBUG(30): 8084b0b4 e8bd8010 e52d4004 e59f0074 e59f4074 
02-07 12:52:05.776: I/DEBUG(30): 8084b0c4 e3e030fe e08f0000 e3a01000 e08f4004 
02-07 12:52:05.776: I/DEBUG(30): 8084b0d4 e300c1ff e1a02004 e2800f41 e2844f41 
02-07 12:52:05.776: I/DEBUG(30): 8084b0e4 e4824005 e2833001 e5c21000 e153000c 
02-07 12:52:05.787: I/DEBUG(30): 8084b0f4 e0802003 0a00000b e3530000 b3a01000 
02-07 12:52:05.787: I/DEBUG(30): code around lr:
02-07 12:52:05.787: I/DEBUG(30): 8084b788 13a03004 e5802024 e5804010 e5803020 
02-07 12:52:05.787: I/DEBUG(30): 8084b798 e8bd0010 e12fff1e e92d4010 ebfffe43 
02-07 12:52:05.787: I/DEBUG(30): 8084b7a8 e59f3008 e08f3003 e5830304 e8bd8010 
02-07 12:52:05.787: I/DEBUG(30): 8084b7b8 00435050 e92d4070 e1a06002 e1a02003 
02-07 12:52:05.787: I/DEBUG(30): 8084b7c8 e5913018 e1a05001 e1a04000 e1a01006 
02-07 12:52:05.787: I/DEBUG(30): stack:
02-07 12:52:05.787: I/DEBUG(30):     be971384  afd4717c  
02-07 12:52:05.787: I/DEBUG(30):     be971388  80017f40  /system/lib/libdvm.so
02-07 12:52:05.797: I/DEBUG(30):     be97138c  0000ce48  [heap]
02-07 12:52:05.797: I/DEBUG(30):     be971390  410acc3c  
02-07 12:52:05.797: I/DEBUG(30):     be971394  afd2983f  /system/lib/libc.so
02-07 12:52:05.797: I/DEBUG(30):     be971398  00000000  
02-07 12:52:05.797: I/DEBUG(30):     be97139c  afd1ca59  /system/lib/libc.so
02-07 12:52:05.797: I/DEBUG(30):     be9713a0  80c80668  /data/data/com.z3lf.goopenfl/lib/liblime.so
02-07 12:52:05.797: I/DEBUG(30):     be9713a4  80c80800  /data/data/com.z3lf.goopenfl/lib/liblime.so
02-07 12:52:05.797: I/DEBUG(30):     be9713a8  00000014  
02-07 12:52:05.797: I/DEBUG(30):     be9713ac  80a64244  /data/data/com.z3lf.goopenfl/lib/liblime.so
02-07 12:52:05.797: I/DEBUG(30):     be9713b0  80c80800  /data/data/com.z3lf.goopenfl/lib/liblime.so
02-07 12:52:05.797: I/DEBUG(30):     be9713b4  80c80610  /data/data/com.z3lf.goopenfl/lib/liblime.so
02-07 12:52:05.797: I/DEBUG(30):     be9713b8  df002777  
02-07 12:52:05.797: I/DEBUG(30):     be9713bc  e3a070ad  
02-07 12:52:05.797: I/DEBUG(30):     be9713c0  00000014  
02-07 12:52:05.797: I/DEBUG(30): #00 be9713c4  80c695cc  /data/data/com.z3lf.goopenfl/lib/liblime.so
02-07 12:52:05.806: I/DEBUG(30): #01 be9713c8  80c695cc  /data/data/com.z3lf.goopenfl/lib/liblime.so
02-07 12:52:05.806: I/DEBUG(30):     be9713cc  b00037f5  /system/bin/linker
02-07 12:52:05.806: I/DEBUG(30):     be9713d0  b000d4ac  
02-07 12:52:05.806: I/DEBUG(30):     be9713d4  b000d4a8  
02-07 12:52:05.806: I/DEBUG(30):     be9713d8  00002732  
02-07 12:52:05.806: I/DEBUG(30):     be9713dc  b00038a7  /system/bin/linker
02-07 12:52:05.806: I/DEBUG(30):     be9713e0  00489000  
02-07 12:52:05.806: I/DEBUG(30):     be9713e4  afd00000  /system/lib/libc.so
02-07 12:52:05.806: I/DEBUG(30):     be9713e8  00000022  
02-07 12:52:05.806: I/DEBUG(30):     be9713ec  b000d3c8  
02-07 12:52:05.806: I/DEBUG(30):     be9713f0  80c7edbc  /data/data/com.z3lf.goopenfl/lib/liblime.so
02-07 12:52:05.806: I/DEBUG(30):     be9713f4  b000d3c8  
02-07 12:52:05.806: I/DEBUG(30):     be9713f8  00002732  
02-07 12:52:05.816: I/DEBUG(30):     be9713fc  b0004f9f  /system/bin/linker
02-07 12:52:05.816: I/DEBUG(30):     be971400  00000022  
02-07 12:52:05.816: I/DEBUG(30):     be971404  b000d454  
02-07 12:52:05.816: I/DEBUG(30):     be971408  b000d3c8  
02-07 12:52:05.816: I/DEBUG(30):     be97140c  00000006  
02-07 12:52:06.646: I/BootReceiver(60): Copying /data/tombstones/tombstone_02 to DropBox (SYSTEM_TOMBSTONE)
02-07 12:52:06.667: D/Zygote(32): Process 303 terminated by signal (4)
02-07 12:52:06.696: D/dalvikvm(60): GC_FOR_MALLOC freed 271K, 44% free 4238K/7559K, external 710K/1222K, paused 44ms
02-07 12:52:06.706: I/dalvikvm(60): Jit: resizing JitTable from 512 to 1024
02-07 12:52:06.717: I/ActivityManager(60): Process com.z3lf.goopenfl (pid 303) has died.
02-07 12:52:06.807: D/dalvikvm(60): GC_EXPLICIT freed 31K, 43% free 4353K/7559K, external 710K/1222K, paused 53ms
02-07 12:52:06.837: I/WindowManager(60): Setting rotation to 0, animFlags=1
02-07 12:52:06.837: I/ActivityManager(60): Config changed: { scale=1.0 imsi=310/260 loc=en_US touch=3 keys=2/1/2 nav=3/1 orien=1 layout=17 uiMode=17 seq=8}
02-07 12:52:06.957: W/InputManagerService(60): Window already focused, ignoring focus gain of: [email protected]
02-07 12:52:09.097: D/dalvikvm(60): GC_EXPLICIT freed 250K, 46% free 4120K/7559K, external 710K/1222K, paused 60ms

waning:

02-07 12:52:06.957: W/InputManagerService(60): Window already focused, ignoring focus gain of: [email protected]

But nothing is changed - black screen and app turn off. What is the problem?

changes for testing:

@Override protected void onStart () {
	
	super.onStart();

	//if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN)  ...

	for (Extension extension : extensions) {
		extension.onStart ();
		
	}
	
}

@Override public void onTrimMemory (int level) {
	
	//if (Build.VERSION.SDK_INT >= 14)  ...
	
}

update:
API 16 not got warning message about “W/InputManagerService(60)”.

Looking through that error message it actually looks like something is going wrong when loading the lime c++ shared library. Unfortunately the error doesn’t give us much to go on unless terminated by signal 4 means anything to anyone?

A quick Google shows signal 4 can mean invalid instruction on an architecture level. Is it possible the code is for ARM and the AVD is x86 or the other way around? Have you tried running the code on an actual device running Gingerbread?

It can also be a bad function pointer which could again be functions added after Gingerbread being called from c++?

1 Like

Two things that might not work on an older device –

We only use OpenGL ES 2.0 now, no more OpenGL ES 1.1 support.

By default, the builds target ARMV7 only, no ARMV5/ARMV6 binary for an older device. This can be added manually

Do you think one of these might be occuring?

1 Like

Yes, I tried. But i don’t have usb for checking log via android monitor device.

How did it?

Device:
model: samsung gt-6802
cpu: armv6 - compatible processor rev 5 (v6l)
id: gingerbread
opengl supported: 2.0 / OpenGL ES-CM 1.1 (i don’t know what is mean. are both supported?)

checked from app “system info droid”.

update:
link with specifications: http://specdevice.com/showdevice.php?iid=38&lang=en

update2:
How openfl can support API9+ - if it’s not supported ARMV5/6? Is there a way to fix this?

update3:
I did it! Oh jesus… Just added

<architecture name="armv6" if="android" />
<architecture name="armv7" if="android" />

Thank you singmajesty, bubba_169!

1 Like

And last question + log_error (API10):

02-08 06:23:11.187: E/libEGL(456): called unimplemented OpenGL ES API
02-08 06:23:11.187: E/libEGL(456): called unimplemented OpenGL ES API
02-08 06:23:11.187: E/libEGL(456): called unimplemented OpenGL ES API
02-08 06:23:11.187: E/libEGL(456): called unimplemented OpenGL ES API
02-08 06:23:11.187: E/libEGL(456): called unimplemented OpenGL ES API
02-08 06:23:11.187: E/libEGL(456): called unimplemented OpenGL ES API
02-08 06:23:11.187: E/libEGL(456): called unimplemented OpenGL ES API
02-08 06:23:11.187: E/NME(456): Unknown error compiling shader : 
02-08 06:23:11.187: E/NME(456): attribute vec3 aVertex;
02-08 06:23:11.187: E/NME(456): attribute vec2 aTexCoord;
02-08 06:23:11.187: E/NME(456): varying vec2 vTexCoord;
02-08 06:23:11.187: E/NME(456): uniform mat4 uTransform;
02-08 06:23:11.187: E/NME(456): void main (void) {
02-08 06:23:11.187: E/NME(456):   vTexCoord = aTexCoord;
02-08 06:23:11.187: E/NME(456):   gl_Position = vec4 (aVertex, 1.0) * uTransform;
02-08 06:23:11.187: E/NME(456): }
02-08 06:23:11.187: E/libEGL(456): called unimplemented OpenGL ES API
02-08 06:23:11.187: E/libEGL(456): called unimplemented OpenGL ES API
02-08 06:23:11.187: E/libEGL(456): called unimplemented OpenGL ES API
02-08 06:23:11.187: E/libEGL(456): called unimplemented OpenGL ES API
02-08 06:23:11.187: E/libEGL(456): called unimplemented OpenGL ES API
02-08 06:23:11.197: E/libEGL(456): called unimplemented OpenGL ES API
02-08 06:23:11.197: E/libEGL(456): called unimplemented OpenGL ES API
02-08 06:23:11.197: E/libEGL(456): called unimplemented OpenGL ES API
02-08 06:23:11.197: E/libEGL(456): called unimplemented OpenGL ES API
02-08 06:23:11.197: E/libEGL(456): called unimplemented OpenGL ES API
02-08 06:23:11.197: E/libEGL(456): called unimplemented OpenGL ES API

Why so much errors (API10) ? But app work is fine (i think).

API16 not got this errors.

Is it working on your device, with the “onTrimMemory” and such calls still preserved in OpenFL? (as it is now) or did you still need to cancel out that code to get it to run? Thank you! :slight_smile:

Yep. I also getting warning message, but app work is fine. :smile:

1 Like

Thanks so much for finding & reporting the fix for this (see related problems in this thread : http://community.openfl.org/t/minimum-android-api-version) I’m now able to run on my old 2.3.5 device now - Amazing.

1 Like