Tools for Apache Cordova - Installed plugins are skipped in assembly

I have a cordova app with 6 plugins and strange behavior that the app doesn't work after I create a new clone of sources from github.

If I install the plugin via config.xml dialog and build android version of app. The native source file (* .java) of the application is copied to

App \ Platforms \ Android \ SRC \ Org \ Apache \ Cordova \ Camera \ CameraLauncher.java

The app runs on the dev device where I added the plugin to the project. But if I upload my changes (config.xml, app / plugins folder) to github and clone the project on another dev machine. The app won't launch on device or emulator and I get the following error.

enter image description here

If I look in the platforms folder after build. I found there are no plugin.java files! There was only one java file in the folder

Application \ platform \ android \ src ... \ MainActivity.java

A workaround is to uninstall all installed plugins and install them again. The bug isn't just for android.
Each Plugin.cs file is missing in the Windows Phone Platforms folder , for example, App \ platform \ wp8 \ Plugins \ org.apache.cordova.camera \ Camera.cs.

Where is the / config file that must be listed in order to remember installed plugins? I sometimes read the name "fin", is that the right direction?

Hello

0


source to share


1 answer


As it turns out, you shouldn't be checking "android.json", "remote_ios.json", "windows.json" and "wp8.json" from the "plugins" folder, or this problem can happen (although fetch.json is fine). Unfortunately they are missing from the default exclusion list for Cordova projects in VS 2015 RC.



To fix, add these four files to the .gitignore file in your project (probably at the root of the solution), remove them from the original repo and clone them again and everything should work for you.

0


source







All Articles