Comments (13)
i'm using Dynamic Feature Module for a feature which has third SDK library as
.AAR
file.
When analysing the apk i found out this sdk is using Native / C++ codes and the structure is like:
i know that in dynamic module when we want to use native libs we should implement for instance something like :
SplitInstallHelper.loadLibrary(this, "tensorflowlite_gpu_gl")
however i'm getting this error:
java.lang.UnsatisfiedLinkError: dlopen failed: library "libtensorflowlite_gpu_gl.so" not foundI'm not sure in Gradle in dynamic module what should i do to be able to load those .so libs?
Hi @elmira-asd mentioned issue if you are able to fix please guide me, same issue i am facing.
Thanks for your help in advance!
from app-bundle-samples.
Hi, @elmira-asd! I encountered the same issue. Did you solve that one?
from app-bundle-samples.
@crocodilys Hi there, first i loaded the libs kind of locally calling System.loadLibrary("c++_shared") and it worked fine, but it's not recommended if you have another libs (you can check when analysing the apk) because in . my case i should have been careful about different system/device architectures, in some devices it may crash!
from app-bundle-samples.
Does this module help?
from app-bundle-samples.
This Module will definitely help if i have those C++ libs in my libs, but they were wrapped as .AAR
file. that was the reason i couldn't use SplitInstallHelper
to load those libraries!
so i should have extract those files and then using SplitInstallHelper
!
from app-bundle-samples.
@crocodilys Still not recommended if you're using third SDK, so you can ask them to fix this one in their side
from app-bundle-samples.
It shouldn't matter whether the .so are included via an aar or directly within the feature they're used in. The Context
you're passing in to loadLibrary
might though. You may have to create a new context before the library can be loaded like shown in the documentation here: https://developer.android.com/guide/app-bundle/playcore#load_native_libs
from app-bundle-samples.
@elmira-asd Still cannot understand if you were able to use TensorFlow in a dynamic feature or not. I faced the same problem. Still not sure if calling SplitInstallHelper.loadLibrary
before using TensorFlow classes will help(as they will call System.loadLibrary
inside and it might crash).
from app-bundle-samples.
Closing this as it's not related to the sample at hand any longer. Feel free to ask a question on StackOverflow and link it here.
from app-bundle-samples.
i'm using Dynamic Feature Module for a feature which has third SDK library as
.AAR
file.
When analysing the apk i found out this sdk is using Native / C++ codes and the structure is like:
i know that in dynamic module when we want to use native libs we should implement for instance something like :SplitInstallHelper.loadLibrary(this, "tensorflowlite_gpu_gl")
however i'm getting this error:
java.lang.UnsatisfiedLinkError: dlopen failed: library "libtensorflowlite_gpu_gl.so" not found
I'm not sure in Gradle in dynamic module what should i do to be able to load those .so libs?Hi @elmira-asd mentioned issue if you are able to fix please guide me, same issue i am facing.
Thanks for your help in advance!
It's better to change the .ARR
file rather than the app, also try to use SplitCompat.installActivity(this)
instead of just calling SplitCompat.install(this)
it helps immediate access to a given activity.
from app-bundle-samples.
@elmira-asd I have the same problem as you, a third-party aar contains multiple so files, and the aar already uses System.loadLibrary. How should I solve it?
from app-bundle-samples.
i'm using Dynamic Feature Module for a feature which has third SDK library as
.AAR
file.我正在使用动态功能模块来实现具有第三个 SDK 库作为.AAR
文件的功能。
When analysing the apk i found out this sdk is using Native / C++ codes and the structure is like: 在分析 apk 时,我发现这个 sdk 使用 Native / C++ 代码,结构如下:
i know that in dynamic module when we want to use native libs we should implement for instance something like :SplitInstallHelper.loadLibrary(this, "tensorflowlite_gpu_gl")
我知道在动态模块中,当我们想要使用本机库时,我们应该实现例如:SplitInstallHelper.loadLibrary(this, "tensorflowlite_gpu_gl")
however i'm getting this error:但是我收到这个错误:
java.lang.UnsatisfiedLinkError: dlopen failed: library "libtensorflowlite_gpu_gl.so" not found java.lang.UnsatisfiedLinkError:dlopen失败:找不到库“libtensorflowlite_gpu_gl.so”
I'm not sure in Gradle in dynamic module what should i do to be able to load those .so libs?我不确定在动态模块的 Gradle 中我应该做什么才能加载这些 .so 库?Hi @elmira-asd mentioned issue if you are able to fix please guide me, same issue i am facing.您好,如果您能够解决提到的问题,请指导我,我面临着同样的问题。
Thanks for your help in advance! 提前感谢您的帮助!It's better to change the
.ARR
file rather than the app, also try to useSplitCompat.installActivity(this)
instead of just callingSplitCompat.install(this)
it helps immediate access to a given activity.最好更改.ARR
文件而不是应用程序,还尝试使用SplitCompat.installActivity(this)
而不是仅仅调用SplitCompat.install(this)
它有助于立即访问给定的活动。
The .aar file is third party and I can't change it. Strange if I kill the app and restart it, everything is fine
from app-bundle-samples.
SplitCompat
你可真爱关闭issue,并且没有一次是有提供有效信息的。你就不能搞个demo出来吗?动态模块里面依赖aar,这个aar包含第三方so库。你会怎么去使用。搞一个demo很难吗。天天就爱关闭issue。你的kpi是靠这个来的吗
from app-bundle-samples.
Related Issues (20)
- Task :Teapot:externalNativeBuildRelease FAILED HOT 1
- Resource Not Found error after close and relaunch the app HOT 1
- Duplicate class in play.core On Build Unity 2020 LTS
- AAssetManager cannot handle a pack nearly 2GB on 32 bit device
- Resource Not Found Exception
- Q: Instant Apps
- dynamic-feature mlkit translate
- Resource Not Found Relaunch Application on-Demand Dynamic Feature Module HOT 4
- Resources$NotFoundException HOT 4
- Sample code at app-bundle-samples/PlayAssetDelivery/NativeSample/ not generating all standalone apks HOT 1
- Play Asset Delivery Error Code does not match HOT 1
- Can PAD deliver SO?
- Security Policy violation Binary Artifacts HOT 28
- I want put all arr files to dynamic feature module, but have question
- Question: Would the install-time delivery still violate the maximum size limitation?
- GoogleAnalytics sample app build fails with "Unable to make protected void java.net.URLClassLoader.addURL(java.net.URL) accessible"
- ContentProvider in dynamic module HOT 1
- What about the assets file in the aar package?
- Dynamic feature UnsatisfiedLinkError
- Error receiving broadcast Intent
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from app-bundle-samples.