Quantcast
Channel: Active questions tagged react-native+android - Stack Overflow
Viewing all articles
Browse latest Browse all 29452

I can not generate a apk release of the project. React-native (Android)

$
0
0

I thank you in advance. I try a problem with a project I am trying to generate the signed apk release but react-native does not generate presenting the following problem:

> Task :react-native-activity-result-deeplink:verifyReleaseResources FAILED

FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':react-native-activity-result-deeplink:verifyReleaseResources'.
> 1 exception was raised by workers:
  com.android.builder.internal.aapt.v2.Aapt2Exception: Android resource linking failed
  error: resource android:style/TextAppearance.Material.Widget.Button.Borderless.Colored not found.
  error: resource android:style/TextAppearance.Material.Widget.Button.Colored not found.
  C:\Users\DEV_8\Documents\testeReactN2\Melica\node_modules\react-native-activity-result-deeplink\android\build\intermediates\res\merged\release\values-v26\values-v26.xml:7: error: resource android:attr/colorError not found.
  C:\Users\DEV_8\Documents\testeReactN2\Melica\node_modules\react-native-activity-result-deeplink\android\build\intermediates\res\merged\release\values-v26\values-v26.xml:11: error: resource android:attr/colorError not found.
  C:\Users\DEV_8\Documents\testeReactN2\Melica\node_modules\react-native-activity-result-deeplink\android\build\intermediates\res\merged\release\values-v26\values-v26.xml:15: error: style attribute 'android:attr/keyboardNavigationCluster' not found.
  C:\Users\DEV_8\Documents\testeReactN2\Melica\node_modules\react-native-activity-result-deeplink\android\build\intermediates\res\merged\release\values-v28\values-v28.xml:7: error: resource android:attr/dialogCornerRadius not found.
  C:\Users\DEV_8\Documents\testeReactN2\Melica\node_modules\react-native-activity-result-deeplink\android\build\intermediates\res\merged\release\values-v28\values-v28.xml:11: error: resource android:attr/dialogCornerRadius not found.
  C:\Users\DEV_8\Documents\testeReactN2\Melica\node_modules\react-native-activity-result-deeplink\android\build\intermediates\res\merged\release\values\values.xml:2740: error: resource android:attr/fontStyle not found.
  C:\Users\DEV_8\Documents\testeReactN2\Melica\node_modules\react-native-activity-result-deeplink\android\build\intermediates\res\merged\release\values\values.xml:2741: error: resource android:attr/font not found.
  C:\Users\DEV_8\Documents\testeReactN2\Melica\node_modules\react-native-activity-result-deeplink\android\build\intermediates\res\merged\release\values\values.xml:2742: error: resource android:attr/fontWeight not found.
  C:\Users\DEV_8\Documents\testeReactN2\Melica\node_modules\react-native-activity-result-deeplink\android\build\intermediates\res\merged\release\values\values.xml:2743: error: resource android:attr/fontVariationSettings not found.
  C:\Users\DEV_8\Documents\testeReactN2\Melica\node_modules\react-native-activity-result-deeplink\android\build\intermediates\res\merged\release\values\values.xml:2744: error: resource android:attr/ttcIndex not found.
  C:\Users\DEV_8\Documents\testeReactN2\Melica\node_modules\react-native-activity-result-deeplink\android\build\intermediates\res\merged\release\values\values.xml:2908: error: resource android:attr/startX not found.
  C:\Users\DEV_8\Documents\testeReactN2\Melica\node_modules\react-native-activity-result-deeplink\android\build\intermediates\res\merged\release\values\values.xml:2911: error: resource android:attr/startY not found.
  C:\Users\DEV_8\Documents\testeReactN2\Melica\node_modules\react-native-activity-result-deeplink\android\build\intermediates\res\merged\release\values\values.xml:2914: error: resource android:attr/endX not found.
  C:\Users\DEV_8\Documents\testeReactN2\Melica\node_modules\react-native-activity-result-deeplink\android\build\intermediates\res\merged\release\values\values.xml:2917: error: resource android:attr/endY not found.
  C:\Users\DEV_8\Documents\testeReactN2\Melica\node_modules\react-native-activity-result-deeplink\android\build\intermediates\res\merged\release\values\values.xml:2925: error: resource android:attr/offset not found.
  error: failed linking references

