Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-25289] Android: [ti.map] No static method getAppCurrentActivity()

GitHub Issuen/a
TypeBug
PriorityCritical
StatusClosed
ResolutionDuplicate
Resolution Date2017-09-15T11:55:27.000+0000
Affected Version/sRelease 6.2.0
Fix Version/sn/a
ComponentsAndroid
Labelsn/a
ReporterBrian García
AssigneeUnknown
Created2017-09-14T15:02:23.000+0000
Updated2018-08-06T17:41:07.000+0000

Description

Trying to add an annotation or a circle (I suppose any view we can add to a mapView) throws the following error:
[WARN] :   W/System.err: java.lang.NoSuchMethodError: No static method getAppCurrentActivity()Lorg/appcelerator/titanium/TiBaseActivity; in class Lorg/appcelerator/titanium/TiApplication; or its super classes (declaration of 'org.appcelerator.titanium.TiApplication' appears in /data/app/com.cccccc.xxxxxxxxx-2/base.apk)
[WARN] :   W/System.err: 	at ti.map.CircleProxy.toPx(CircleProxy.java:61)
[WARN] :   W/System.err: 	at ti.map.CircleProxy.processOptions(CircleProxy.java:157)
[WARN] :   W/System.err: 	at ti.map.TiUIMapView.addCircle(TiUIMapView.java:670)
[WARN] :   W/System.err: 	at ti.map.ViewProxy.handleAddCircle(ViewProxy.java:878)
[WARN] :   W/System.err: 	at ti.map.ViewProxy.addCircle(ViewProxy.java:863)
[WARN] :   W/System.err: 	at org.appcelerator.kroll.runtime.v8.V8Object.nativeCallProperty(Native Method)
[WARN] :   W/System.err: 	at org.appcelerator.kroll.runtime.v8.V8Object.callProperty(V8Object.java:73)
[WARN] :   W/System.err: 	at org.appcelerator.kroll.KrollProxy.handleMessage(KrollProxy.java:1158)
[WARN] :   W/System.err: 	at android.os.Handler.dispatchMessage(Handler.java:98)
[WARN] :   W/System.err: 	at android.os.Looper.loop(Looper.java:154)
[WARN] :   W/System.err: 	at android.app.ActivityThread.main(ActivityThread.java:6077)
[WARN] :   W/System.err: 	at java.lang.reflect.Method.invoke(Native Method)
[WARN] :   W/System.err: 	at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:866)
[WARN] :   W/System.err: 	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:756)
[ERROR] :  TiExceptionHandler: (main) [683,29344] ----- Titanium Javascript Runtime Error -----
[ERROR] :  TiExceptionHandler: (main) [0,29344] - In /alloy/controllers/scenarios/map.js:140,19
[ERROR] :  TiExceptionHandler: (main) [0,29344] - Message: Uncaught No static method getAppCurrentActivity()Lorg/appcelerator/titanium/TiBaseActivity; in class Lorg/appcelerator/titanium/TiApplication; or its super classes (declaration of 'org.appcelerator.titanium.TiApplication' appears in /data/app/com.cccccc.xxxxxxxxx-2/base.apk)
[ERROR] :  TiExceptionHandler: (main) [0,29344] - Source:         $.mapView.addCircle(circle);
[ERROR] :  V8Exception: Exception occurred at /alloy/controllers/scenarios/map.js:140: Uncaught No static method getAppCurrentActivity()Lorg/appcelerator/titanium/TiBaseActivity; in class Lorg/appcelerator/titanium/TiApplication; or its super classes (declaration of 'org.appcelerator.titanium.TiApplication' appears in /data/app/com.cccccc.xxxxxxxxx-2/base.apk)
[ERROR] :  V8Exception: No static method getAppCurrentActivity()Lorg/appcelerator/titanium/TiBaseActivity; in class Lorg/appcelerator/titanium/TiApplication; or its super classes (declaration of 'org.appcelerator.titanium.TiApplication' appears in /data/app/com.cccccc.xxxxxxxxx-2/base.apk)

Comments

  1. Gary Mathews 2017-09-14

    This should have been fixed by https://github.com/appcelerator/titanium_mobile/pull/9372, I'll investigate.
  2. Michael Gangolf 2017-09-15

    For a normal annotation this error is shown:
       [ERROR] :  TiApplication: (main) [21140,29082] Sending event: exception on thread: main msg:java.lang.NoSuchMethodError: No static method getAppCurrentActivity()Lorg/appcelerator/titanium/TiBaseActivity; in class Lorg/appcelerator/titanium/TiApplication; or its super classes (declaration of 'org.appcelerator.titanium.TiApplication' appears in /data/app/com.amwins.amlink-1/base.apk); Titanium 6.2.0,2017/09/12 20:39,undefined
       [ERROR] :  TiApplication: java.lang.NoSuchMethodError: No static method getAppCurrentActivity()Lorg/appcelerator/titanium/TiBaseActivity; in class Lorg/appcelerator/titanium/TiApplication; or its super classes (declaration of 'org.appcelerator.titanium.TiApplication' appears in /data/app/com.amwins.amlink-1/base.apk)
       [ERROR] :  TiApplication: 	at ti.map.AnnotationProxy.setIconImageDimensions(AnnotationProxy.java:343)
       
    A workaround for that is to add a custom image because then it won't use https://github.com/appcelerator-modules/ti.map/blob/master/android/src/ti/map/AnnotationProxy.java#L343
  3. Hans Knöchel 2017-09-15

    Resolving as Duplicate of TIMOB-25288 - we are taking this into immediate resolution for SDK 6.2.1 and Ti.Map 3.3.1. Once the updated Ti.Map is available, you can use it already without waiting for 6.2.1. Please stay tuned a bit more!
  4. Eric Merriman 2018-08-06

    Closing as a duplicate. If this is in error, please reopen.

JSON Source