본문 바로가기
Android/Build Error

[안드로이드] using Jetifier. Reason: begin 1, end -1, length 2 에러

by Jay Son 아기 냥이 해린 짱💖 2021. 10. 6.

빌드 에러 : using Jetifier. Reason: begin 1, end -1, length 2

원인 : aar 빌드에 사용된 gradle 버전과 aar를 사용하는 Client gradle 버전이 맞지 않음.

해결 방법 : gradle 버전 동일하게 변경

Execution failed for task ':app:preDebugBuild'.
> Could not resolve all files for configuration ':app:debugCompileClasspath'.
   > Failed to transform cybertel-service_v2-21100101_dev.aar (com.json.sample:service:2021) to match attributes {artifactType=android-manifest, org.gradle.status=integration}.
      > Execution failed for JetifyTransform: D:\03.Works\Sample\app\libs\service.aar.
         > Failed to transform 'D:\03.Works\Sample\app\libs\service.aar' using Jetifier. Reason: begin 1, end -1, length 2. (Run with --stacktrace for more details.)

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

 

 

프로젝트 gradle 버전 확인

aar 프로젝트: gradle:4.x.x, Client 프로젝트: gradle:3.x.x 설정되어 있어 aar 프로젝트를 3.x.x 변경 후 정상 필요되었습니다.

 

 

위와 같이 해결되지 않을 경우 다른 원인을 찾아 수정 필요합니다.

반응형