Code Monkey home page Code Monkey logo

Comments (4)

DanAlbert avatar DanAlbert commented on July 18, 2024

C/C++: prefabandroid.x86_64: User is using a static STL but library requires a shared STL

"static":true

These two things are inconsistent. I'd need to see the build.gradle and the prefab package to tell you what happened. Closing for tracking reasons until I get that info, but will reopen when we get it.

from prefab.

leleliu008 avatar leleliu008 commented on July 18, 2024

build.gradle.kts is here: https://github.com/leleliu008/android-calendar-for-the-aged/blob/master/app/build.gradle.kts

the aar can be donwloaded from https://repo1.maven.org/maven2/com/fpliu/ndk/pkg/prefab/android/21/chinese-calendar/2022.04.22/chinese-calendar-2022.04.22.aar

from prefab.

DanAlbert avatar DanAlbert commented on July 18, 2024

The actual abi.json does not match what you reported.

$ cat prefab/modules/libchinese-calendar.so/libs/android.x86_64/abi.json
{"api": 21,"abi": "x86_64","ndk": 21,"stl": "c++_shared","static":false}

The log message you're reading is about the shared library, and the abi.json is correct.

https://github.com/leleliu008/android-calendar-for-the-aged/blob/a1103eb6f3dc33c6856918cc9dcb59dd49b6b6cb/app/build.gradle.kts#L95-L100

The log is correct. These two configurations are not compatible. Your app is using c++_static (that's the default) which means it cannot have any shared library dependencies that use libc++. That's why it's not exposing the shared library to the build. It is exposing the static library to the build, because that one is usable for the build configuration.

from prefab.

leleliu008 avatar leleliu008 commented on July 18, 2024

Thank you for your explanation.

When I packed my prefab aar file, I refer to the https://mvnrepository.com/artifact/com.android.ndk.thirdparty , I found these abi.json all have "stl": "c++_shared", even some of them are not compiled with libc++_shared.so, thus I thought "stl": "c++_shared" is fixed config.

from prefab.

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.