My application was working fine.
Yesterday I installed SQLite plugin in my app, then suddenly inappbrowser plugin stops working.
When I run the project it says, open of undefined error
Check your cordova_plugin.js file. Whether inAppBrowser is defined there or not. If not define it
Also add refrence in config.xml file in res folder
Related
I am getting above mentioned error when i add crosswalk to my project.here i am attaching screen-shot of error :-
i even tried with :- cordova plugin add https://github.com/crosswalk-project/cordova-plugin-crosswalk-webview.git
but still getting same error as above.If i do not add crosswalk my application works fine, this issue only comes if i add crossWalk.
I even tried with ionic browser add crosswalk#12.41.296.5..but again no help from this too
Any help will be appreciated ,
Thanks
In my phonegap application for android, in app.js, I am trying to execute
cordova.plugins.backgroundMode.enable();
in app.js but I am getting cordova.plugins as undefined. Now in my index.html I have included cordova.js file. But which file I need to include to make plugins available to cordova global variable? I am not able to understand how to make cordova.plugins available. window.plugins is available but backgroundMode is undefined then. Please help me out here. It seems I am missing out some conceptual part.
Ok...I dont know how but I solved my issue by creating a new project again. There might be some mistake from my side while creating the previous app.
As per 'Platform-centered workflow' from https://cordova.apache.org/docs/en/latest/guide/overview/index.html created a project with help of https://github.com/apache/cordova-android repository on local (cordova version: 5.1.0-dev)
Used plugman to add file plug-in into project but getting error cordova.file object is undefined while accessing it in console or alert. cordova object is coming successfully in any dialog box.
Tried with following to solve it but no of use:
github.com/apache/cordova-plugin-file
cordova plugin add cordova-plugin-file
cordova plugin add cordova-plugin-file#4.0.0
All the entries into config.xml file and AndroidManifest.xml are correct after adding any way to add plug-in.
Please suggest anyone to help this.
are you sure cordova.file pluging has added to project ?
if yes, make sure you called cordova.file after device is ready.
document.addEventListener("deviceready", onDeviceReady, false);
and also cordova.file is not working on emulator. (in my experience)
I am trying to get this example project to work: http://simonmacdonald.blogspot.co.uk/2012/10/barcode-scanner-example-projects.html
I have imported both the projects and made the library project a library etc and i have it running but when i run it and click the scan button i get:
Uncaught TypeError: Object [object Object] has no method 'exec' at file://android_asset/www/cordova.js:863
I have changed the target version to 17 (the latest) which allowed me to run it but i cannot seem to get it to work am i missing something?
I would like to run this on my Google Nexus 4 if this info helps.
Here is a zip of all the code i am using: https://dl.dropboxusercontent.com/u/1099165/bc-code.zip
Also i am using Eclipse to run this (ADT)
Because your barcodescanner.js is using old API call. There is no longer cordova.exec. You need to use the latest barcodescanner.js: https://github.com/phonegap/phonegap-plugins/blob/master/Android/BarcodeScanner/2.2.0/assets/www/barcodescanner.js
After Noogen's answer it got me thinking if Cordova needed to be updated so i grabbed the latest phonegap files and replaced the cordova.js file and the 2.8.1 jar file and then did a clean and build - it worked!
I followed the first tutorial of Phonegap - getting started with Android. I wrote the example "HelloCordova" as showed here. But when I click "run as Android application" Eclipse displays your project contains error(s), please fix them before running your applications. No error is pointed! I can't understand where's the problem (my file matches the example)!
Problems:
Error generating final archive: Debug Certificate expired on 07/04/12 0.34
Location: Unknown
Type: Android Packaging Problem
Any advice? Thanks!
This problem is not related with Phonegap ...
You should delete the debug file at "%USERPROFILE%/.android/debug.keystore", so then eclipse will gerenate a new debug file
Check the android manifest file for any errors. Even the manifest file must be free of errors. You may have overlooked it as it is the last third file. Check with that for errors.