Miz*_*lul 5 build.gradle android-gradle-plugin react-native react-native-android android-studio-3.1
我一直在尝试使用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'.
Run Code Online (Sandbox Code Playgroud)
这正常吗?您可能会问我为什么要分离,正因为我有原因。
在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
依赖项,因为编译已过时。
例子
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'
....
}
Run Code Online (Sandbox Code Playgroud)
归档时间: |
|
查看次数: |
3464 次 |
最近记录: |