{ "id": "175398", "key": "AC-6579", "fields": { "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false }, "project": { "id": "12217", "key": "AC", "name": "Appcelerator - INBOX", "projectCategory": { "id": "10000", "description": "", "name": "Customer Service" } }, "resolution": { "id": "7", "description": "", "name": "Invalid" }, "resolutiondate": "2020-08-04T22:34:32.000+0000", "created": "2020-08-04T13:03:27.000+0000", "labels": [], "versions": [], "issuelinks": [], "assignee": { "name": "amukherjee", "key": "amukherjee", "displayName": "Abir Mukherjee", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2020-08-04T22:34:32.000+0000", "status": { "description": "The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.", "name": "Closed", "id": "6", "statusCategory": { "id": 3, "key": "done", "colorName": "green", "name": "Done" } }, "components": [], "description": "I'm testing my app with 9.1.0.v20200724110711 and I am using adaptive icons:\r\n\r\n{code}\r\n\r\n{code}\r\n\r\n/app/platform/android/res/mipmap-anydpi-v26/appicon_round.xml / appicon.xml\r\n\r\n{code}\r\n\r\n\r\n \r\n \r\n\r\n{code}\r\n\r\nand an appcicon.png in the mipmap-mdpi - xxxhdpi folders.\r\n\r\nWhen I launch my app it shows this error:\r\n\r\n{code}\r\n[ERROR] TiAssetHelper: Error while opening asset \"Resources/images/appicon.png\":\r\n[ERROR] TiAssetHelper: java.io.FileNotFoundException: Resources/images/appicon.png\r\n[ERROR] TiAssetHelper: at android.content.res.AssetManager.nativeOpenAsset(Native Method)\r\n[ERROR] TiAssetHelper: at android.content.res.AssetManager.open(AssetManager.java:824)\r\n[ERROR] TiAssetHelper: at android.content.res.AssetManager.open(AssetManager.java:801)\r\n[ERROR] TiAssetHelper: at org.appcelerator.kroll.util.KrollAssetHelper.openAsset(KrollAssetHelper.java:140)\r\n[ERROR] TiAssetHelper: at org.appcelerator.titanium.io.TiResourceFile.getInputStream(TiResourceFile.java:71)\r\n[ERROR] TiAssetHelper: at org.appcelerator.titanium.TiBlob.getInputStream(TiBlob.java:359)\r\n[ERROR] TiAssetHelper: at org.appcelerator.titanium.TiBlob.guessContentTypeFromStream(TiBlob.java:193)\r\n[ERROR] TiAssetHelper: at org.appcelerator.titanium.TiBlob.loadBitmapInfo(TiBlob.java:259)\r\n[ERROR] TiAssetHelper: at org.appcelerator.titanium.TiBlob.blobFromFile(TiBlob.java:122)\r\n[ERROR] TiAssetHelper: at org.appcelerator.titanium.TiBlob.blobFromFile(TiBlob.java:105)\r\n[ERROR] TiAssetHelper: at ti.modules.titanium.ui.ShortcutItemProxy.handleCreationDict(ShortcutItemProxy.java:94)\r\n[ERROR] TiAssetHelper: at org.appcelerator.kroll.KrollProxy.handleCreationArgs(KrollProxy.java:202)\r\n[ERROR] TiAssetHelper: at org.appcelerator.kroll.KrollProxy.setupProxy(KrollProxy.java:128)\r\n[ERROR] TiAssetHelper: at org.appcelerator.kroll.KrollProxy.createProxy(KrollProxy.java:137)\r\n[ERROR] TiAssetHelper: at org.appcelerator.kroll.runtime.v8.V8Function.nativeInvoke(Native Method)\r\n[ERROR] TiAssetHelper: at org.appcelerator.kroll.runtime.v8.V8Function.callSync(V8Function.java:55)\r\n[ERROR] TiAssetHelper: at org.appcelerator.kroll.runtime.v8.V8Function.call(V8Function.java:41)\r\n[ERROR] TiAssetHelper: at ti.modules.titanium.TitaniumModule$Timer.run(TitaniumModule.java:156)\r\n[ERROR] TiAssetHelper: at android.os.Handler.handleCallback(Handler.java:883)\r\n[ERROR] TiAssetHelper: at android.os.Handler.dispatchMessage(Handler.java:100)\r\n[ERROR] TiAssetHelper: at android.os.Looper.loop(Looper.java:214)\r\n[ERROR] TiAssetHelper: at android.app.ActivityThread.main(ActivityThread.java:7356)\r\n[ERROR] TiAssetHelper: at java.lang.reflect.Method.invoke(Native Method)\r\n[ERROR] TiAssetHelper: at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:492)\r\n[ERROR] TiAssetHelper: at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:930)\r\n{code}\r\n\r\nbut the icon is visible. No error with 9.0.2.GA!\r\n\r\nDevice: Pixel 4 (Android 10)", "attachment": [], "flagged": false, "summary": "Android: TiAssetHelper - App icon error when launching app", "creator": { "name": "michael", "key": "michael", "displayName": "Michael Gangolf", "active": true, "timeZone": "Europe/Berlin" }, "subtasks": [], "reporter": { "name": "michael", "key": "michael", "displayName": "Michael Gangolf", "active": true, "timeZone": "Europe/Berlin" }, "environment": null, "comment": { "comments": [ { "id": "456334", "author": { "name": "jquick", "key": "jquick", "displayName": "Joshua Quick", "active": true, "timeZone": "America/Los_Angeles" }, "body": "[~michael], from looking at the stacktrace, your app is attempting to create a shortcut using \"appicon.png\" and it's failing to find it. In your Titanium code, look for a call to the {{createShortcutItem()}} method. What's the \"icon\" property set to?", "updateAuthor": { "name": "jquick", "key": "jquick", "displayName": "Joshua Quick", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2020-08-04T16:17:49.000+0000", "updated": "2020-08-04T16:17:49.000+0000" }, { "id": "456335", "author": { "name": "michael", "key": "michael", "displayName": "Michael Gangolf", "active": true, "timeZone": "Europe/Berlin" }, "body": "Oh, that's embarrassing :D\r\n\r\n{code}\r\n\tshortcut = Ti.UI.createShortcutItem({\r\n\t\tid: 'id_checkin',\r\n\t\ttitle: 'Checkin',\r\n\t\ticon: \"/images/appicon.png\",\r\n\t\tdescription: 'Quick checkin'\r\n\t});\r\n\tshortcut.show();\r\n{code}\r\n\r\nI had that in my code and the icon is not in the /images/ folder! Can be closed :) Will need to look at the new Shortcut stuff before implementing it!", "updateAuthor": { "name": "michael", "key": "michael", "displayName": "Michael Gangolf", "active": true, "timeZone": "Europe/Berlin" }, "created": "2020-08-04T16:26:56.000+0000", "updated": "2020-08-04T16:26:56.000+0000" }, { "id": "456336", "author": { "name": "jquick", "key": "jquick", "displayName": "Joshua Quick", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Great! Happy to help.\r\n\r\nFYI: Our shortcut API will be undergoing one more change in 9.1.0 before release. We're introduce a new {{Ti.UI.Shortcut}} module which is cross-platform between Android and iOS. Here is a sneak-peek.\r\nhttps://github.com/appcelerator/titanium_mobile/pull/11857\r\n", "updateAuthor": { "name": "jquick", "key": "jquick", "displayName": "Joshua Quick", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2020-08-04T17:03:06.000+0000", "updated": "2020-08-04T17:03:06.000+0000" } ], "maxResults": 3, "total": 3, "startAt": 0 } } }