Comments (9)
Just tested with [email protected]
- installing the plugin into the platform fails with the following error:
$ cordova platform add [email protected]
Using cordova-fetch for [email protected]
Adding android project...
Creating Cordova project for the Android platform:
Path: platforms\android
Package: io.cordova.hellocordova
Name: HelloCordova
Activity: MainActivity
Android target: android-27
Android project created with [email protected]
Android Studio project detected
Android Studio project detected
Installing "cordova-plugin-hello-c" for android
Error during processing of action! Attempting to revert...
Failed to install 'cordova-plugin-hello-c': TypeError: Uh oh!
Path must be a string. Received undefined
at assertPath (path.js:7:11)
at Object.resolve (path.js:200:7)
at copyNewFile (D:\Git\3rd_party\cordova-plugin-hello-c-test\platforms\android\cordova\lib\pluginHandlers.js:258:28)
at install (D:\Git\3rd_party\cordova-plugin-hello-c-test\platforms\android\cordova\lib\pluginHandlers.js:43:17)
at Object.process (D:\Git\3rd_party\cordova-plugin-hello-c-test\platforms\android\cordova\node_modules\cordova-common\src\ActionStack.js:56:25)
at PluginManager.doOperation (D:\Git\3rd_party\cordova-plugin-hello-c-test\platforms\android\cordova\node_modules\cordova-common\src\PluginManager.js:114:20)
at PluginManager.addPlugin (D:\Git\3rd_party\cordova-plugin-hello-c-test\platforms\android\cordova\node_modules\cordova-common\src\PluginManager.js:144:17)
at D:\Git\3rd_party\cordova-plugin-hello-c-test\platforms\android\cordova\Api.js:247:74
at _fulfilled (D:\Git\3rd_party\cordova-plugin-hello-c-test\platforms\android\cordova\node_modules\q\q.js:834:54)
at self.promiseDispatch.done (D:\Git\3rd_party\cordova-plugin-hello-c-test\platforms\android\cordova\node_modules\q\q.js:863:30)
Uh oh!
Path must be a string. Received undefined
However, I believe this due to a bug (or bugs) in [email protected]
, as discussed in this issue and seems to be fixed by this PR, since if I installed the cordova-android
platform off the master branch (cordova platform add https://github.com/apache/cordova-android
), it builds and runs successfully.
I understand there'll be a [email protected]
patch release soon containing these fixes.
from cordova-plugin-hello-c.
great @dpa99c! Now it also works with [email protected] and correctly generates the .so files. Thanks for the support.
from cordova-plugin-hello-c.
https://developer.android.com/ndk/guides/abis
Looks like the armeabi, mips and mips64 ABIs have been removed from the NDK as they're no longer supported. I'll update the plugin to reflect these changes.
from cordova-plugin-hello-c.
so it is correct that I generate the "wrong" .so files? Then I thought maybe I had to update the version of the NDK so I downloaded version 18, and during cordova run android
I get back this error
A problem occurred configuring project ':CordovaLib'.
No toolchains found in the NDK toolchains folder for ABI with prefix: mips64el-linux-android
Thanks for the support.
from cordova-plugin-hello-c.
The NDK has been made several backwardly-incompatible changes since I created this plugin so I need to update the plugin to work with the new NDK versions - I'm working on it.
See google/filament#15 (comment) for a solution to the toolchain error.
from cordova-plugin-hello-c.
Perfect thank you.
from cordova-plugin-hello-c.
one last thing: which version of NDK did you used to compile to .so files?
from cordova-plugin-hello-c.
originally v11 (the .so files that are currently in this repo).
Now I've also upgraded to v18 but now having issues getting them to work - the JNI interface is not finding the native functions. Probably due to breaking changes between v11 and v18.
That's why I'm currently looking into.
from cordova-plugin-hello-c.
@LucaTrip I've finally managed to get Android building and working with NDK v18 - just pushed a commit containing the changes.
Tested with [email protected]
- the NDK compiles successfully and the C libraries are now correctly detected and used by Android at runtime.
Please give it a try and let me know if it works for you.
from cordova-plugin-hello-c.
Related Issues (14)
- Failed to restore plugin HOT 5
- Error initializing Cordova: Class not found HOT 9
- Class Not Found HOT 1
- iOS 10 is the maximum deployment target for 32-bit targets HOT 2
- How can I use structs? HOT 2
- Help Needed
- Dlib Library HOT 1
- compile-android.cmd error
- Android.mk not found HOT 9
- Help C++ HOT 1
- Processing Raw Data in C HOT 7
- cordova platform 7.x problems HOT 2
- Problems when run on cordova-android@7 HOT 13
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from cordova-plugin-hello-c.