Answers
Got it! When you say you're upgrading from SDK 34 to SDK 35 and you get an error mentioning [duplicate], it usually means there's some kind of conflict or duplication in your project setup.
To help you better, could you please clarify:
- Which SDK are you upgrading? (Android SDK, React Native SDK, Expo SDK, or another platform?)
- What exactly does the full error message say? If you can paste the exact error, that would help a lot.
- Any relevant part of your
build.gradle
,package.json
, or config files? - What tools or environment you're using? (e.g., Android Studio, Expo CLI, React Native CLI)
Common causes of "duplicate" errors when upgrading SDK versions:
- Duplicate dependencies: Two or more libraries pulling different versions of the same dependency.
- Manifest or resource duplicates: Android resource or manifest files being duplicated.
- Gradle cache or build issues: Sometimes the build cache needs clearing after SDK upgrades.
Quick things to try:
- Clean your project
- Run in your project folder:
./gradlew clean
- or in React Native:
cd android && ./gradlew clean
- Delete build folders
- Delete
android/app/build
andandroid/build
folders manually or via terminal. - Check dependencies for duplicates
- Check
build.gradle
dependencies orpackage.json
for any duplicates or conflicting versions. - Invalidate caches and restart IDE
- In Android Studio:
File > Invalidate Caches / Restart
- Upgrade dependencies carefully
- When moving SDK versions, sometimes you also need to upgrade related libraries (e.g., React Native or Expo packages).