Linux command
jetifier 命令
文本
复制后可按需替换文件名、目录或参数。
常用示例
Convert AAR to AndroidX
jetifier-standalone -i [lib.aar] -o [lib-androidx.aar]
Convert JAR
jetifier-standalone -i [lib.jar] -o [lib-androidx.jar]
Reverse conversion
jetifier-standalone -r -i [lib-androidx.aar] -o [lib.aar]
List mappings
jetifier-standalone -l
Verbose mode
jetifier-standalone -v -i [input] -o [output]
说明
jetifier migrates Android libraries from Support Library to AndroidX. It rewrites bytecode and resources to use new package names. The tool enables using older libraries with AndroidX projects. It processes AAR and JAR files automatically.
参数
- -i _FILE_
- Input AAR/JAR file.
- -o _FILE_
- Output file.
- -r, --reversed
- Reverse conversion (AndroidX to Support Library).
- -l
- List class mappings.
- -c _FILE_
- Custom configuration file for mappings.
- -v
- Verbose output.
- --help
- Display help information.
FAQ
What is the jetifier command used for?
jetifier migrates Android libraries from Support Library to AndroidX. It rewrites bytecode and resources to use new package names. The tool enables using older libraries with AndroidX projects. It processes AAR and JAR files automatically.
How do I run a basic jetifier example?
Run `jetifier-standalone -i [lib.aar] -o [lib-androidx.aar]` in a terminal, then adjust file names, paths, flags, or remote targets for your system.
What does -i _FILE_ do in jetifier?
Input AAR/JAR file.