Blog / Build fixes

Android Build Failed After an SDK Update? 8 Common Errors and Fixes

You opened an old project, or raised the SDK version, and now nothing builds. These are the eight errors we meet most often in older apps, with the cause and the usual fix.

1. Could not resolve dependency (JCenter)

Cause: JCenter no longer accepts new packages, and JFrog announced that from August 2024 its requests are served from Maven Central. Libraries that were only ever published on JCenter, or old versions that were never copied over, can fail to download.

Fix: replace jcenter() with mavenCentral(), then move each library to a version that is published there. If a library has disappeared, it has to be replaced.

2. Package android.support does not exist

Cause: the app uses the retired support libraries.

Fix: migrate to AndroidX. In Android Studio use Refactor, Migrate to AndroidX, then replace the old imports and dependencies.

3. Could not find method compile()

Cause: old Gradle syntax that no longer exists.

Fix: change compile to implementation (or api), and testCompile to testImplementation.

4. Namespace not specified

Cause: newer Android Gradle Plugin versions want the namespace in the build file instead of the manifest.

android {
    namespace = "com.example.app"
}

Fix: add namespace to each module and remove the package attribute from AndroidManifest.xml.

5. Manifest merger failed: android:exported

Cause: apps targeting Android 12 or higher must declare android:exported on every activity, service and receiver that has an intent filter.

Fix: add android:exported="true" or "false" deliberately, based on whether other apps should be able to start that component.

6. Wrong Java version

Cause: current Android Gradle Plugin versions need a newer JDK (17 or higher), while old projects were built on Java 8.

Fix: set Gradle to use JDK 17 in Android Studio's Gradle settings, and set compileOptions and kotlinOptions to a supported language level.

7. Kotlin synthetic imports not found

Cause: kotlin-android-extensions (the synthetic view access) has been removed.

Fix: move to View Binding. Each findViewById or synthetic reference becomes a binding.viewName reference.

8. Duplicate class errors

Cause: the same class arrives twice, usually one copy from an old support library and one from AndroidX, or from two versions of the same library.

Fix: finish the AndroidX migration, then align library versions. The gradlew app:dependencies report shows where each copy comes from.

A clean build is not the finish line. After the build works, the app still has to be tested on a current Android version. See how that went for a real app in our Elaaj case study.

Frequently asked questions

Should I upgrade Gradle first or the SDK first?

Upgrade in small steps, building after each one: Gradle and the Android Gradle Plugin first, then the libraries, then the target SDK.

What if a library no longer exists?

It has to be replaced with a maintained alternative, which is often the largest part of an old project's work.

Can you fix a project that will not build at all?

Yes. Getting an old project building again is one of our core services. Send us the source for a free check.

Keep reading

Project will not build?

BrightRevamp updates older native Android apps (Java and Kotlin) to Google Play's current rules. Same app, same design, same features.

Email us about your app

Sources

Checked against the official documentation on 8 Oct 2026. Rules change, so confirm the dates in your Play Console.