반응형
오류 메시지:
adb: failed to install ... INSTALL_FAILED_UPDATE_INCOMPATIBLE: Existing package signatures do not match newer version; ignoring!
이 오류는 기존에 설치된 앱과 새로운 앱의 서명이 일치하지 않아서 업데이트할 수 없는 문제입니다.
✅ 1️⃣ 기존 앱 삭제 후 다시 설치
현재 com.example.sentence 패키지가 기존에 설치된 버전과 서명이 다르기 때문에 업데이트되지 않음 → 기존 앱을 삭제하고 다시 설치하면 해결됩니다.
🔹 해결 방법
- ADB를 이용해 기존 앱 삭제또는
스마트폰에서 직접 앱 삭제 → 다시 flutter run 실행 - adb uninstall com.example.sentence
- Flutter 앱 다시 실행
- flutter run
✅ 2️⃣ 앱 패키지명 변경 (필요 시)
만약 com.example.sentence 패키지가 이전 버전과 충돌하는 경우, 패키지명을 변경하는 것도 해결 방법입니다.
🔹 해결 방법
- android/app/src/main/AndroidManifest.xml 파일 열기
- package="com.example.sentence" 부분을 새로운 패키지명으로 변경
- <manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.yourapp.sentence">
- android/app/build.gradle 파일 열기
- applicationId "com.example.sentence" → "com.yourapp.sentence" 로 변경
- 앱 다시 실행
- flutter clean flutter pub get flutter run
✅ 3️⃣ 기존 설치된 APK 서명 충돌 해결
기존 앱이 다른 서명 키로 빌드된 경우, 아래 명령어를 실행하여 서명 확인 후 다시 빌드합니다.
🔹 해결 방법
- 기존 앱의 서명 확인(기존 APK 서명이 Flutter 새 버전과 다르면 업데이트 불가능)
- keytool -list -printcert -jarfile app-release.apk
- Flutter에서 새로운 APK 생성 후 실행
- flutter clean flutter build apk flutter install
✅ 4️⃣ ADB 디버깅 문제 해결
간혹 ADB가 문제를 일으킬 수 있습니다. 아래 명령어를 실행하여 ADB를 다시 시작하세요.
🔹 ADB 강제 재시작
adb kill-server
adb start-server
flutter run
🎯 최종 해결 방법 요약
- 기존 앱 삭제 후 다시 설치 (adb uninstall com.example.sentence)
- 패키지명을 변경 (com.example.sentence → com.yourapp.sentence)
- APK 서명 충돌 확인 후 새로운 빌드 (flutter build apk)
- ADB 재시작 (adb kill-server && adb start-server)
위 방법 중 1️⃣ 기존 앱을 삭제하고 다시 설치하면 대부분 문제가 해결됩니다. 🚀
반응형