我在查看所有类似的问题和答案后发布了这个问题。
这是我研究的问题。
也许,您可能想知道这是一个重复的问题,但就我而言,事实并非如此。让我们看看情况如何。首先,这是错误来源的代码片段:
apply plugin: 'com.android.library'
android {
compileSdkVersion 25
buildToolsVersion "25.0.2"
defaultConfig {
minSdkVersion 16
targetSdkVersion 25
versionCode 1
versionName "1.0"
ndk {
abiFilters "armeabi-v7a", "x86"
}
}
}
dependencies {
compile fileTree(include: ['*.jar'], dir: 'libs')
compile "com.facebook.react:react-native:+"
}Run Code Online (Sandbox Code Playgroud)
此代码来自文件:node_modules/react-native-geocoder/android/build.gradle
现在让我向您展示出现的错误。
FAILURE: Build failed with an exception.
* Where:
Build file '/Project-root/node_modules/react-native-geocoder/android/build.gradle' line: 19
* What went wrong:
A problem occurred evaluating project ':react-native-geocoder'.
> Could not find method compile() for arguments [directory …Run Code Online (Sandbox Code Playgroud)我知道这是重复的,因为回答的解决方案对我不起作用,我再次询问,以防有人提出任何新的解决方案......
已经尝试过:
取消链接所有自动链接的模块并在 pod 文件中手动指定它们。
也尝试过
use_modular_headers!
pod 'glog', :podspec => '../node_modules/react-native/third-party-podspecs/glog.podspec', :modular_headers => false
pod 'Folly', :podspec => '../node_modules/react-native/third-party-podspecs/Folly.podspec', :modular_headers => false
Run Code Online (Sandbox Code Playgroud)
任何建议都非常感激。