In Android Studio.

 - already in android studio it generates Configuration 'compile' is
   obsolete and has been replaced with 'implementation' and 'api'.
 - The specified Android SDK Build Tools version (23.0.1) is ignored, as
   it is below the minimum supported version (28.0.3) for Android Gradle
   Plugin 3.4.2.
 - API 'variant.getJavaCompile()' is obsolete and has been replaced with
 - 'variant.getJavaCompileProvider()'.
 - the transform cache was reset.
 - Failed to automatically forward port 8083.

but does not work in android 5.1.1 API 22 which is necessary to work. when I remove react-native-activity-result-deeplink modules "react-native-communication-hardware-getnet" it is back generated by react-native, but these modules are essential for the project to be approved, I don't know what to try anymore.

The bundleRelease generation works normally, and in debug the project works normally as well.

Info Project

info Fetching system and libraries information... System: OS: Windows 10 10.0.18362 CPU: (4) x64 Intel(R) Core(TM) i5-7400 CPU @ 3.00GHz Memory: 874.71 MB / 7.91 GB Binaries: Node: 10.16.0 - C:\Program Files\nodejs\node.EXE Yarn: 1.16.0 - C:\Program Files (x86)\Yarn\bin\yarn.CMD npm: 6.9.0 - C:\Program Files\nodejs\npm.CMD SDKs: Android SDK: API Levels: 22, 23, 25, 27, 28, 29 Build Tools: 23.0.1, 25.0.3, 27.0.3, 28.0.3, 29.0.1, 29.0.2 System Images: android-22 | ARM EABI v7a, android-22 | Google APIs ARM EABI v7a, android-22 | Google APIs Intel x86 Atom, android-22 | Google APIs Intel x86 Atom_64, android-23 | ARM EABI v7a, android-23 | Google APIs ARM EABI v7a, android-25 | Google APIs ARM 64 v8a, android-25 | Google APIs ARM EABI v7a, android-27 | Google APIs Intel x86 Atom, android-27 | Google Play Intel x86 Atom, android-28 | Google APIs Intel x86 Atom, android-29 | Google APIs Intel x86 Atom, android-29 | Google Play Intel x86 Atom Android NDK: 20.0.5594570 IDEs: Android Studio: Version 3.5.0.0 AI-191.8026.42.35.5791312 npmPackages: react: 16.9.0 => 16.9.0 react-native: 0.61.5 => 0.61.5

Reproduce

  1. project link for error reproduction

git clone https://github.com/Andersonfrfilho/Melica

  1. download of keystore and documentation.

https://drive.google.com/open?id=1mB4_06WtZAt36B0ESOUA7aWsM8j90UYC

  1. paste my-upload-key.keystore in android/app
  2. add in android/gradle.properties
MYAPP_UPLOAD_STORE_FILE=my-upload-key.keystore
MYAPP_UPLOAD_KEY_ALIAS=my-key-alias
MYAPP_UPLOAD_STORE_PASSWORD=102030
MYAPP_UPLOAD_KEY_PASSWORD=102030
  1. add android/app/build.gradle

signingConfigs {... release { if (project.hasProperty('MYAPP_UPLOAD_STORE_FILE')) { storeFile file(MYAPP_UPLOAD_STORE_FILE) storePassword MYAPP_UPLOAD_STORE_PASSWORD keyAlias MYAPP_UPLOAD_KEY_ALIAS keyPassword MYAPP_UPLOAD_KEY_PASSWORD } } }

and

buildTypes { ... release { ... signingConfig signingConfigs.release } } 5. run comand cd android 6. run comand gradlew assembleRelease


Viewing all articles
Browse latest Browse all 29452

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>