Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-16114] Android: GeolocationModule not found when referenced from local variable

GitHub Issuen/a
TypeBug
PriorityLow
StatusClosed
ResolutionCannot Reproduce
Resolution Date2019-04-03T22:11:28.000+0000
Affected Version/sn/a
Fix Version/sn/a
ComponentsAndroid
LabelssupportTeam
ReporterEduardo Gomez
AssigneeUnknown
Created2013-12-30T22:02:12.000+0000
Updated2019-04-03T22:11:28.000+0000

Description

Issue description

Whenever the Ti.Geolocation module is referenced to Javascript variable the build process errors with:
[ERROR] :  JNIUtil: Couldn't find Java class: ti/modules/titanium/geolocation/GeolocationModule
[WARN] :   W/System.err: java.lang.NoClassDefFoundError: ti/modules/titanium/geolocation/GeolocationModule
[WARN] :   W/System.err:   at org.appcelerator.kroll.runtime.v8.V8Runtime.nativeRunModule(Native Method)
[WARN] :   W/System.err:   at org.appcelerator.kroll.runtime.v8.V8Runtime.doRunModule(V8Runtime.java:159)
[WARN] :   W/System.err:   at org.appcelerator.kroll.KrollRuntime.handleMessage(KrollRuntime.java:289)
[WARN] :   W/System.err:   at org.appcelerator.kroll.runtime.v8.V8Runtime.handleMessage(V8Runtime.java:185)
[WARN] :   W/System.err:   at android.os.Handler.dispatchMessage(Handler.java:95)
[WARN] :   W/System.err:   at android.os.Looper.loop(Looper.java:137)
[WARN] :   W/System.err:   at org.appcelerator.kroll.KrollRuntime$KrollRuntimeThread.run(KrollRuntime.java:112)
[WARN] :   W/System.err: Caused by: java.lang.ClassNotFoundException: ti.modules.titanium.geolocation.GeolocationModule
[WARN] :   W/System.err:   at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:61)
[WARN] :   W/System.err:   at java.lang.ClassLoader.loadClass(ClassLoader.java:501)
[WARN] :   W/System.err:   at java.lang.ClassLoader.loadClass(ClassLoader.java:461)
[WARN] :   W/System.err:   ... 7 more

Steps to reproduce

Although we were unable to replicate the error, the developer was setting this: var geo = Ti.Geolocation; After commenting it out the Ti Project was able to build at device. The simple app is attached.

Devices under test

Error was reproduced on Galaxy S3 w/ 4.1.2 Not reproducible w/ Android 4.0.4 nor Droid razr 2.3.5

Attachments

FileDateSize
AndroidEmulator_4.1.2.txt2013-12-30T22:02:12.000+000014825
GeoTest.zip2013-12-30T22:02:12.000+00003136365

Comments

  1. Alan Hutton 2019-04-03

    Not reproducible w/ Android 4.0.4 nor Droid razr 2.3.5

JSON Source