Open ndarilek opened 6 years ago
Hi @ndarilek , I suspect the reason is that your project is created with cordova 8, which is not supported: https://github.com/janeasystems/nodejs-mobile-cordova#requirements
Yeah, I'd read that 8 isn't supported. Is my Cordova version what I get
from cordova -v
, or the major version of the platform in package.json?
In my case I see:
"cordova-android": "^7.1.1",
So I assumed I was on 7. Is it the CLI tool rather than the platform major version that determines I'm on 8 rather than 7?
Cordova 8.X tools install cordova-android 7.X Cordova 7.X tools install cordova-android 6.X
cordova-android 7.X is not supported
Got it. I wonder if the installation process might be modified to check for this? I knew that 7 wasn't supported, but am fairly new to Cordova, and thought that the 7 in the Android platform version was also Cordova's version.
Also, are there plans to upgrade to 8? I'm starting a new project because I specifically need nodejs-mobile, and notice that 7 is a year behind. Maybe Cordova isn't the best choice if my primary drivers is a need to use Nodejs-mobile?
Thanks.
Hi @ndarilek ,
A workaround has been proposed on a similar issue, for using more recent versions of cordova android: https://github.com/janeasystems/nodejs-mobile/issues/48#issuecomment-366858320
No ETA for upgrading to cordova 8 at the moment.
The best approach depends on your application needs. There's also a react-native plugin and the standalone native library, but the standalone native library leaves more integration details to the developer.
I create a fresh Cordova project with
cordova init
,cordova add android
,cordova plugin add nodejs-mobile-cordova
. Then I create an empty www/node-project/index.js file. Next I runcordova build android
and I get the following:This happens on both a newly-created project and on a project to which I'm attempting to add this plugin. I created a test project at https://github.com/ndarilek/cordova-nodejs-mobile-failure that demonstrates the issue.
Thanks!