-
Notifications
You must be signed in to change notification settings - Fork 20
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
android example #5
Comments
There are a few (a bit outdated) sample projects here: |
Thank you for your reply. None of them are used by this plug-in. I don't know C + +. At present, there are too few documents, so it's not easy for beginners to get started and use.I've been struggling for nearly a week. I've tried all the available documents and examples, but I still don't know how to use it.I use this on Android. |
It's not any different with Android. Start from an empty project, and add the plugin as per these instructions: |
In any case, please let me know the error message that you're getting and I should be able to help! |
Thank you very much~ Have you ever tried to compile with Android studio? Android studio is generated by default build.gradle as follows
Add plugin as follows
And then it was wrong
If delete task clean, it will not report an error。 when run task 'javacppJar'
plugins {} block can only be written in the root build.gradle,then the following parameters cannot be put in the module of app build.gradle
|
Ah, you'd like to use the build plugin for Android. I'll update the sample for zlib with builds for Android. Since Android Studio is not available for other platforms than Android, the build plugin wasn't made to run within it, but it's still probably possible to make it run as part of its build process without too much trouble. Someone will need to figure it out though. |
Ok, I've updated the zlib sample in commit 3939b5d. It builds fine on the command line this way: $ git clone https://github.com/bytedeco/gradle-javacpp
$ cd gradle-javacpp/samples/zlib
$ gradle clean build -PjavacppPlatform=android-arm
$ gradle clean build -PjavacppPlatform=android-arm64
$ gradle clean build -PjavacppPlatform=android-x86
$ gradle clean build -PjavacppPlatform=android-x86_64 |
Thank you very much. This example can be run directly in Android studio. I will continue to try to apply the tool in Android studio and will continue to give feedback if there are any problems. |
BTW, would you be able to release some sample project for others? There seems to be great demand for one: |
Thanks to @iuliuh, we now have this new sample project: |
I build the sample-project: gradle-javacpp-android. But there is no jnijavacpp.cpp jniNativeLibrary.cpp . I can I fix it? |
hi~ Is there an example of Android?
The text was updated successfully, but these errors were encountered: