问题描述
如何将带有本地库的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 (将#修改为@)