我一直在尝试使用 expo 工具 xde 使用 react native 创建一个应用程序,然后使用 exp detach 将其分离,当我在 Android Studio 中打开时,我在构建时遇到很多错误,例如:
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'.
这是正常的吗?你可以问我为什么分手,我有理由。
在 android studio 中编译构建应用程序时,如何在 React Native 中创建分离应用程序并获得更流畅的体验?
ps:我使用的是 Android Studio 3.1.1,不知何故,我似乎在使用最新版本的 Gradle [https://services.gradle.org/distributions/gradle-4.4-all.zip][1],如果有的话,idk从 react 应用程序的角度来看,或者我已经通过 Android Studio 以某种方式进行了更新。
此外,我似乎不再对 app.build.graddle 中的依赖项进行编译,它仍然在提示我已经用实现替换了它
最佳答案
由于错误状态,您必须替换 compile
与 implementation
在依赖项中,因为 compile 已过时。
例子
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'
....
}
关于react-native - 使用 React Native 应用程序构建 Android Studio 时出错,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/49812692/