NetBeans 8.0 PhoneGap Running Error - android

I made a Netbeans Phonegap Blank Hello World App but it refuses to run giving me this error when i run using embedded browser:
Could not find cordova.js script tag. Plugin loading may fail. (22:45:04:262)
at public_html/js/libs/Cordova-2.9.0/cordova-2.9.0.js:6725
Falling back on PROMPT mode since _cordovaNative is missing. Expected for Android 3.2 and lower only. (22:45:04:265)
at public_html/js/libs/Cordova-2.9.0/cordova-2.9.0.js:982
Failed to load resource: Unexpected end of file from server (22:45:04:276 | error, network)
at http://localhost:8383/HTML5Application1/cordova_plugins.js
Removing
>
script type="text/javascript" src="js/libs/Cordova-2.9.0/cordova-2.9.0.js
makes it not run at all.
I've verified cordova, ant, adb, git, java from the command prompt.
I've installed the latest versions of netbeans,cordova,android sdk,git and ant.
I could not find a solution to this problem
Any help would be awesome!

The hello world template has some bugs that I haven't got the time to figure out why. The other templates work.

Related

Cordova emulation of project keeps on failing

Hello I'm trying to build a mobile app out of cordova but I have 0 knowledge on it so I read and tried documentation of cordova but it seems like I'm stuck on the emulation part after I input cordova build on terminal it compiles the project and notifies me that the build was a success.. But after I ran cordova emulate android it compiles for a few sec then gives an error message the error message is
anyone know whats the problem here?? Basically everything I've done was from the documentation of the cordova site. also my android emulator is running before I run the command cordova emulate android
Have you tried specifying the emulator to run the app with?
cordova run android --target=youremulatorname
or
cordova emulate android --target=youremulatorname
Also, check whether your emulator uses the API level between the indicated android:minSdkVersion and android:targetSdkVersion in the generated AndroidManifest.xml file.
The AndroidManifest.xml file can be found in
YourAppFolder/platforms/android/AndroidManifest.xml
You can check which API level your emulator uses through
SDK Manager > Tools > Manage AVDs

Meteor project not deploying to android because it can't install a cordova plugin

-I get this error when trying to deploy a simple meteor project (I'm trying to make a soundboard) to my android device on windows.
-The sound works on the browser build
-I wasn't getting this error message before the app could actually play sound
-I've tried meteor reset and removing the android platform and adding it again
-I've tried adding the cordova plugin manually using meteor add, but I'm not sure I'm getting the syntax right or even know the right plugin on git (I've been trying to add this one: https://github.com/floatinghotpot/cordova-plugin-nativeaudio)
This is the full error readout:
C:\Users\redacted\Documents\aaaaAppDev\Meteor\soundboardtest>meteor run android-device
[[[[[ C:\Users\redacted\Documents\aaaaAppDev\Meteor\soundboardtest ]]]]]
=> Started proxy.
=> Started MongoDB.
=> Errors executing Cordova commands:
While adding plugin com.rjfun.cordova.plugin.lowlatencyaudio#1.0.0 to Cordova project:
Cordova error: Failed to fetch plugin com.rjfun.cordova.plugin.lowlatencyaudio#1.0.0 via registry.
Probably this is either a connection problem, or plugin spec is incorrect.
Check your connection and plugin name/version/URL.
Error: Registry returned 404 for GET on https://registry.npmjs.org/com.rjfun.cordova.plugin.lowlatencyaudio
(If the error message contains suggestions for a fix, note that this may not apply to the Meteor integration.
You can try running again with the --verbose option to help diagnose the issue.)
C:\Users\redacted\AppData\Local\.meteor\packages\meteor-tool\1.3.0_3\mt-os.windows.x86_32\isopackets\cordova-support\npm\node_modules\meteor\promise\node_modules\meteor-promise\promise_server.js:116
throw error;
^
ExitWithCode:1
So since the app was still small, I just created a new project and copied all of the code to the new one. I never did anything with "meteor add" in this new project, but it actually deployed to android.
I have a new problem that the audio won't play in the android version, but that seems like a different issue so I'm going to declare this one solved.

phonegap/android: changes to index.html not being regarded when building the app

I'm making my first steps in phonegap. I've been able to set up a project, install a plugin and build the app on my phone without errors. However, now, when I try to change the layout of my www/index.html in the project's root platforms/android/assets/www/index.html stays untouched whenever I (re)build the app.
I'm basically working in eclipse, only for html and javascript I use sublime. I've searched now for a couple of hours for a solution. The most promising approach was this thread: Changes to HTML files not showing on built phonegap 3.0 app ... but even that didn't work.
What can I have done wrong? There's no error, no warning (none resulting from the build process) and I don't know how I could debug the issue. I'm currently using phonegap/cordova 4.2.0
Any clue? Thanks
I still don't know the reason for my problem. However, installing the app via cordova CLI rather than eclipse seems to have solved the problem:
$ cordova prepare android
$ cordova run android

Ionic app runs in browser, but fails on Android: [ERROR] Error initializing Cordova: Class not found

My App is based on the Ionic sidemenu starter project.
It works fine in a browser, but trying to run it on my Android device results in an alert with the following message:
[ERROR] Error initializing Cordova: Class not found
I tried the suggested solutions in this post, but none of them solved the issue.
To reproduce the issue, please follow the instructions here.
Any ideas what's going on?
Some info:
$ cordova --version
3.5.0-0.2.6
$ ionic --version
Installed Ionic CLI version: 1.1.1-beta3
# In browser's console
> ionic.version === "1.0.0-beta.9"
Related question: ui-router resolve behaves strangely in Ionic
I've had this error before. It can be tricky since it is super generic. I'm not sure if this is related, but after much trouble I was able to resolve my problem using these steps:
Make a backup of the .json files inside of your /plugins directory.
Remove the .json files in your /plugins directory.
Empty your platform directories.
Re-add the platforms you want.
Build your app again.
Also, I have my cordova.js at the very bottom of my body tag, not in the head as I've seen suggested elsewhere. Your mileage may vary.

Phonegap 3.5.0 + Android 4.4.2 -- stuck on "Connecting to Device" screen

I installed phonegap (v. 3.5.0) and tried running the default "Hello World" app on my Nexus 7 with Android 4.4.2. It stays on the "Connecting to Device" screen forever.
When using the Dalvik Debug Monitor, I found the following error:
06-19 12:15:54.261: E/AndroidProtocolHandler(23049): Unable to open asset URL: file:///android_asset/www/phonegap.js
<script type="text/javascript" src="phonegap.js"></script> is a line in the index.html file by default.
I was having the same issue: I followed the phonegap instructions to create a Hello World app, compiled for Android and iOS and just saw "Connecting to Device..." forever in both emulators.
I tried user3704578's proposed solution and manually copied phonegap.js into the {project}/www folder but this did not solve the problem.
What did solve the problem was switching from phonegap to cordova. Following the instructions in this document and starting over from scratch produced an app that worked in both platforms. Go figure!
I ran into something similar when I was messing with PhoneGap 3.1. At the time I thought it had something to do with my PhoneGap installation. The workaround was to find the phonegap.js file and manually copy it into {project}/www folder.
Eventually I switched to using Cordova (which utilizes cordova.js) and I do everything but editing the code from the Command Line Interface (CLI). I'm using Visual Studio or NotePad++ for editing.
Are you using the CLI to do your build, or are you using the PhoneGap Build service? My hunch is the Build service would insert it for you automatically, but I haven't tried it so that's just a guess.

Categories

Resources