Git Product home page Git Product logo

Comments (6)

ben-j69 avatar ben-j69 commented on May 29, 2024

Hello @alexbgameson ,

why you have create manually the CMakeLists ? It should be done by the plugin.

The issue is closed, your problem is solved ?

from hidden-secrets-gradle-plugin.

andreluizreis avatar andreluizreis commented on May 29, 2024

@ben-j69 , I started using the plugin today and I am facing the same issue.
java.lang.UnsatisfiedLinkError: dlopen failed: library "libsecrets.so" not found

I followed the tutorial and checked if I could be doing something wrong but I didn't find why it is not creating the libsecrets.so.
I added the gradle code for C++ code into my build.gradle (app)
// Enable NDK build externalNativeBuild { cmake { path "src/main/cpp/CMakeLists.txt" } }

I have the folder app/src/main/cpp with 5 files: CMakeLists.txt, secrets.cpp, secrets.hpp, sha256.cpp, sha256.hpp.

Let me know if I have to open a new issue ticket.

from hidden-secrets-gradle-plugin.

ben-j69 avatar ben-j69 commented on May 29, 2024

Hello @andreluizreis,

sorry for your issue. Can you confirm me you enabled the ndk build ?

 // Enable NDK build
    externalNativeBuild {
        cmake {
            path "src/main/cpp/CMakeLists.txt"
        }
    }

from hidden-secrets-gradle-plugin.

andreluizreis avatar andreluizreis commented on May 29, 2024

@ben-j69 , Yes. I added it inside the android object after the defaultConfig in build.gradle(app). I downloaded the packages in the SDK Manager.

The Secrets.kt was created successfully. The problem is when I try to access the secret method, the app crashes.

from hidden-secrets-gradle-plugin.

andreluizreis avatar andreluizreis commented on May 29, 2024

@ben-j69, to make it work. I needed to add to my build.gradle(app):
android { defaultConfig { ndk { abiFilters 'armeabi-v7a', 'x86' } } }
I don't know why it is not necessary for your project or why other users didn't have that problem.

Digging more into the problem. The CPP library is not being created for 64bits platforms. It is why when I add that code above it works. However, I can't publish this code without supporting 64bits.
I don't know if it has a command to force CMAKE to build the 64 bits versions.

from hidden-secrets-gradle-plugin.

andreluizreis avatar andreluizreis commented on May 29, 2024

@ben-j69, I found the solution for my issue. The NDK doesn't have the platform and it was giving problems to compile in 64-bits ABIs. So, when I updated the NDK to an older version it worked.

from hidden-secrets-gradle-plugin.

Related Issues (20)

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.