gpt4 book ai didi

javascript - 错误 : No resource found that matches the given name (at 'src' with value '@drawable/googleg_standard_color_18' )

转载 作者:行者123 更新时间:2023-11-29 02:37:07 25 4
gpt4 key购买 nike

首先,我浏览并尝试了各种资源未找到的帖子,但仍然没有找到解决这些错误的有效方法,我不确定为什么会出现这些错误,因为我上次启动该应用程序时,它建得很好。

enter image description here

错误:(16, 30) 未找到与给定名称匹配的资源(在“src”处,值为“@drawable/googleg_disabled_color_18”)。

错误:(9, 30) 未找到与给定名称匹配的资源(在“src”中值为“@drawable/googleg_standard_color_18”)。

这是 gradle 的样子

android {
compileSdkVersion 25
buildToolsVersion '25.0.0'

defaultConfig {
applicationId "com.moveapps"
minSdkVersion 16
targetSdkVersion 23
multiDexEnabled true
versionCode 1
versionName "1.1.0"
ndk {
abiFilters "armeabi-v7a", "x86"
}
}

如有任何帮助或建议,我们将不胜感激!提前致谢!

这个问题的核心是我不太明白这里的问题,所以如果有人能指出我在哪里可以阅读更多关于此类问题的信息,我很乐意了解修复背后的原因。

干杯,

编辑:添加 Package.json 文件

{
"name": "moveapp",
"version": "0.0.1",
"private": true,
"scripts": {
"start": "node node_modules/react-native/local-cli/cli.js start",
"test": "jest"
},
"dependencies": {
"async": "^2.4.0",
"firebase": "^3.9.0",
"images": "^3.0.0",
"lodash": "^4.17.4",
"moment": "^2.18.1",
"react": "15.4.1",
"react-native": "^0.41.2",
"react-native-app-intro": "^1.1.5",
"react-native-apple-healthkit-rn0.40": "^0.2.1-2",
"react-native-chart": "git+https://git@github.com/robcalcroft/react-native-chart.git",
"react-native-communications": "^2.2.1",
"react-native-confetti": "0.0.4",
"react-native-fbsdk": "^0.5.0",
"react-native-fcm": "^6.2.3",
"react-native-firestack": "^2.3.9",
"react-native-google-fit": "^0.2.0",
"react-native-modal-picker": "0.0.16",
"react-native-progress": "^3.2.0",
"react-native-router-flux": "3.37.0",
"react-native-scrollable-tab-view": "^0.7.2",
"react-native-search-bar": "^3.0.0",
"react-native-searchbar": "^1.10.0",
"react-native-vector-icons": "^4.1.1",
"react-redux": "^5.0.2",
"redux": "^3.6.0",
"redux-persist": "^4.7.1",
"redux-thunk": "^2.2.0",
"tipsi-stripe": "^3.7.0",
"uuid": "^3.0.1"
},
"devDependencies": {
"babel-jest": "18.0.0",
"babel-preset-react-native": "1.9.1",
"eslint-config-rallycoding": "^3.2.0",
"jest": "18.1.0",
"react-test-renderer": "15.4.1"
},
"jest": {
"preset": "react-native"
}
}

最佳答案

通常当您没有安装相同版本的 SDK 构建工具时会发生此错误,因此您需要安装 buildToolsVersion '25.0.0' 但根据您的 package.json 依赖项,您需要将你的 android/app/build.gradle 改成这样

android {

compileSdkVersion 23
buildToolsVersion "23.0.1"

defaultConfig {
applicationId "com.moveapps"
minSdkVersion 16
targetSdkVersion 22
multiDexEnabled true
versionCode 1
versionName "1.1.0"
ndk {
abiFilters "armeabi-v7a", "x86"
}
}

android/build.gradle是这样的

buildscript {

dependencies {
classpath 'com.android.tools.build:gradle:2.2.3' // this is the correct version for build tool

// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
// classpath 'com.neenbedankt.gradle.plugins:android-apt:1.8'
}
}

也不建议更新 react native android 项目抛出 android studio,因为它会出错

关于javascript - 错误 : No resource found that matches the given name (at 'src' with value '@drawable/googleg_standard_color_18' ),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/46385434/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com