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

assembleRelease on react-native 0.60.6 android to create APK is throwing so many different errors

$
0
0

Whenever I attempt to run:

./gradlew assembleRelease

It throws errors with my assets saying "Duplicate resources". Attempted everything I found in github and also here in Stackoverflow but I couldn't make it work. Even the "fix" modifying the react.gradle in node_modules which I find disgusting.

Also attempted removing all my assets before running assembleRelease:

rm -rf ./android/app/src/main/res/drawable-*

rm -rf ./android/app/src/main/res/raw

But when I do the workaround above, instead of throwing the errors related to assets, it throws errors related to BuildTypes for every dependency that I'm using:

Unable to find a matching variant of project :@react-native-community_blur:
          - Variant 'debugApiElements' capability MyApp:@react-native-community_blur:unspecified:
              - Incompatible attributes:
                  - Required com.android.build.api.attributes.BuildTypeAttr 'packagingOptions' and found incompatible value 'debug'.
                  - Required org.gradle.usage 'java-runtime' and found incompatible value 'java-api'.
              - Other attributes:
                  - Required RNN.reactNativeVersion 'reactNative60' but no value provided.
                  - Found com.android.build.api.attributes.VariantAttr 'debug' but wasn't required.
                  - Required com.android.build.gradle.internal.dependency.AndroidTypeAttr 'Aar' and found compatible value 'Aar'.
          - Variant 'debugRuntimeElements' capability MyApp:@react-native-community_blur:unspecified:
              - Incompatible attribute:
                  - Required com.android.build.api.attributes.BuildTypeAttr 'packagingOptions' and found incompatible value 'debug'.
              - Other attributes:
                  - Required RNN.reactNativeVersion 'reactNative60' but no value provided.
                  - Found com.android.build.api.attributes.VariantAttr 'debug' but wasn't required.
                  - Required com.android.build.gradle.internal.dependency.AndroidTypeAttr 'Aar' and found compatible value 'Aar'.
                  - Required org.gradle.usage 'java-runtime' and found compatible value 'java-runtime'.
          - Variant 'releaseApiElements' capability MyApp:@react-native-community_blur:unspecified:
              - Incompatible attributes:
                  - Required com.android.build.api.attributes.BuildTypeAttr 'packagingOptions' and found incompatible value 'release'.
                  - Required org.gradle.usage 'java-runtime' and found incompatible value 'java-api'.
              - Other attributes:

(assembleDebug works just fine by the way.)

I'm using RN 0.60.6 & Gradle 5.6.1

Nothing works so far. Any ideas? It's literally driving me nuts.


Viewing all articles
Browse latest Browse all 29601

Trending Articles



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