прореагировать родной apk сборка не удастся при использовании response-native-razorpay - PullRequest
0 голосов
/ 02 мая 2018

Я пытаюсь создать подписанный apk для моего кода кода. Я использовал библиотеку реагировать-родной-razorpay для интеграции платежей. При запуске cd android && ./gradlew assembleRelease в корневом каталоге моего проекта я застрял при следующей ошибке.

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':react-native-razorpay: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 22s
102 actionable tasks: 2 executed, 100 up-to-date

Во время работы ./gradlew assembleRelease --info я получаю следующие строки:

....
....

Successfully started process 'command '/Users/clove/Library/Android/sdk/build-tools/27.0.3/aapt''
/Users/clove/.gradle/caches/transforms-1/files-1.1/appcompat-v7-26.1.0.aar/37abea56216e7a3ad9a6c076b6dd1a92/res/values-v24/values-v24.xml:3:5-157: AAPT: Error retrieving parent for item: No resource found that matches the given name 'android:TextAppearance.Material.Widget.Button.Borderless.Colored'.

/Users/clove/.gradle/caches/transforms-1/files-1.1/appcompat-v7-26.1.0.aar/37abea56216e7a3ad9a6c076b6dd1a92/res/values-v24/values-v24.xml:4:5-135: AAPT: Error retrieving parent for item: No resource found that matches the given name 'android:TextAppearance.Material.Widget.Button.Colored'.

/Users/clove/.gradle/caches/transforms-1/files-1.1/appcompat-v7-26.1.0.aar/37abea56216e7a3ad9a6c076b6dd1a92/res/values-v26/values-v26.xml:13:5-16:13: AAPT: No resource found that matches the given name: attr 'android:keyboardNavigationCluster'.


> Task :react-native-razorpay:verifyReleaseResources FAILED
Putting task artifact state for task ':react-native-razorpay:verifyReleaseResources' into context took 0.0 secs.
Up-to-date check for task ':react-native-razorpay:verifyReleaseResources' took 0.0 secs. It is not up-to-date because:
  Task has failed previously.
All input files are considered out-of-date for incremental task ':react-native-razorpay:verifyReleaseResources'.
Unable do incremental execution: full task run
QueuedCruncher is using /Users/clove/Library/Android/sdk/build-tools/27.0.3/aapt

Shutdown finished in 0ms

:react-native-razorpay:verifyReleaseResources (Thread[Daemon worker Thread 18,5,main]) completed. Took 0.402 secs.

FAILURE: Build failed with an exception.

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

* Try:
Run with --stacktrace option to get the stack trace. Run with --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 1m 16s
102 actionable tasks: 9 executed, 93 up-to-date

1 Ответ

0 голосов
/ 15 мая 2018

Нашел решение. Оказалось, что проблема была из-за несоответствия конфигурации. версия Gradle, которую я использовал, была выше 3, что требует Android SDK версии 25 или выше. Принимая во внимание, что response-native-razorpay был поставлен с версией SDK 23. Поэтому я изменил эти настройки в node_modules, и сборка была успешно завершена.

...