infinitered / ignite-andross

The original React Native boilerplate from Infinite Red - Redux, React Navigation, & more
https://infinite.red/ignite
MIT License
475 stars 151 forks source link

resource android not found on "npm run android:build" #242

Open tayfunyasar opened 5 years ago

tayfunyasar commented 5 years ago

What's going on?

Tayfuns-MacBook-Pro:app-mobile tayfunyasar$ npm run android:build

> app@0.0.1 android:build /Users/tayfunyasar/dev/gitlap/app/client/app-mobile
> cd android && ./gradlew assembleRelease

> Configure project :app 
WARNING: 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

> Configure project :react-native-config 
WARNING: 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
WARNING: 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.4.
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.

> Configure project :react-native-device-info 
WARNING: 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
WARNING: The specified Android SDK Build Tools version (25.0.2) is ignored, as it is below the minimum supported version (27.0.3) for Android Gradle Plugin 3.1.4.
Android SDK Build Tools 27.0.3 will be used.
To suppress this warning, remove "buildToolsVersion '25.0.2'" from your build.gradle file, as each version of the Android Gradle Plugin now has a default version of the build tools.

> Configure project :react-native-gesture-handler 
WARNING: Configuration 'provided' is obsolete and has been replaced with 'compileOnly'.
It will be removed at the end of 2018. For more information see: http://d.android.com/r/tools/update-dependency-configurations.html
WARNING: The specified Android SDK Build Tools version (25.0.2) is ignored, as it is below the minimum supported version (27.0.3) for Android Gradle Plugin 3.1.4.
Android SDK Build Tools 27.0.3 will be used.
To suppress this warning, remove "buildToolsVersion '25.0.2'" from your build.gradle file, as each version of the Android Gradle Plugin now has a default version of the build tools.

> Task :app:bundleReleaseJsAndAssets 
warning: the transform cache was reset.
Loading dependency graph, done.
bundle: Writing bundle output to: /Users/tayfunyasar/dev/gitlap/app/client/app-mobile/android/app/build/generated/assets/react/release/index.android.bundle
bundle: Done writing bundle output
bundle: Copying 54 asset files
bundle: Done copying assets

error: resource android:style/TextAppearance.Material.Widget.Button.Borderless.Colored not found.
error: resource android:style/TextAppearance.Material.Widget.Button.Colored not found.
/Users/tayfunyasar/.gradle/caches/transforms-1/files-1.1/appcompat-v7-27.1.1.aar/baf05ba217c6ee9c35f9fb008fc2ffca/res/values-v26/values-v26.xml:9:5-12:13: AAPT: error: resource android:attr/colorError not found.

/Users/tayfunyasar/.gradle/caches/transforms-1/files-1.1/appcompat-v7-27.1.1.aar/baf05ba217c6ee9c35f9fb008fc2ffca/res/values-v26/values-v26.xml:13:5-16:13: AAPT: error: resource android:attr/colorError not found.

/Users/tayfunyasar/.gradle/caches/transforms-1/files-1.1/appcompat-v7-27.1.1.aar/baf05ba217c6ee9c35f9fb008fc2ffca/res/values-v26/values-v26.xml:17:5-93: AAPT: error: style attribute 'android:attr/keyboardNavigationCluster' not found.

/Users/tayfunyasar/.gradle/caches/transforms-1/files-1.1/appcompat-v7-27.1.1.aar/baf05ba217c6ee9c35f9fb008fc2ffca/res/values/values.xml:251:5-69: AAPT: error: resource android:attr/fontStyle not found.

/Users/tayfunyasar/.gradle/caches/transforms-1/files-1.1/appcompat-v7-27.1.1.aar/baf05ba217c6ee9c35f9fb008fc2ffca/res/values/values.xml:251:5-69: AAPT: error: resource android:attr/font not found.

/Users/tayfunyasar/.gradle/caches/transforms-1/files-1.1/appcompat-v7-27.1.1.aar/baf05ba217c6ee9c35f9fb008fc2ffca/res/values/values.xml:251:5-69: AAPT: error: resource android:attr/fontWeight not found.

error: failed linking references.

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':react-native-config:verifyReleaseResources'.
> com.android.ide.common.process.ProcessException: Failed to execute aapt

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

* Get more help at https://help.gradle.org

BUILD FAILED in 53s
131 actionable tasks: 3 executed, 128 up-to-date
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! app@0.0.1 android:build: `cd android && ./gradlew assembleRelease`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the app@0.0.1 android:build script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /Users/tayfunyasar/.npm/_logs/2019-01-23T11_18_04_719Z-debug.log
Tayfuns-MacBook-Pro: app-mobile tayfunyasar$ 

Steps to reproduce


ignite doctor results: Tayfuns-MacBook-Pro: app-mobile tayfunyasar$ ignite doctor System platform darwin
arch x64
cpu 8 cores Intel(R) Core(TM) i5-8259U CPU @ 2.30GHz
directory /Users/tayfunyasar/dev/gitlap/app/client/app-mobile

JavaScript node 11.7.0 /usr/local/bin/node
npm 6.6.0 /usr/local/bin/npm
yarn 1.13.0 /usr/local/bin/yarn

React Native react-native-cli 2.0.1
app rn version 0.57.7

Ignite ignite 2.2.2 /usr/local/bin/ignite
boilerplate ignite-andross

Android java 1.8.0_181 /Users/tayfunyasar/.jenv/shims/java
android home - /Users/tayfunyasar/Library/Android/sdk

iOS xcode 10.1

glaceglace commented 5 years ago

this is because react-native recently updated to 0.58 and began to use sdk 28. Change your react-native version in package.json back to 0.57.8 will fix this error temporarily. And be patient for the update of andross :)

jamonholmgren commented 5 years ago

@stylerope Thanks for that info! Would you want to take a stab at doing a pull request to upgrade Andross for 0.58 and SDK 28?

ref: https://github.com/infinitered/ignite-andross/issues/244

glaceglace commented 5 years ago

@jamonholmgren I looked into it and am glad to say that no painful modification will be made to support 0.58 and SDK 28, I'll try to do a pull request soon for upgrade.

jamonholmgren commented 5 years ago

@stylerope Looking forward to it!