我正在使用React Native0.43构建一个Android应用程序。4
。
运行react native run android
后,我发现以下错误:
/Applications/MAMP/htdocs/myapp/android/app/build/intermediates/res/merged/debug/values-v24/values-v24.xml:3: AAPT: Error retrieving parent for item: No resource found that matches the given name 'android:TextAppearance.Material.Widget.Button.Borderless.Colored'.
/Applications/MAMP/htdocs/myapp/android/app/build/intermediates/res/merged/debug/values-v24/values-v24.xml:4: AAPT: Error retrieving parent for item: No resource found that matches the given name 'android:TextAppearance.Material.Widget.Button.Colored'.
/Applications/MAMP/htdocs/myapp/android/app/build/intermediates/res/merged/debug/values-v24/values-v24.xml:3: error: Error retrieving parent for item: No resource found that matches the given name 'android:TextAppearance.Material.Widget.Button.Borderless.Colored'.
/Applications/MAMP/htdocs/myapp/android/app/build/intermediates/res/merged/debug/values-v24/values-v24.xml:4: error: Error retrieving parent for item: No resource found that matches the given name 'android:TextAppearance.Material.Widget.Button.Colored'.
:app:processDebugResources FAILED
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':app:processDebugResources'.
> com.android.ide.common.process.ProcessException: Failed to execute aapt
我已经看到了由编译SDK版本不匹配构建工具版本引起的类似问题:
检索项的父项时出错:未找到与给定名称“android:TextAppearance”匹配的资源。布料小装置。按钮无边界的。彩色的
但是,如果你看看我的身材。gradle,你会发现它们确实匹配:
android {
compileSdkVersion 23
buildToolsVersion "23.0.1"
defaultConfig {
applicationId "com.myapp"
minSdkVersion 16
targetSdkVersion 23
versionCode 1
versionName "1.0"
ndk {
abiFilters "armeabi-v7a", "x86"
}
}
splits {
abi {
reset()
enable enableSeparateBuildPerCPUArchitecture
universalApk false // If true, also generate a universal APK
include "armeabi-v7a", "x86"
}
}
buildTypes {
release {
minifyEnabled enableProguardInReleaseBuilds
proguardFiles getDefaultProguardFile("proguard-android.txt"), "proguard-rules.pro"
}
}
// applicationVariants are e.g. debug, release
applicationVariants.all { variant ->
variant.outputs.each { output ->
// For each separate APK per architecture, set a unique version code as described here:
// http://tools.android.com/tech-docs/new-build-system/user-guide/apk-splits
def versionCodes = ["armeabi-v7a":1, "x86":2]
def abi = output.getFilter(OutputFile.ABI)
if (abi != null) { // null for the universal-debug, universal-release variants
output.versionCodeOverride =
versionCodes.get(abi) * 1048576 + defaultConfig.versionCode
}
}
}
}
dependencies {
compile project(':react-native-navigation')
compile project(':react-native-fs')
compile project(':react-native-camera')
compile fileTree(dir: "libs", include: ["*.jar"])
compile "com.android.support:appcompat-v7:23.0.1"
compile "com.facebook.react:react-native:+" // From node_modules
}
// Run this once to be able to run the application with BUCK
// puts all compile dependencies into folder libs for BUCK to use
task copyDownloadableDepsToLibs(type: Copy) {
from configurations.compile
into 'libs'
}
最后,我使用Android studio安装了Android SDK。当我键入android list target
时,我得到以下信息:
Available Android targets:
----------
id: 1 or "Google Inc.:Google APIs:23"
Name: Google APIs
Type: Add-On
Vendor: Google Inc.
Revision: 1
Description: Google APIs
Based on Android 6.0 (API level 23)
Libraries:
* com.google.android.maps (maps.jar)
API for Google Maps
* com.android.future.usb.accessory (usb.jar)
API for USB Accessories
* com.google.android.media.effects (effects.jar)
Collection of video effects
----------
id: 2 or "android-23"
Name: Android API 23
Type: Platform
API level: 23
Revision: 3
----------
id: 3 or "android-24"
Name: Android API 24
Type: Platform
API level: 24
Revision: 2
----------
id: 4 or "android-25"
Name: Android API 25
Type: Platform
API level: 25
Revision: 3
----------
id: 5 or "android-26"
Name: Android API 26
Type: Platform
API level: 26
Revision: 1
我希望能得到任何帮助!
我也有同样的问题。
如果您确实使用react原生fbsdk,请检查此处的问题和答案:Facebook Sdk Android错误生成
对我来说,我只需在/android/app/build中更改compileSdkVersion和buildToolsVersion,就解决了这个问题。渐变到25和25.0。1.
compileSdkVersion 25
buildToolsVersion “25.0.1”
我在android studio中启动新项目时收到了这些错误。 错误:(1)检索项的父项时出错:未找到与给定名称“android:TextAppearance”匹配的资源。布料小装置。按钮无边界的。有色的。 错误:(1)检索项的父项时出错:未找到与给定名称“android:TextAppearance”匹配的资源。布料小装置。按钮无边界的。有色的。 错误:任务执行失败:应用程序:进程DebugRe
我试图在Xamarin实现一个文件提供程序。窗体,我有一个问题加载我的文件路径文件。每当我试图构建该应用程序,我得到以下错误: 没有找到与给定名称匹配的资源(在“资源”处,值为“@xml/file_paths”) 该文件包含多个路径。xml文件位于xml文件夹下的resources目录中。任何帮助都将不胜感激。以下是我的相关档案: Android清单: 文件路径。xml 主要活动。反恐精英
当我尝试在Android Studio中启动我的应用程序时,它会产生如下3个错误: 错误:(3)检索项的父项时出错:找不到与给定名称“Android:TextApparance.Material.Widget.Button.Borderless.Colored”匹配的资源。 com.android.ide.common.Process.processException:org.gradle.Pro
我找到了这个链接并尝试应用相同的解决方案,但它不起作用,我仍然得到相同的错误 有人能帮忙吗?
平台:4.3 我是一个Android新手,非常感谢!