Coder Social home page Coder Social logo

Comments (9)

dpa99c avatar dpa99c commented on June 14, 2024 1

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.

LucaTrip avatar LucaTrip commented on June 14, 2024 1

great @dpa99c! Now it also works with [email protected] and correctly generates the .so files. Thanks for the support.

from cordova-plugin-hello-c.

dpa99c avatar dpa99c commented on June 14, 2024

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.

LucaTrip avatar LucaTrip commented on June 14, 2024

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.

dpa99c avatar dpa99c commented on June 14, 2024

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.

LucaTrip avatar LucaTrip commented on June 14, 2024

Perfect thank you.

from cordova-plugin-hello-c.

LucaTrip avatar LucaTrip commented on June 14, 2024

one last thing: which version of NDK did you used to compile to .so files?

from cordova-plugin-hello-c.

dpa99c avatar dpa99c commented on June 14, 2024

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.

dpa99c avatar dpa99c commented on June 14, 2024

@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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.