Android studio 에서 AndroidX 방식 사용 안 함

1247 단어 AndroidstudioAndroidX
gradle.properties 파일 에 추가
android.useAndroidX=false\#AndroidX 사용 하지 않 기
android.enableJetifier=false\#제3자 jar 패키지 사용 금지 androidX
Android Studio androidx 패키지 충돌 문제 해결
가방 이 충돌 하면 다음 과 같은 오류 가 발생 합 니 다.
Android dependency 'androidx.core:core' has different version for the compile (1.0.0) and runtime (1.0.1) classpath. You should manually set the same version via DependencyResolution
1.터미널 열기
입력:
./gradlew -q app:dependencies
의존 충돌 파일 보기
2.build.gradle 에 buildscript 탭 에 추가

subprojects {
  project.configurations.all {
   resolutionStrategy.eachDependency { details ->
    if (details.requested.group == 'com.android.support'
      && !details.requested.name.contains('multidex') ) {
     details.useVersion "27.1.1"
    }

    if (details.requested.group == 'androidx.core'
      && !details.requested.name.contains('androidx') ) {
     
    }
   }
  }
 }
어떤 가방 충돌 은 group androidx.core 에 있 고 Androidx 가 사용 할 버 전 을 지정 합 니 다.
이 안 드 로 이 드 스튜디오 에서 AndroidX 방식 을 사용 하지 않 는 것 은 편집장 이 여러분 에 게 공유 하 는 모든 내용 입 니 다.참고 가 되 고 많은 응원 부 탁 드 리 겠 습 니 다.

좋은 웹페이지 즐겨찾기