hi,
I am using NDK OpenCL with gradle 4.6 and build 3.2.0. things goes well.
But if i use gradle 7.4 and build 7.2.2 in 32bit and 64bit i got :
library “libcutils.so” not found
how such thing can be possible ?
hi,
I am using NDK OpenCL with gradle 4.6 and build 3.2.0. things goes well.
But if i use gradle 7.4 and build 7.2.2 in 32bit and 64bit i got :
library “libcutils.so” not found
how such thing can be possible ?
Can you share the full --stacktrace
or even better a build --scan
URL?
Then you maybe can at least get a recommendation where to head to.
https://gradle.com/s/4ifa5fkwhbtqs
The error append when the APK start on the phone at linkage state.
Could you delete the file after you analysed it or do i need to do it myself ?
Anyway i found something strange. I axplain.
If i use gradle 4.6 i set
“apply plugin: ‘com.android.application’ // Utilisé avec gradle 4.6”
if i use gradle 7.4 i set
plugins {
id ‘com.android.application’ // Utilisé avec gradle 7.4
}
and
ndkVersion ‘27.2.12479018’ // utilisé avec gradle 7.4 fiare attention au CMAKE 3.18.1 in
but i got error in this line
task buildNative(type: Exec, description: 'Compile JNI source via NDK') {
def ndkDir = android.ndkDirectory
A problem occurred evaluating project ‘:app’.
NDK is not installed
if i use gradle 7.4 with the gradle 4.6 build.gradle(app) i can synchronize the build and instal. but i got the lib error. And in the build – stacktrace
i got this error.
Caused by: com.android.builder.errors.EvalIssueException: Android Gradle plugin requires Java 11 to run. You are currently using Java 1.8.
I will tried to list what i need with gradle 4.6
using gradle 7.4
So i think that my build.gradle file i wrong using gradle 7.4. Because i got 2 kind of error.
1)NDK is not installed, normal i did not install NDK through android studio but by donwloading the zip file. so i got this error see before.
2) there is a problem finding the rigth JAVA even if i set it correctly.
So it is i little bit the mess. But it is may be normal when android studio call one of the last realese “LADYBUG”.
I agree with android is a bit special. But of every error they said to ask gradle.
Sorry for the post it is a lot of information and not really well organized.
Regards
That build scan is pretty useless as it does not show the error at all but that you run your Gradle build with Java 8 while needing to run it with at least Java 11.
But from what you write, it anyway does not sound like it has anything to do with Gradle.
You should probably ask in some Android community instead?
hi,
I have modified the post with more information.
can you give me the link to the android community because i am a little bit banned from starkoverflow. because i said that android is a nightmare because they change everything all the time. Speccially concerning gradle.
hi,
i have found the error. Using gradle 7.4 i need to set in the build.gradle(app) wich is not necessary with gradle 4.6.
defaultConfig {
packagingOptions {
// necessaire avec NDKr27C //
exclude “lib/arm64-v8a/libOpenCL.so”
exclude ‘/libs/arm64-v8a/libOpenCL.so’
exclude “lib/armeabi-v7a/libOpenCL.so”
exclude ‘/libs/armeabi-v7a/libOpenCL.so’
The problem with android is that you cannot find any information about the relation between Gradle NDK and JAVA version to use. There is always something different from one version to anaother and no information at all. Client need to paid to get the answer. But normal developper cannot have acces to the information except speed weeks to find the rigth implementation. A nigthmare
But it is may be normal when android studio call one of the last realese “LADYBUG”.
Ladybug is a female superhero from series Miraculous.
there is a problem finding the rigth JAVA even if i set it correctly.
Obviously you did not set it correctly.
The Java version with which you run Gradle (check in ./gradlew --version
) just was not what your build script requires.