{ "id": "172566", "key": "AC-6012", "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": "8", "description": "", "name": "Needs more info" }, "resolutiondate": "2018-11-29T23:54:32.000+0000", "created": "2018-11-07T06:22:00.000+0000", "labels": [], "versions": [ { "id": "17032", "name": "Appcelerator Studio 4.3.0", "archived": false, "released": false } ], "issuelinks": [], "assignee": { "name": "shossain", "key": "shossain", "displayName": "Shak Hossain", "active": false, "timeZone": "America/Los_Angeles" }, "updated": "2018-11-29T23:54:33.000+0000", "status": { "description": "A resolution has been taken, and it is awaiting verification by reporter. From here issues are either reopened, or are closed.", "name": "Resolved", "id": "5", "statusCategory": { "id": 3, "key": "done", "colorName": "green", "name": "Done" } }, "components": [ { "id": "14550", "name": "Appcelerator Modules", "description": "Please enter tickets related to Modules here." } ], "description": "Hi,\r\n\r\nI'm trying use the admod module in android alloy app and I'm taking an issue. (No problem in IOS with same code).\r\n\r\nThis is my error code:\r\n\r\nERROR] : TiExceptionHandler: (main) [75,2102] /alloy/controllers/home.js:957\r\n[ERROR] : TiExceptionHandler: $.containerAdmod.requestAd();\r\n[ERROR] : TiExceptionHandler: ^\r\n[ERROR] : TiExceptionHandler: Error: Attempt to invoke virtual method 'void ti.admob.View.requestAd(org.appcelerator.kroll.KrollDict)' on a null object reference\r\n\r\n\r\nI´m not sure what is the problem.Please can you help me? I think is a problem how I'm using this module in alloy but I'm not sure. I have searching in google but i couldn´t find a sample with this implementation.\r\n\r\nThanks in advance!\r\n\r\nRegards.\r\n", "attachment": [ { "id": "65849", "filename": "build_android.log", "author": { "name": "alexcc", "key": "alexcc", "displayName": "alejandro_capel", "active": true, "timeZone": "Europe/Madrid" }, "created": "2018-11-13T06:28:05.000+0000", "size": 873734, "mimeType": "text/plain" }, { "id": "65857", "filename": "error admod.jpg", "author": { "name": "alexcc", "key": "alexcc", "displayName": "alejandro_capel", "active": true, "timeZone": "Europe/Madrid" }, "created": "2018-11-14T19:43:47.000+0000", "size": 83066, "mimeType": "image/jpeg" }, { "id": "65864", "filename": "error alloy in device.rtf", "author": { "name": "alexcc", "key": "alexcc", "displayName": "alejandro_capel", "active": true, "timeZone": "Europe/Madrid" }, "created": "2018-11-15T19:38:07.000+0000", "size": 65896, "mimeType": "text/rtf" }, { "id": "65859", "filename": "Screenshot_20181115-111548.png", "author": { "name": "rmitro", "key": "rmitro", "displayName": "Rakhi Mitro", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2018-11-15T05:29:26.000+0000", "size": 48653, "mimeType": "image/png" }, { "id": "65856", "filename": "test admod alloy.zip", "author": { "name": "alexcc", "key": "alexcc", "displayName": "alejandro_capel", "active": true, "timeZone": "Europe/Madrid" }, "created": "2018-11-14T19:43:31.000+0000", "size": 1639216, "mimeType": "application/zip" } ], "flagged": false, "summary": "requestAD failure in Alloy", "creator": { "name": "alexcc", "key": "alexcc", "displayName": "alejandro_capel", "active": true, "timeZone": "Europe/Madrid" }, "subtasks": [], "reporter": { "name": "alexcc", "key": "alexcc", "displayName": "alejandro_capel", "active": true, "timeZone": "Europe/Madrid" }, "environment": "Dev", "comment": { "comments": [ { "id": "443473", "author": { "name": "alexcc", "key": "alexcc", "displayName": "alejandro_capel", "active": true, "timeZone": "Europe/Madrid" }, "body": "Please, any sample with admob module using alloy in android?\r\n\r\nThanks!!!", "updateAuthor": { "name": "alexcc", "key": "alexcc", "displayName": "alejandro_capel", "active": true, "timeZone": "Europe/Madrid" }, "created": "2018-11-11T08:49:10.000+0000", "updated": "2018-11-11T08:49:10.000+0000" }, { "id": "443485", "author": { "name": "rmitro", "key": "rmitro", "displayName": "Rakhi Mitro", "active": false, "timeZone": "America/Los_Angeles" }, "body": "Hello,\r\n\r\nThanks for your feedback. Are you using studio 4.3.0? Can you try [this|https://github.com/appcelerator-modules/ti.admob/tree/master/android/example] one on android classic ? If it works for you on android, please convert this code to alloy.\r\n\r\n", "updateAuthor": { "name": "rmitro", "key": "rmitro", "displayName": "Rakhi Mitro", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2018-11-12T11:18:01.000+0000", "updated": "2018-11-12T11:18:01.000+0000" }, { "id": "443491", "author": { "name": "alexcc", "key": "alexcc", "displayName": "alejandro_capel", "active": true, "timeZone": "Europe/Madrid" }, "body": "Hi,\r\n\r\nYes, Sure. I tested in classic and it was sucesfully. No problem with ios alloy environemt. The Problem is when a call to method requestAd() for recovering the view. If I don´t use this method in code there is no error but obviously app doen´t show the admod view. \r\n\r\nPlease, i have been searching in google but I couldn´t find a sample of using this component with Alloy in Android. Do you have any sample?. It´s a pity in sample component there is not a sample code.\r\n\r\nThanks in advance.\r\n\r\n", "updateAuthor": { "name": "alexcc", "key": "alexcc", "displayName": "alejandro_capel", "active": true, "timeZone": "Europe/Madrid" }, "created": "2018-11-12T12:02:24.000+0000", "updated": "2018-11-12T12:02:24.000+0000" }, { "id": "443503", "author": { "name": "rmitro", "key": "rmitro", "displayName": "Rakhi Mitro", "active": false, "timeZone": "America/Los_Angeles" }, "body": "Hello,\r\nThanks for your feedback. Can you please share your complete environment details and console logs on a separate text file here? Need to check that.\r\n\r\n", "updateAuthor": { "name": "rmitro", "key": "rmitro", "displayName": "Rakhi Mitro", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2018-11-13T04:45:36.000+0000", "updated": "2018-11-13T04:45:36.000+0000" }, { "id": "443505", "author": { "name": "alexcc", "key": "alexcc", "displayName": "alejandro_capel", "active": true, "timeZone": "Europe/Madrid" }, "body": " [^build_android.log] \r\n\r\nhome.xml :\r\n\r\n\r\n\t\r\n\t\t\r\n\t\t\t \t\t\r\n\t\t\t\r\n\t \t\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t \t\r\n\t \t\r\n\t \t\r\n\t\t\r\n\t\t \r\n\t\t\r\n\r\n\t\r\n\r\n\r\n\r\nhome.tss:\r\n\r\n\"#window\": {\r\n\tbackgroundColor:\"black\",\r\n\textendEdges: Titanium.UI.EXTEND_EDGE_TOP,\r\n\tnavBarHidden: true,\r\n\torientationModes: [Ti.UI.PORTRAIT]\r\n}\r\n\r\n\"#window[platform=android]\": {\r\n\texitOnClose: true\r\n}\r\n\r\n\"#container\": {\r\n\ttop: -70,\r\n\tleft: 0,\r\n\twidth: Ti.UI.FILL,\r\n\theight: Alloy.Globals.TamanoVentana\r\n}\r\n\r\n\r\n\"#containerAdmod\": {\r\n\ttop: Alloy.Globals.TopAdmod,\r\n\tleft: 0,\r\n\twidth: Ti.UI.FILL,\r\n\theight: Alloy.Globals.TamanoAdmod\r\n}\r\n\r\netc...\r\n\r\nhome.js (important code..):\r\n\r\n\r\nfunction init() {\r\n\r\n PutAdmod(0);\r\n \r\n\tconfigureStaticCells();\r\n\tClasic(sound);\r\n\r\n \r\n\tgetConfig();\r\n \r\n\tgetLists();\r\n \r\n\t// not required when loading local data\r\n\t $.activity_indicator.show();\r\n \r\n\tif (OS_IOS) {\r\n\t\t$.navbar.back_button.hide();\r\n\t}\r\n \r\n\tif (OS_ANDROID) {\r\n\t\t$.window.addEventListener('open', function(e){\r\n\t\t\t$.search_textfield.hide();\r\n\t\t});\r\n\t}\r\n}\r\ninit();\r\n\r\n//PutAdmod function\r\n\r\nfunction PutAdmod( value)\r\n{\r\n\r\nTi.API.info('start admod ...');\r\n \t\r\n\r\n _publisherid = 'ca-app-pub-22222.......';\r\n\r\n\r\nvar Admob = require('ti.admob');\r\n\r\n\r\nvar adView = Admob.createView({\r\n\t\t bottom: value, \r\n\t\t left: 0,\r\n\t\t width: PosicionarAncho(99),\r\n\t\t height: PosicionarAlto(10),\r\n debugEnabled: false, // If enabled, a dummy value for `adUnitId` will be used to test\r\n adType: Admob.AD_TYPE_BANNER,\r\n\t\t adUnitId: _publisherid, // You can get your own at http: //www.admob.com/\r\n contentURL: 'http://www.alexcmobile.com', // URL string for a webpage whose content matches the app content.\r\n\t\t adBackgroundColor: 'transparent',\r\n gender: Admob.GENDER_MALE, // GENDER_MALE or GENDER_FEMALE, default: undefined\r\n keywords: ['Mythology', 'Gods']\t\r\n});\r\n\r\nadView.addEventListener(Admob.AD_RECEIVED, function() {\r\n\tTi.API.info('Did receive ad!');\r\n});\r\nadView.addEventListener(Admob.AD_NOT_RECEIVED, function(e) {\r\n\tTi.API.info('Failed to receive ad: ' + e.error);\r\n});\r\n\r\n//here the error\r\nadMobView.requestAd();\r\n$.containerAdmod.add(adView);\r\n\r\n}\r\n\r\n", "updateAuthor": { "name": "alexcc", "key": "alexcc", "displayName": "alejandro_capel", "active": true, "timeZone": "Europe/Madrid" }, "created": "2018-11-13T06:34:12.000+0000", "updated": "2018-11-13T06:34:12.000+0000" }, { "id": "443508", "author": { "name": "rmitro", "key": "rmitro", "displayName": "Rakhi Mitro", "active": false, "timeZone": "America/Los_Angeles" }, "body": "Thanks for your feedback. We checked your file. Unable to find any error message. Can you please double check?", "updateAuthor": { "name": "rmitro", "key": "rmitro", "displayName": "Rakhi Mitro", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2018-11-13T06:49:27.000+0000", "updated": "2018-11-13T06:49:27.000+0000" }, { "id": "443531", "author": { "name": "alexcc", "key": "alexcc", "displayName": "alejandro_capel", "active": true, "timeZone": "Europe/Madrid" }, "body": "Hi again,\r\n\r\nYes, the error doesn't write in log file. It´s happens in runtime. I'm not sure this one is due to using Alloy. The error is right here: adMobView.requestAd() . As you can see, Alloy's view has not yet been opened, which is just the next line in the code -> $.containerAdmod.add(adView);\r\n\r\nWhat is the meaning of this error?\r\n[ERROR] : TiExceptionHandler: Error: Attempt to invoke virtual method 'void ti.admob.View.requestAd(org.appcelerator.kroll.KrollDict)' on a null object reference .\r\n\r\nits seems the poblem comes with View, rigth?\r\n\r\nThanks.", "updateAuthor": { "name": "alexcc", "key": "alexcc", "displayName": "alejandro_capel", "active": true, "timeZone": "Europe/Madrid" }, "created": "2018-11-13T18:31:23.000+0000", "updated": "2018-11-13T18:31:23.000+0000" }, { "id": "443562", "author": { "name": "rmitro", "key": "rmitro", "displayName": "Rakhi Mitro", "active": false, "timeZone": "America/Los_Angeles" }, "body": "Hello,\r\nThanks for your feedback. Please share your full test project here to reproduce the issue on our end.", "updateAuthor": { "name": "rmitro", "key": "rmitro", "displayName": "Rakhi Mitro", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2018-11-14T08:23:01.000+0000", "updated": "2018-11-14T08:23:01.000+0000" }, { "id": "443599", "author": { "name": "alexcc", "key": "alexcc", "displayName": "alejandro_capel", "active": true, "timeZone": "Europe/Madrid" }, "body": "OK. I send u a custom project with alloy functionality. In another file , the error in emulator.\r\n\r\nPlease let me know any question.\r\n\r\nThanks in advance.", "updateAuthor": { "name": "alexcc", "key": "alexcc", "displayName": "alejandro_capel", "active": true, "timeZone": "Europe/Madrid" }, "created": "2018-11-14T19:44:47.000+0000", "updated": "2018-11-14T19:44:47.000+0000" }, { "id": "443624", "author": { "name": "rmitro", "key": "rmitro", "displayName": "Rakhi Mitro", "active": false, "timeZone": "America/Los_Angeles" }, "body": "[~alexcc],\r\n\r\nThanks for your feedback. Tested your issue and its works as expected on android device. See attachment section for output. Download the sample test project from [here|https://www.dropbox.com/s/bhpkvt4vi8gvu58/testAlloy.zip?dl=0],run on your environment and let us know how it goes.", "updateAuthor": { "name": "rmitro", "key": "rmitro", "displayName": "Rakhi Mitro", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2018-11-15T05:32:54.000+0000", "updated": "2018-11-15T05:32:54.000+0000" }, { "id": "443662", "author": { "name": "alexcc", "key": "alexcc", "displayName": "alejandro_capel", "active": true, "timeZone": "Europe/Madrid" }, "body": "Hi Rakhi,\r\n\r\nI have loaded your program in device and I have the error however now I have a very large trace. [^error alloy in device.rtf] \r\n\r\nIts seems the reason is :\r\n\r\n[INFO] : zygote64: Caused by: java.lang.ClassNotFoundException: Didn't find class \"android.webkit.TracingController\" on path: DexPathList[[zip file \"/data/app/com.android.chrome-PijQzE41jAPf1Jo6KRDwGg==/base.apk\"],nativeLibraryDirectories=[/data/app/com.android.chrome-PijQzE41jAPf1Jo6KRDwGg==/lib/arm64, /data/app/com.android.chrome-PijQzE41jAPf1Jo6KRDwGg==/base.apk!/lib/arm64-v8a, /system/lib64, /system/vendor/lib64]]\r\n[INFO\r\n\r\nCan you have a look ,please?\r\n\r\nthanks", "updateAuthor": { "name": "alexcc", "key": "alexcc", "displayName": "alejandro_capel", "active": true, "timeZone": "Europe/Madrid" }, "created": "2018-11-15T19:40:54.000+0000", "updated": "2018-11-15T19:40:54.000+0000" }, { "id": "443668", "author": { "name": "sdarda", "key": "sdarda", "displayName": "Sharif AbuDarda", "active": false, "timeZone": "Asia/Dhaka" }, "body": "Hello, Can you share the \"appc ti setup check\" log in here? Thanks.", "updateAuthor": { "name": "sdarda", "key": "sdarda", "displayName": "Sharif AbuDarda", "active": false, "timeZone": "Asia/Dhaka" }, "created": "2018-11-16T01:08:58.000+0000", "updated": "2018-11-16T01:08:58.000+0000" } ], "maxResults": 12, "total": 12, "startAt": 0 } } }