I have been trying to create an app using react native using expo tools xde and then detach it using exp detach, when I open in Android Studio I get quite many error when building like:
Using incompatible plugins for the annotation processing
Configuration 'compile' is obsolete and has been replaced with
'implementation' and 'api'. It will be removed at the end of 2018.
For more information see:
http://d.android.com/r/tools/update-dependency-configurations.html
The specified Android SDK Build Tools version (23.0.1) is ignored,
as it is below the minimum supported version (27.0.3) for Android
Gradle Plugin 3.1.1. Android SDK Build Tools 27.0.3 will be used. To
suppress this warning, remove "buildToolsVersion '23.0.1'" from your
build.gradle file, as each version of the Android Gradle Plugin now
has a default version of the build tools. Update Build Tools version
and sync project Open File
Configuration 'compile' is obsolete and has been replaced with
'implementation' and 'api'. It will be removed at the end of 2018.
For more information see:
http://d.android.com/r/tools/update-dependency-configurations.html
Configuration 'testCompile' is obsolete and has been replaced with
'testImplementation' and 'testApi'. It will be removed at the end of
2018. For more information see: http://d.android.com/r/tools/update-dependency-configurations.html
Configuration 'testApi' is obsolete and has been replaced with
'testImplementation'.
Is this normal? you could ask me why did you detach, well for that I have reasons.
How can create a detach app in react native and have a bit smoother experience when it comes to compiling building the app in android studio?
ps: I am using Android Studio 3.1.1 and I somehow seem to be using latest version of Gradle [https://services.gradle.org/distributions/gradle-4.4-all.zip][1], idk if this comes from the prespective of the react app or I have somehow updated thru Android studio.
Also I do not seem to have anymore compile on my dependencies in app.build.graddle and it is still complaining about it I subtstituted with implementation already
You will need Node, Watchman, the React Native command line interface, a JDK, and Android Studio. While you can use any editor of your choice to develop your app, you will need to install Android Studio in order to set up the necessary tooling to build your React Native app for Android.
What you need to do is install a earlier version of Gradle for your project and then rebuild your app. Go to https://developer.android.com/studio/releases/gradle-plugin. Scroll down to the Update Gradle section. Here, you will see a table of Gradle version and Plugin version.
When assessing the two solutions, reviewers found Android Studio easier to use and administer. However, reviewers preferred the ease of set up, and doing business with React Native overall. Reviewers felt that Android Studio meets the needs of their business better than React Native.
As the error states, you have to replace compile
with implementation
in dependencies since compile is obsolete.
Example
dependencies {
implementation 'com.android.support:support-v4:25.4.0'
implementation 'com.android.support:recyclerview-v7:25.4.0'
implementation 'com.android.support:design:25.4.0'
....
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With