Hi guys. I am still having this problem. If I remove the navigation component from my app then screenhome loads and works without issue but also without the functionality I want. As soon as I add the navigation component, even if I dont add any blocks and just set the api key, the screen crashes as soon as it is accessed. Is there a known issue with the navigation component and anything else I might be using? The blocks without the nav piece is attached here. If you just add the component and run it you will see it crashes straight away. Does anyone have any ideas on this?Taxi4U.aia (544.8 KB)
Yes, you need to add a Map in the Designer on the screen where you want to use the Navigation component. Otherwise the screen is closed immediately (I don't think this is a crash).
Maybe @ewpatton can clarify and why that happens.
As I said, I've never used this component before. But now I'm curious.
Try this one: Taxi4U2.aia (545.0 KB)
That is interesting. I'll have a play and get back to you.
I don't see this behavior at all when I make an app with a navigation component. If the app is really crashing, what does adb logcat
have to say about it?
I checked it again on several devices (with APK):
- Galaxy Note8 - Android 9
- Xiaomi Redmi Note 5 - Android 9
- Galaxy A3 - Android 8.0
- Galaxy S6 - Android 7
I don't need to test it on all of my test devices ...
As I said without a Map the app crashes (→ no blocks):
This app (with a Map) does not crash:
Here is the Logcat
from Xiaomi Redmi Note 5 (→ NavigationCrash.apk)
Logcat
...
07-21 05:56:13.157 20015 20027 E PermissionCompat: at android.os.Binder.exe
cTransact(Binder.java:735)
07-21 05:56:13.290 2591 2842 E com.miui.home: Failed to open APK '/data/app/co
m.mi.android.globalpersonalassistant-FwQaflAtE0AXGh7EsSLOKQ==/base.apk' I/O erro
r
07-21 05:56:17.173 27865 27865 F linker : CANNOT LINK EXECUTABLE "/system/bin/d
pmd": "/system/lib64/libdpmframework.so" is 32-bit instead of 64-bit
07-21 05:56:17.795 715 775 E ANDR-PERF-MPCTL: Invalid profile no. 0, total p
rofiles 0 only
07-21 05:56:18.304 18781 26061 E zeus-AndroidUtils-[pool-7-thread-31]: top : com
.android.vending
07-21 05:56:18.304 18781 26061 E AD-PLUGIN-SplashController: get miui intent sen
der : com.miui.home
07-21 05:56:18.312 715 775 E ANDR-PERF-MPCTL: Invalid profile no. 0, total p
rofiles 0 only
07-21 05:56:18.313 2063 2609 E ANDR-PERF-JNI: Iop tryGetService failed
07-21 05:56:18.324 2063 2609 E ActivityTrigger: activityStartTrigger: not whit
eListedappinventor.ai_bodymindpower.Navigation/appinventor.ai_bodymindpower.Navi
gation.Screen1/1
07-21 05:56:18.327 2063 2609 E ActivityTrigger: activityResumeTrigger: not whi
teListedappinventor.ai_bodymindpower.Navigation/appinventor.ai_bodymindpower.Nav
igation.Screen1/1
07-21 05:56:18.333 2063 2609 E ActivityTrigger: activityResumeTrigger: not whi
teListedappinventor.ai_bodymindpower.Navigation/appinventor.ai_bodymindpower.Nav
igation.Screen1/1
07-21 05:56:18.385 27871 27871 E ower.Navigatio: Not starting debugger since pro
cess cannot load the jdwp agent.
07-21 05:56:18.452 23006 27580 E SQLiteDatabase: Error inserting period=6942000
preferred_charging_state=1 preferred_network_type=1 target_class=com.google.andr
oid.gms.measurement.PackageMeasurementTaskService required_network_type=0 runtim
e=1595307378436 required_idleness_state=0 source=16 service_kind=0 target_packag
e=com.google.android.gms persistence_level=1 source_version=202414000 last_runti
me=0 user_id=0 job_id=-1 requires_charging=0 tag=Measurement.PackageMeasurementT
askService.UPLOAD_TASK_TAG flex_time=3470000 task_type=0 retry_strategy={"maximu
m_backoff_seconds":{"3600":0},"initial_backoff_seconds":{"30":0},"retry_policy":
{"0":0}}
07-21 05:56:18.452 23006 27580 E SQLiteDatabase: android.database.sqlite.SQLiteC
onstraintException: UNIQUE constraint failed: pending_ops.tag, pending_ops.targe
t_class, pending_ops.target_package, pending_ops.user_id (code 2067 SQLITE_CONST
RAINT_UNIQUE)
07-21 05:56:18.452 23006 27580 E SQLiteDatabase: at android.database.sqli
te.SQLiteConnection.nativeExecuteForLastInsertedRowId(Native Method)
07-21 05:56:18.452 23006 27580 E SQLiteDatabase: at android.database.sqli
te.SQLiteConnection.executeForLastInsertedRowId(SQLiteConnection.java:796)
07-21 05:56:18.452 23006 27580 E SQLiteDatabase: at android.database.sqli
te.SQLiteSession.executeForLastInsertedRowId(SQLiteSession.java:788)
07-21 05:56:18.452 23006 27580 E SQLiteDatabase: at android.database.sqli
te.SQLiteStatement.executeInsert(SQLiteStatement.java:86)
07-21 05:56:18.452 23006 27580 E SQLiteDatabase: at android.database.sqli
te.SQLiteDatabase.insertWithOnConflict(SQLiteDatabase.java:1564)
07-21 05:56:18.452 23006 27580 E SQLiteDatabase: at android.database.sqli
te.SQLiteDatabase.insert(SQLiteDatabase.java:1433)
07-21 05:56:18.452 23006 27580 E SQLiteDatabase: at aquy.a(:com.google.an
droid.gms@202414028@20.24.14 (100400-319035315):175)
07-21 05:56:18.452 23006 27580 E SQLiteDatabase: at aqua.a(:com.google.an
droid.gms@202414028@20.24.14 (100400-319035315):182)
07-21 05:56:18.452 23006 27580 E SQLiteDatabase: at aqua.a(:com.google.an
droid.gms@202414028@20.24.14 (100400-319035315):23)
07-21 05:56:18.452 23006 27580 E SQLiteDatabase: at aqua.a(:com.google.an
droid.gms@202414028@20.24.14 (100400-319035315):177)
07-21 05:56:18.452 23006 27580 E SQLiteDatabase: at aqqk.run(:com.google.
android.gms@202414028@20.24.14 (100400-319035315):9)
07-21 05:56:18.452 23006 27580 E SQLiteDatabase: at smw.b(:com.google.and
roid.gms@202414028@20.24.14 (100400-319035315):12)
07-21 05:56:18.452 23006 27580 E SQLiteDatabase: at smw.run(:com.google.a
ndroid.gms@202414028@20.24.14 (100400-319035315):7)
07-21 05:56:18.452 23006 27580 E SQLiteDatabase: at java.util.concurrent.
ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167)
07-21 05:56:18.452 23006 27580 E SQLiteDatabase: at java.util.concurrent.
ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641)
07-21 05:56:18.452 23006 27580 E SQLiteDatabase: at ssu.run(:com.google.a
ndroid.gms@202414028@20.24.14 (100400-319035315):0)
07-21 05:56:18.452 23006 27580 E SQLiteDatabase: at java.lang.Thread.run(
Thread.java:764)
07-21 05:56:18.674 27871 27871 E AndroidRuntime: FATAL EXCEPTION: main
07-21 05:56:18.674 27871 27871 E AndroidRuntime: Process: appinventor.ai_bodymin
dpower.Navigation, PID: 27871
07-21 05:56:18.674 27871 27871 E AndroidRuntime: java.lang.NoClassDefFoundError:
Failed resolution of: Lorg/osmdroid/util/GeoPoint;
07-21 05:56:18.674 27871 27871 E AndroidRuntime: at java.lang.reflect.Exe
cutable.getParameterTypesInternal(Native Method)
07-21 05:56:18.674 27871 27871 E AndroidRuntime: at java.lang.reflect.Met
hod.getParameterTypes(Method.java:186)
07-21 05:56:18.674 27871 27871 E AndroidRuntime: at java.lang.Class.getDe
claredMethods(Class.java:1881)
07-21 05:56:18.674 27871 27871 E AndroidRuntime: at gnu.bytecode.ClassTyp
e.addMethods(ClassType.java:979)
07-21 05:56:18.674 27871 27871 E AndroidRuntime: at gnu.bytecode.ClassTyp
e.getDeclaredMethods(ClassType.java:725)
07-21 05:56:18.674 27871 27871 E AndroidRuntime: at gnu.bytecode.ClassTyp
e.getMethods(ClassType.java:809)
07-21 05:56:18.674 27871 27871 E AndroidRuntime: at gnu.kawa.reflect.Clas
sMethods.getMethods(ClassMethods.java:106)
07-21 05:56:18.674 27871 27871 E AndroidRuntime: at gnu.kawa.reflect.Clas
sMethods.apply(ClassMethods.java:229)
07-21 05:56:18.674 27871 27871 E AndroidRuntime: at gnu.kawa.reflect.Invo
ke.lookupMethods(Invoke.java:278)
07-21 05:56:18.674 27871 27871 E AndroidRuntime: at gnu.kawa.reflect.Invo
ke.applyN(Invoke.java:185)
07-21 05:56:18.674 27871 27871 E AndroidRuntime: at gnu.mapping.Procedure
N.apply2(ProcedureN.java:39)
07-21 05:56:18.674 27871 27871 E AndroidRuntime: at appinventor.ai_bodymi
ndpower.Navigation.Screen1.$define(Screen1.yail:10253)
07-21 05:56:18.674 27871 27871 E AndroidRuntime: at com.google.appinvento
r.components.runtime.Form.onCreateFinish2(Form.java:415)
07-21 05:56:18.674 27871 27871 E AndroidRuntime: at com.google.appinvento
r.components.runtime.Form.onCreateFinish(Form.java:392)
07-21 05:56:18.674 27871 27871 E AndroidRuntime: at com.google.appinvento
r.components.runtime.Form.onCreate(Form.java:324)
07-21 05:56:18.674 27871 27871 E AndroidRuntime: at appinventor.ai_bodymi
ndpower.Navigation.Screen1.onCreate(Screen1.yail:10003)
07-21 05:56:18.674 27871 27871 E AndroidRuntime: at android.app.Activity.
performCreate(Activity.java:7224)
07-21 05:56:18.674 27871 27871 E AndroidRuntime: at android.app.Activity.
performCreate(Activity.java:7213)
07-21 05:56:18.674 27871 27871 E AndroidRuntime: at android.app.Instrumen
tation.callActivityOnCreate(Instrumentation.java:1272)
07-21 05:56:18.674 27871 27871 E AndroidRuntime: at android.app.ActivityT
hread.performLaunchActivity(ActivityThread.java:2926)
07-21 05:56:18.674 27871 27871 E AndroidRuntime: at android.app.ActivityT
hread.handleLaunchActivity(ActivityThread.java:3081)
07-21 05:56:18.674 27871 27871 E AndroidRuntime: at android.app.servertra
nsaction.LaunchActivityItem.execute(LaunchActivityItem.java:78)
07-21 05:56:18.674 27871 27871 E AndroidRuntime: at android.app.servertra
nsaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:108)
07-21 05:56:18.674 27871 27871 E AndroidRuntime: at android.app.servertra
nsaction.TransactionExecutor.execute(TransactionExecutor.java:68)
07-21 05:56:18.674 27871 27871 E AndroidRuntime: at android.app.ActivityT
hread$H.handleMessage(ActivityThread.java:1831)
07-21 05:56:18.674 27871 27871 E AndroidRuntime: at android.os.Handler.di
spatchMessage(Handler.java:106)
07-21 05:56:18.674 27871 27871 E AndroidRuntime: at android.os.Looper.loo
p(Looper.java:201)
07-21 05:56:18.674 27871 27871 E AndroidRuntime: at android.app.ActivityT
hread.main(ActivityThread.java:6810)
07-21 05:56:18.674 27871 27871 E AndroidRuntime: at java.lang.reflect.Met
hod.invoke(Native Method)
07-21 05:56:18.674 27871 27871 E AndroidRuntime: at com.android.internal.
os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:547)
07-21 05:56:18.674 27871 27871 E AndroidRuntime: at com.android.internal.
os.ZygoteInit.main(ZygoteInit.java:873)
07-21 05:56:18.674 27871 27871 E AndroidRuntime: Caused by: java.lang.ClassNotFo
undException: Didn't find class "org.osmdroid.util.GeoPoint" on path: DexPathLis
t[[zip file "/system/framework/org.apache.http.legacy.boot.jar", zip file "/data
/app/appinventor.ai_bodymindpower.Navigation-CtSQ2tBwOsn3ZrOGoxL41A==/base.apk"]
,nativeLibraryDirectories=[/data/app/appinventor.ai_bodymindpower.Navigation-CtS
Q2tBwOsn3ZrOGoxL41A==/lib/arm64, /system/lib64]]
07-21 05:56:18.674 27871 27871 E AndroidRuntime: at dalvik.system.BaseDex
ClassLoader.findClass(BaseDexClassLoader.java:134)
07-21 05:56:18.674 27871 27871 E AndroidRuntime: at java.lang.ClassLoader
.loadClass(ClassLoader.java:379)
07-21 05:56:18.674 27871 27871 E AndroidRuntime: at java.lang.ClassLoader
.loadClass(ClassLoader.java:312)
07-21 05:56:18.674 27871 27871 E AndroidRuntime: ... 31 more
07-21 05:56:19.186 2063 2088 E ActivityTrigger: activityResumeTrigger: not whi
teListedcom.miui.home/com.miui.home.launcher.Launcher/41501436
07-21 05:56:22.197 27900 27900 F linker : CANNOT LINK EXECUTABLE "/system/bin/d
pmd": "/system/lib64/libdpmframework.so" is 32-bit instead of 64-bit
07-21 05:56:22.617 2591 2591 E Launcher: changeViewByFsGestureState, view=Fit
SystemWindowView, alpha=1.0, scale=1.0
07-21 05:56:22.617 2591 2591 E Launcher: changeViewByFsGestureState, view=Sho
rtcutMenuLayer, alpha=1.0, scale=1.0
07-21 05:56:26.741 2063 2096 E UsbDeviceManager: handle message = 9
07-21 05:56:27.214 27902 27902 F linker : CANNOT LINK EXECUTABLE "/system/bin/d
pmd": "/system/lib64/libdpmframework.so" is 32-bit instead of 64-bit
Okay. I missed the fact that it was just APKs. I tested in the companion and it worked fine. The issue is that Navigation relies on a part of the osmdroid library but the relationship isn't formally captured in the build system. In most cases, people will use a map (which formally asserts the osmdroid dependency). When you don't include the map in the APK version, the navigation component attempts to use a class that doesn't exist. I've put together a fix:
From the beginning it was about a crash with the AKP.
First sentence of this thread:
Thanks for your work on this. Adding the map does fix the issue. I see the discussion has moved on and I am happy to leave that with you guys. Anke, thanks for your help on this. I'll leave you guys to fix what looks like a bug.
Cheers
Robert
No problem. The fix has been merged and will be included in tomorrow's release.
This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.