2017-06-23 10 views
2

リアクタネイティブ0.43.4を使用してAndroidアプリを構築しています。React Native、Android:指定された名前に一致するリソースが見つかりませんでした。 'android:TextAppearance.Material.Widget.Button.Borderless.Colored'

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のバージョンによって引き起こされる同様の問題を見てきました:

Error retrieving parent for item: No resource found that matches the given name 'android:TextAppearance.Material.Widget.Button.Borderless.Colored'

をしかし、あなたが私のbuild.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スタジオを使用して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 

私は私が得ることができる任意のヘルプをみたいです!

+0

これは試しましたか? [リンク](https://stackoverflow.com/questions/42636421/no-resource-found-that-matches-the-given-name-androidtextappearance-material-w?rq=1) –

+0

はい、残念ながら、 – cmw

+0

申し訳ありませんが、私はかつてこの問題を抱えていましたが、私が今思い出すことのできるのは、ノードモジュールを編集しなければならない問題を引き起こしていた反応ネイティブfbsdkでした。あなたはreact-native-fbsdkを使っていますか? –

答えて

1

私は同じ問題を抱えています。あなたが反応するネイティブ・fbsdkを使用しない場合は、ここで問題と回答を確認してください

:私にとってFacebook Sdk Android Error Building

は、私は単に/アンドロイド/アプリ/ビルドにcompileSdkVersionとbuildToolsVersionを変更することで、この問題を解決しました。 25と25.0.1にグラデル。

compileSdkVersion 25 
buildToolsVersion “25.0.1” 
関連する問題