Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error when building Android release build #770

Open
4 tasks done
uberfusion007 opened this issue Oct 11, 2022 · 2 comments
Open
4 tasks done

Error when building Android release build #770

uberfusion007 opened this issue Oct 11, 2022 · 2 comments

Comments

@uberfusion007
Copy link

uberfusion007 commented Oct 11, 2022

Bug report

CHECKLIST

  • I have read the issue reporting guidelines

  • I confirm this is a suspected bug or issue that will affect other users

  • I have read the documentation thoroughly and it does not help solve my issue.

  • I have checked that no similar issues (open or closed) already exist.

Current behavior:
Getting error on Android when compiling for release build.

A problem was found with the configuration of task ':app:uploadCrashlyticsMappingFileRelease' (type 'UploadMappingFileTask').

Steps to reproduce:

  • Installing latest 14.2.1-cli
  • Run ionic cordova build android with release configuration

Screenshots
Screen Shot 2022-10-11 at 12 01 03 PM

Android build issue:

  • Node JS version
    • 18.10.0
  • Gradle version
    • 7.4.2
  • Target Android SDK version
    • 32

Other information:
I manage to resolve the compilation issue by modifying the firebasex gradle where i added apply plugin: com.google.gms.googleservices.GoogleServicesPlugin before apply plugin: com.google.firebase.crashlytics.buildtools.gradle.CrashlyticsPlugin line.

Screen Shot 2022-10-11 at 2 03 52 PM



@Theamansinghrajput
Copy link

buildscript {
repositories {
google()
mavenCentral()
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:7.0.4'
classpath 'com.google.gms:google-services:4.3.10'
classpath 'com.google.firebase:firebase-crashlytics-gradle:2.8.1'
}
}
repositories {
mavenCentral()
maven {
url "https://maven.google.com"
}
}

apply plugin: com.google.firebase.crashlytics.buildtools.gradle.CrashlyticsPlugin
android {
buildTypes {
debug {
firebaseCrashlytics {
mappingFileUploadEnabled false
}
}
release {
firebaseCrashlytics {
nativeSymbolUploadEnabled false
unstrippedNativeLibsDir "obj/local"
}
}
}
}

cdvPluginPostBuildExtras.add({
afterEvaluate {
rootProject.subprojects {
if (name == "app") {
if (!plugins.hasPlugin('com.google.gms.google-services')) {
apply plugin: com.google.gms.googleservices.GoogleServicesPlugin
}
}
}
}
})

@Theamansinghrajput
Copy link

change your build.gradle code with above code

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants