[AC-4635] Android: Ti.Map 3.0.1 crashing on 6.0.0.GA
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | n/a |
Status | Closed |
Resolution | Cannot Reproduce |
Resolution Date | 2016-11-30T15:03:06.000+0000 |
Affected Version/s | n/a |
Fix Version/s | n/a |
Components | Appcelerator Modules |
Labels | Ti.Map, module |
Reporter | Uriel Lizama |
Assignee | Shak Hossain |
Created | 2016-11-21T21:19:08.000+0000 |
Updated | 2016-11-30T15:03:06.000+0000 |
Description
When using the following code:
var Map = require("ti.map");
var win = Ti.UI.createWindow();
var anno = Map.createAnnotation({
latitude: "38.7334226",
longitude: "-77.7719012",
title: "Location Title",
subtitle: "Location Subtitle"
});
var map = Map.createView({
width: Ti.UI.FILL,
height: 120,
mapType: Map.NORMAL_TYPE,
regionFit: true,
userLocation: true,
annotations: [anno],
region: {
latitude: "38.7334226",
latitudeDelta: 0.05,
longitude: "-77.7719012",
longitudeDelta: 0.05
}
});
win.add(map);
win.open()
The app crashes with the following error:
[ERROR] AndroidRuntime: FATAL EXCEPTION: main
[ERROR] AndroidRuntime: Process: APP, PID: 13920
[ERROR] AndroidRuntime: java.lang.NoClassDefFoundError: com.google.android.gms.maps.GoogleMapOptions
[ERROR] AndroidRuntime: at ti.map.TiUIMapView.createFragment(TiUIMapView.java:108)
[ERROR] AndroidRuntime: at org.appcelerator.titanium.view.TiUIFragment.<init>(TiUIFragment.java:50)
[ERROR] AndroidRuntime: at ti.map.TiUIMapView.<init>(TiUIMapView.java:69)
[ERROR] AndroidRuntime: at ti.map.ViewProxy.createView(ViewProxy.java:80)
[ERROR] AndroidRuntime: at org.appcelerator.titanium.proxy.TiViewProxy.handleGetView(TiViewProxy.java:490)
[ERROR] AndroidRuntime: at org.appcelerator.titanium.proxy.TiViewProxy.getOrCreateView(TiViewProxy.java:476)
[ERROR] AndroidRuntime: at org.appcelerator.titanium.proxy.TiViewProxy.realizeViews(TiViewProxy.java:514)
[ERROR] AndroidRuntime: at org.appcelerator.titanium.proxy.TiViewProxy.handleGetView(TiViewProxy.java:498)
[ERROR] AndroidRuntime: at org.appcelerator.titanium.proxy.TiViewProxy.getOrCreateView(TiViewProxy.java:476)
[ERROR] AndroidRuntime: at org.appcelerator.titanium.proxy.TiViewProxy.realizeViews(TiViewProxy.java:514)
[ERROR] AndroidRuntime: at org.appcelerator.titanium.proxy.TiViewProxy.handleGetView(TiViewProxy.java:498)
[ERROR] AndroidRuntime: at org.appcelerator.titanium.proxy.TiViewProxy.getOrCreateView(TiViewProxy.java:476)
[ERROR] AndroidRuntime: at org.appcelerator.titanium.proxy.TiViewProxy.handleAdd(TiViewProxy.java:677)
[ERROR] AndroidRuntime: at org.appcelerator.titanium.proxy.TiViewProxy.add(TiViewProxy.java:571)
[ERROR] AndroidRuntime: at ti.modules.titanium.ui.WindowProxy.windowCreated(WindowProxy.java:262)
[ERROR] AndroidRuntime: at org.appcelerator.titanium.TiActivityWindows.windowCreated(TiActivityWindows.java:33)
[ERROR] AndroidRuntime: at org.appcelerator.titanium.TiBaseActivity.windowCreated(TiBaseActivity.java:559)
[ERROR] AndroidRuntime: at org.appcelerator.titanium.TiBaseActivity.onCreate(TiBaseActivity.java:673)
[ERROR] AndroidRuntime: at org.appcelerator.titanium.TiActivity.onCreate(TiActivity.java:18)
[ERROR] AndroidRuntime: at android.app.Activity.performCreate(Activity.java:5966)
[ERROR] AndroidRuntime: at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1106)
[ERROR] AndroidRuntime: at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2408)
[ERROR] AndroidRuntime: at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2521)
[ERROR] AndroidRuntime: at android.app.ActivityThread.access$800(ActivityThread.java:162)
[ERROR] AndroidRuntime: at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1412)
[ERROR] AndroidRuntime: at android.os.Handler.dispatchMessage(Handler.java:106)
[ERROR] AndroidRuntime: at android.os.Looper.loop(Looper.java:189)
[ERROR] AndroidRuntime: at android.app.ActivityThread.main(ActivityThread.java:5535)
[ERROR] AndroidRuntime: at java.lang.reflect.Method.invoke(Native Method)
[ERROR] AndroidRuntime: at java.lang.reflect.Method.invoke(Method.java:372)
[ERROR] AndroidRuntime: at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:950)
[ERROR] AndroidRuntime: at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:745)
Hello, Try using the below code. Android permissing for location access has changed from Android 6 and up http://stackoverflow.com/questions/32936011/access-fine-location-permission, See guide: http://docs.appcelerator.com/platform/latest/#!/api/Titanium.Android-method-requestPermissions
Thanks.