Gradle errors when building detached Android app

#1

I just detached my project from Expo 25 for the first time (just to try it because I know I have to detach for a future version and wanted to do a dry run).

I tried following the Android Build & Run instructions at https://docs.expo.io/versions/latest/guides/expokit.html#4-android-build-and-run. After Android Studio barked at me to download a bunch of stuff and a few restarts later, I was syncing Gradle and ended up with the following errors:

Warning:The specified Android SDK Build Tools version (26.0.1) is ignored, as it is below the minimum supported version (26.0.2) for Android Gradle Plugin 3.0.1.
Android SDK Build Tools 26.0.2 will be used.
To suppress this warning, remove "buildToolsVersion '26.0.1'" from your build.gradle file, as each version of the Android Gradle Plugin now has a default version of the build tools.
<a href="fix.build.tools.version">Update Build Tools version and sync project</a><br><a href="openFile:/path/to/my/app/android/app/build.gradle">Open File</a>
Gradle Sync Issues
Error:android-apt plugin is incompatible with the Android Gradle plugin.  Please use 'annotationProcessor' configuration instead.
Error:All flavors must now belong to a named flavor dimension. Learn more at https://d.android.com/r/tools/flavorDimensions-missing-error-message.html
/path/to/my/app/android/app/build.gradle

The docs don’t mention these things. Should I do all of them, or might I break something? I’m on the latest Android Studio (3.0.1). Should I be on an older version?

1 Like
#2

Once I remove android-apt and add an annotationProcessor, I get the error

Error:(129, 0) Could not find method apt() for arguments [com.raizlabs.android:DBFlow-Compiler:2.2.1] on object of type org.gradle.api.internal.artifacts.dsl.dependencies.DefaultDependencyHandler.
<a href="openFile:/Users/keith/Github/nudge-coach-mobile/android/app/build.gradle">Open File</a>
#3

whoops, apparently Android Studio pops up an “upgrade to Gradle 4” prompt and I keep instinctually hitting it. Works a lot better when I don’t do that!

NOTE TO SELF: DON’T PRESS THE SHINY UPGRADE BUTTON!!

2 Likes
closed #4

This topic was automatically closed 20 days after the last reply. New replies are no longer allowed.