Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
想要更改包名但需要保持类名不变。任何的想法?
ProGuard 没有标准选项来重命名包,但保留它们的简单类名。
您可以手动创建一个 ProGuard 映射文件,其行如下:
com.example.MyClass -> a.MyClass: com.example.MyOtherClass -> a.MyOtherClass:
然后您可以使用该选项-applymapping mapping.txt
-applymapping mapping.txt