具有本地库依赖性的Android共享库

问题描述

如何将带有本地库的APK公开为android共享库,并让消费者使用清单中的public interface ITuple<T> { T X { get; } string ToString(); } public struct TwoTuple<T> : ITuple<T> { public T X { get; } public T Y { get; } public TwoTuple(T x,T y) { X = x; Y = y; } public override string ToString() { return "(" + X + "," + Y + ")"; } } public struct ThreeTuple<T> : ITuple<T> { public T X { get; } public T Y { get; } public T Z { get; } public ThreeTuple(T x,T y,T z) { X = x; Y = y; Z = z; } public override string ToString() { return "(" + X + "," + Y + "," + Z + ")"; } } public interface IDataPoint { float Value { get; } <Tuple> Coords { get; } where <ITuple> : ITuple string ToString(); } public struct BarDataPoint : IDataPoint { public TwoTuple<float> Coords { get; } public float Value { get; } public BarDataPoint(TwoTuple<float> Coords,float Value) { this.Coords = Coords; this.Value = Value; } public override string ToString() { return "Coordinates: " + Coords + "; Value: " + Value; } } public struct ScatterDataPoint : IDataPoint { public ThreeTuple<float> Coords { get; } public float Value { get; } public ScatterDataPoint(ThreeTuple<float> coords,float value) { this.Coords = coords; this.Value = value; } public override string ToString() { return "Coordinates: " + Coords + "; Value: " + Value; } } 标签链接到它?

在运行时链接库并尝试加载本机库时,我们会得到类似的内容,

<uses-library>

对于本地命名空间,可以使用whitelisting本机库的选项,以便任何应用程序都可以访问它,但想了解为什么默认情况下会限制它。还有其他干净的方法可以解决此问题吗?

列入白名单要求我们解压缩本机库并将其放在/ system / lib和/ system / lib64中。未压缩的二进制文件会消耗大量的系统分区存储空间。

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)

相关问答

依赖报错 idea导入项目后依赖报错,解决方案:https://blog....
错误1:代码生成器依赖和mybatis依赖冲突 启动项目时报错如下...
错误1:gradle项目控制台输出为乱码 # 解决方案:https://bl...
错误还原:在查询的过程中,传入的workType为0时,该条件不起...
报错如下,gcc版本太低 ^ server.c:5346:31: 错误:‘struct...