Closed humbertoromanojr closed 4 years ago
I can't reproduce, and I build release mode in my tests https://github.com/mikehardy/rnfbdemo/blob/master/make-demo-v6.sh#L161
Hello 👋, to help manage issues we automatically close stale issues. This issue has been automatically marked as stale because it has not had activity for quite some time. Has this issue been fixed, or does it still require the community's attention?
This issue will be closed in 15 days if no further activity occurs. Thank you for your contributions.
Closing this issue after a prolonged period of inactivity. If this is still present in the latest release, please feel free to create a new issue with up-to-date information.
For anyone who still has this issue: 1- check custom Gradle properties in publishing settings 2- in Gradle.properties (located in Plugins/android) set the value of android.enableR8 to false just like this: android.enableR8=false 3- do the Force resolution thing and you are good to go.
Issue
Describe your issue here
As I am new to this help pattern for reporting Build errors, so I'm sorry if I was wrong to repost this bug here.
I already did as suggested in => 'android.enableR8 = false' and I was not successful and I also commented where there is => io.invertase.firebase.admob.BuildConfig and the same thing, the error still continues.
More in the normal degub, I managed to get Admob to work perfectly, but when I try to do Realease from APK it gives this error. because I am using the latest version of React Native.
Tutorial used to install Firebase and admob => https://invertase.io/oss/react-native-firebase/v6/admob/quick-start
===========bug R8 is the new Android code shrinker. If you experience any issues, please file a bug at https://issuetracker.google.com, using 'Shrinker (R8)' as component name. You can disable R8 by updating gradle.properties with 'android.enableR8=false'. Current version is: 1.4.94 (build 390954928f0db9c3b888a367f7f128ce3bbfb160 from go/r8bot (luci-r8-ci-archive-0-5g74)).
D8: Program type already present: io.invertase.firebase.admob.BuildConfig
What went wrong: Execution failed for task ':app:transformClassesAndResourcesWithR8ForRelease'.
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
Deprecated Gradle features were used in this build, making it incompatible with Gradle 6.0. Use '--warning-mode all' to show the individual deprecation warnings. See https://docs.gradle.org/5.5/userguide/command_line_interface.html#sec:command_line_warnings
Project Files
buildscript { ext { buildToolsVersion = "28.0.3" minSdkVersion = 21 compileSdkVersion = 28 targetSdkVersion = 28 } repositories { google() jcenter() } dependencies { classpath("com.android.tools.build:gradle:3.4.2")
}
allprojects { repositories { mavenLocal() maven { // All of React Native (JS, Obj-C sources, Android binaries) is installed from npm url("$rootDir/../node_modules/react-native/android") } maven { // Android JSC is installed from npm url("$rootDir/../node_modules/jsc-android/dist") } maven { url("$rootDir/../node_modules/react-native/android") }
}
project.ext.react = [ entryFile: "index.js", enableHermes: false, // clean and rebuild if changing ]
apply from: "../../node_modules/react-native/react.gradle"
/**
/**
/**
def jscFlavor = 'org.webkit:android-jsc-intl:+'
Date.toLocaleString
andString.localeCompare
that/**
android { compileSdkVersion rootProject.ext.compileSdkVersion
}
dependencies { implementation fileTree(dir: "libs", include: ["*.jar"]) implementation "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' }
project.ext.vectoricons = [ iconFontNames: [ 'MaterialIcons.ttf' ] // Name of the font files you want to copy ] apply from: "../../node_modules/react-native-vector-icons/fonts.gradle"
apply from: file("../../node_modules/@react-native-community/cli-platform-android/native_modules.gradle"); applyNativeModulesAppBuildGradle(project)
<manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.myportfolio">
Javascript
Click To Expand
#### `package.json`: ```json { "name": "myportfolio", "version": "0.0.1", "private": true, "scripts": { "restart": "rm -rf node_modules && rm -rf /tmp/haste-map-react-native-packager-* && yarn install && react-native start --reset-cache", "dev": "yarn react-native run-android", "start": "react-native start", "test": "jest", "lint": "eslint ." }, "dependencies": { "@react-native-community/async-storage": "^1.8.0", "@react-native-community/masked-view": "^0.1.6", "@react-native-firebase/admob": "^6.3.4", "@react-native-firebase/app": "^6.3.4", "axios": "^0.19.2", "date-fns": "^2.10.0", "date-fns-tz": "^1.0.10", "native-base": "^2.13.8", "react": "16.9.0", "react-native": "0.61.5", "react-native-banner-carousel": "^1.0.3", "react-native-email": "^1.0.2", "react-native-gesture-handler": "^1.6.0", "react-native-i18n": "^2.0.15", "react-native-linear-gradient": "^2.5.6", "react-native-platform-touchable": "^1.1.1", "react-native-reanimated": "^1.7.0", "react-native-safe-area-context": "^0.7.3", "react-native-screens": "^2.2.0", "react-native-snap-carousel": "^3.8.4", "react-native-vector-icons": "^6.6.0", "react-native-webview": "^8.1.2", "react-navigation": "^4.2.1", "react-navigation-drawer": "^2.4.1", "react-navigation-stack": "^2.2.1", "react-redux": "^7.2.0", "redux": "^4.0.5", "styled-components": "^5.0.1" }, "devDependencies": { "@babel/core": "^7.8.4", "@babel/runtime": "^7.8.4", "@react-native-community/eslint-config": "^0.0.7", "babel-jest": "^25.1.0", "eslint": "^6.8.0", "jest": "^25.1.0", "metro-react-native-babel-preset": "^0.58.0", "react-test-renderer": "16.9.0" }, "jest": { "preset": "react-native" } } ``` #### `firebase.json` for react-native-firebase v6: ```json # N/A ```
iOS
Click To Expand
#### `ios/Podfile`: - [x] I'm not using Pods - [x] I'm using Pods and my Podfile looks like: ```ruby # N/A ``` #### `AppDelegate.m`: ```objc // N/A ```
Android
Click To Expand
#### Have you converted to AndroidX? - [x] my application is an AndroidX application? - [x] I am using `android/gradle.settings` `jetifier=true` for Android compatibility? - [ ] I am using the NPM package `jetifier` for react-native compatibility? #### `android/build.gradle`: ```groovy // N/A ``` #### `android/app/build.gradle`: ```groovy // N/A ``` #### `android/settings.gradle`: ```groovy // N/A ``` #### `MainApplication.java`: ```java // N/A ``` #### `AndroidManifest.xml`: ```xml ```
Environment
Click To Expand
**`react-native info` output:** ``` OUTPUT GOES HERE ``` - **Platform that you're experiencing the issue on**: - [ ] iOS - [x] Android - [ ] **iOS** but have not tested behavior on Android - [x] **Android** but have not tested behavior on iOS - [ ] Both - **`react-native-firebase` version you're using that has this issue:** - `e.g. 5.4.3` - **`Firebase` module(s) you're using that has the issue:** - `e.g. Instance ID` - **Are you using `TypeScript`?** - `Y/N` & `VERSION`
Think
react-native-firebase
is great? Please consider supporting all of the project maintainers and contributors by donating via our Open Collective where all contributors can submit expenses. [Learn More]React Native Firebase
andInvertase
on Twitter for updates on the library.