Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-28358] Android: "ti.map" module logs theme errors

GitHub Issuen/a
TypeBug
PriorityLow
StatusClosed
ResolutionFixed
Resolution Date2021-06-28T22:15:17.000+0000
Affected Version/sn/a
Fix Version/sRelease 10.0.1
ComponentsAndroid
Labelsandroid, maps, module, theme, ti.map
ReporterJoshua Quick
AssigneeJoshua Quick
Created2021-02-18T07:53:18.000+0000
Updated2021-06-28T22:15:33.000+0000

Description

*Summary:* Show the "ti.map" module's map view causes theme errors to be logged. *Steps to reproduce:*

Set up a Titanium project to use the newest "ti.map" module.

Build and run the below code on Android.

In the log, notice the following error will be logged on app startup.

[ERROR] ThemeUtils: View class com.google.maps.android.ui.SquareTextView is an AppCompat widget that can only be used with a Theme.AppCompat theme (or descendant).
app.js
const map = require("ti.map");
const window = Ti.UI.createWindow();
window.add(map.createView({
	width: Ti.UI.FILL,
	height: Ti.UI.FILL,
}));
window.open();
*Cause:* It's caused by our marker clustering feature. We're supposed to pass an Activity to the Java ClusterManager constructor, but we're passing it an Application instance instead. [TiUIMapView.java](https://github.com/appcelerator-modules/ti.map/blob/2e77f40617b68b970cb24bf120bd46b881b96b13/android/src/ti/map/TiUIMapView.java#L208-L212) *Note:* This error appears to be harmless. The map view and its markers still function correctly.

Comments

  1. Joshua Quick 2021-02-18

    PR: https://github.com/appcelerator-modules/ti.map/pull/402
  2. Joshua Quick 2021-06-24

    PR (titanium_mobile): https://github.com/appcelerator/titanium_mobile/pull/12919
  3. Christopher Williams 2021-06-28

    merged to master (for titanium_mobile)
  4. Ewan Harris 2021-06-28

    10_0_X backport merged

JSON Source