{"action":"created","issue":{"url":"https://api.github.com/repos/salvatejero/cordova-liferay-plugin/issues/2","labels_url":"https://api.github.com/repos/salvatejero/cordova-liferay-plugin/issues/2/labels{/name}","comments_url":"https://api.github.com/repos/salvatejero/cordova-liferay-plugin/issues/2/comments","events_url":"https://api.github.com/repos/salvatejero/cordova-liferay-plugin/issues/2/events","html_url":"https://github.com/salvatejero/cordova-liferay-plugin/issues/2","id":111463992,"number":2,"title":"Uncaught module salvatejero.cordova.liferay.Liferay already defined","user":{"login":"condor2k","id":15127363,"avatar_url":"https://avatars.githubusercontent.com/u/15127363?v=3","gravatar_id":"","url":"https://api.github.com/users/condor2k","html_url":"https://github.com/condor2k","followers_url":"https://api.github.com/users/condor2k/followers","following_url":"https://api.github.com/users/condor2k/following{/other_user}","gists_url":"https://api.github.com/users/condor2k/gists{/gist_id}","starred_url":"https://api.github.com/users/condor2k/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/condor2k/subscriptions","organizations_url":"https://api.github.com/users/condor2k/orgs","repos_url":"https://api.github.com/users/condor2k/repos","events_url":"https://api.github.com/users/condor2k/events{/privacy}","received_events_url":"https://api.github.com/users/condor2k/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":5,"created_at":"2015-10-14T18:42:19Z","updated_at":"2015-10-16T16:33:59Z","closed_at":null,"body":"Can't get it running under android with cordova 5.3.3\r\n\r\n```\r\ncordova create lrtest\r\ncd lrtest\r\ncordova platform android add\r\ncordova plugin add https://github.com/salvatejero/cordova-liferay-plugin.git\r\n```\r\n\r\nAdded lrtest\\platforms\\android\\build-extras.gradle\r\n```\r\next.postBuildExtras = {\r\n    android {\r\n        compileOptions {\r\n            sourceCompatibility JavaVersion.VERSION_1_7\r\n            targetCompatibility JavaVersion.VERSION_1_7\r\n        }\r\n    }\r\n}\r\n```\r\n\r\nCOPIED liferay-android-sdk-6.2.0.21.jar to lrtest\\platforms\\android\\libs\r\nALSO tried liferay-android-sdk-6.2.0.22.jar\r\n```\r\ncordova build\r\ncordova run\r\n```\r\nError message:\r\n\r\n```\r\nI/chromium( 3267): [INFO:CONSOLE(79)] \"Uncaught module salvatejero.cordova.liferay.Liferay already defined\", source: file:///android_asset/www/cordova.js (79)\r\nI/chromium( 3267): [INFO:CONSOLE(1183)] \"deviceready has not fired after 5 seconds.\", source: file:///android_asset/www/cordova.js (1183)\r\nI/chromium( 3267): [INFO:CONSOLE(1176)] \"Channel not fired: onCordovaReady\", source: file:///android_asset/www/cordova.js (1176)\r\n```"},"comment":{"url":"https://api.github.com/repos/salvatejero/cordova-liferay-plugin/issues/comments/148762784","html_url":"https://github.com/salvatejero/cordova-liferay-plugin/issues/2#issuecomment-148762784","issue_url":"https://api.github.com/repos/salvatejero/cordova-liferay-plugin/issues/2","id":148762784,"user":{"login":"Nishi-Fertig-Aus","id":14584718,"avatar_url":"https://avatars.githubusercontent.com/u/14584718?v=3","gravatar_id":"","url":"https://api.github.com/users/Nishi-Fertig-Aus","html_url":"https://github.com/Nishi-Fertig-Aus","followers_url":"https://api.github.com/users/Nishi-Fertig-Aus/followers","following_url":"https://api.github.com/users/Nishi-Fertig-Aus/following{/other_user}","gists_url":"https://api.github.com/users/Nishi-Fertig-Aus/gists{/gist_id}","starred_url":"https://api.github.com/users/Nishi-Fertig-Aus/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Nishi-Fertig-Aus/subscriptions","organizations_url":"https://api.github.com/users/Nishi-Fertig-Aus/orgs","repos_url":"https://api.github.com/users/Nishi-Fertig-Aus/repos","events_url":"https://api.github.com/users/Nishi-Fertig-Aus/events{/privacy}","received_events_url":"https://api.github.com/users/Nishi-Fertig-Aus/received_events","type":"User","site_admin":false},"created_at":"2015-10-16T16:33:59Z","updated_at":"2015-10-16T16:33:59Z","body":"Hi Salva,\r\n\r\nThank you for the basic example. I have modified your code to this \r\n\r\n        \r\n        \r\n        Liferay.connect(function (data){\r\n            console.log(\"success \"+data);\r\n            Liferay.execute(null, null, 'com.liferay.portal.model.Country', 'getCountryByA2', '[af]');\r\n            var parentElement = document.getElementById('deviceready');\r\n            var connectingElement = parentElement.querySelector('.connecting');\r\n            var connectedElement = parentElement.querySelector('.connected');\r\n            connectingElement.setAttribute('style', 'display:none;');\r\n            connectedElement.setAttribute('style', 'display:block;');\r\n        }, function (data){\r\n            console.log(\"error \"+data);\r\n            var parentElement = document.getElementById('deviceready');\r\n            var connectingElement = parentElement.querySelector('.connecting');\r\n            var errorElement = parentElement.querySelector('.errorConnecting');\r\n            connectingElement.setAttribute('style', 'display:none;');\r\n            errorElement.setAttribute('style', 'display:block;');\r\n        }, 'http://52.18.10.61/liferay', 'user@liferay.com', 'user'  );\r\n    },\r\n\r\n\r\n\r\nAnd this is the Exception that is thrown\r\n\r\n\r\n2015-10-16 18:29:56.389 BasicExample[1601:1066828] Error Domain=com.liferay.mobile.sdk Code=2 \"com.liferay.portal.NoSuchUserException\" UserInfo={NSLocalizedDescription=com.liferay.portal.NoSuchUserException}\r\n2015-10-16 18:29:56.394 BasicExample[1601:1066828] THREAD WARNING: ['Liferay'] took '1420.035645' ms. Plugin should use a background thread.\r\n\r\n\r\nCan you help?"}}