简体   繁体   English

编写第三方付费库的包装,并尝试从我的.aar lib项目中隐藏第三方lib的.jar文件

[英]Writing wrapper of a third party paid library and trying to hide the .jar file of third party lib from my .aar lib project

I have a .aar library project, which is the wrapper of third party paid .jar lib. 我有一个.aar库项目,它是第三方付费.jar lib的包装。 I want to distribute my .aar (wrapper of third party .jar) . 我想分发我的.aar(第三方.jar的包装)。

But when I'm trying to use my .aar file in application project, I'm able to see the third party .jar file and its classes very clearly. 但是,当我尝试在应用程序项目中使用.aar文件时,我可以非常清楚地看到第三方.jar文件及其类。 I want to hide the third party paid .jar file, what i mean is the devleoper who uses my .aar file should not see the .jar(third party file) file. 我想隐藏第三方付费的.jar文件,我的意思是使用我的.aar文件的开发者不应该看到.jar(第三方文件)文件。

I tried putting the dependency scope of .jar(third party) as "provided" which is hiding the .jar files but at the same time, the classes of .jar file are missing at the time of running. 我尝试将.jar(第三方)的依赖关系范围设置为“提供”,这隐藏了.jar文件,但与此同时,运行时缺少.jar文件的类。 Causing runtime exception. 导致运行时异常。

My .aar project need the third party .jar lib at the time of compiling and runtime also. 我的.aar项目在编译和运行时也需要第三方.jar库。 But, the developer who uses my .aar file should not see the .jar. 但是,使用我的.aar文件的开发人员应该看不到.jar。

Help me with this. 帮帮我 Thank You. 谢谢。

您可以使用jarjar重新打包jar库,并使用proguard混淆aar

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM