When I create basic IONIC 4 application and run > ionic cordova build android
it works fine and apk generated.
When I add plugin firebase > ionic cordova plugin add cordova-plugin-firebase
It failed to build application.
ERROR:
\platforms\android\gradlew: Command failed with exit code 1 Error output:
FAILURE: Build failed with an exception.
What went wrong:
Failed to capture fingerprint of input files for task ':app:preDebugBuild' property 'compileManifests' during up-to-date check.
The library com.google.android.gms:play-services-measurement-base is being requested by various other libraries at [[16.5.0,16.5.0], [16.4.0,16.4.0]], but resolves to 16.5.0. Disable the plugin and check your dependencies tree using ./gradlew :app:dependencies.
Related
OS:
MacOS
Platform:
Android
SDK:
#sentry/react-native (2.0.0)
react-native version: 0.61.4
Are you using Expo?
No
Are you using sentry.io or on-premise?
sentry.io (SaaS)
I have following issue:
When I try to to build the project by this command
npx react-native run-android
It fires this error
Task :sentry_react-native:compileDebugJavaWithJavac FAILED
570 actionable tasks: 3 executed, 567 up-to-date
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':sentry_react-native:compileDebugJavaWithJavac'.
> java.time.DateTimeException: Invalid value for MonthOfYear (valid values 1 - 12): 0
Expected result:
The project should be built without issue
Have you tried first doing
yarn add jetifier and then npx jetify
Then building your app.
Try this and do let me know in case of any concerns.
It worked when I switched
#sentry/react-native to version "^1.3.8"
looks it was a conflict with Gradle version
I did the following
react-native init project-name
yarn add react-navigation react-native-gesture-handler and
react-native run-android
The dependencies installed successfully but the app failed to build with the following errors
> Task :react-native-gesture-handler:packageDebugResources FAILED
17 actionable tasks: 8 executed, 9 up-to-date
> FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':react-native-gesture-handler:packageDebugResources'.
> Could not resolve all files for configuration ':react-native-gesture-handler:_
internal_aapt2_binary'.
> Failed to transform artifact 'aapt2-windows.jar (com.android.tools.build:aa
pt2:3.4.1-5326820)' to match attributes {artifactType=_internal-android-aapt2-bi
nary, org.gradle.usage=java-runtime-jars}.
> org.gradle.api.GradleException: Could not read path 'C:\Users\DevLewa\.g
radle\caches\transforms-2\files-2.1\3d408b3640f7dfba25695085d22596b0\aapt2-3.4.1
-5326820-windows'.
I have searched all through github issues but found no helping information, how do I resolve this, I have being on it since morning today.
Thanks
I had the same problem with some of my initialized projects using reac-native cli. it would be solved by running: react-native link in your project directory. I hope it would work for you as me.
If it was helpful please vote me up:)
After setting up a react-native project (react-native-starter-kit-instamobile), ran npm install followed by run-android. I am getting the a build error.
FAILURE: Build failed with an exception.
What went wrong:
Failed to notify dependency resolution listener.
The library com.google.android.gms:play-services-basement is being requested by various other libraries at [[15.0.1,15.0.1]], but resolves to 16.1.0. Disable the plugin and check your dependencies tree using ./gradlew :app:dependencies.
The library com.google.firebase:firebase-analytics is being requested by various other libraries at [[16.0.3,16.0.3]], but resolves to 16.0.6. Disable the plugin and check your dependencies tree using ./gradlew :app:dependencies.
I am creating release APK using the following versions : node - 8.12.0 gradle - 4.10.2 ionic CLI - 4.0.5 Cordova - 8.0.0
When I run the
ionic cordova build android --prod --release
I am getting the following error.
FAILURE: Build failed with an exception.
* Where:
Build file '/app/platforms/android/app/build.gradle' line: 94
* What went wrong:
A problem occurred evaluating project ':app'.
> Could not resolve all files for configuration 'classpath'.
> Could not find com.google.gms:google-services:3.2.0.
Searched in the following locations:
https://jcenter.bintray.com/com/google/gms/google-services/3.2.0/google-services-3.2.0.pom
https://jcenter.bintray.com/com/google/gms/google-services/3.2.0/google-services-3.2.0.jar
https://repo1.maven.org/maven2/com/google/gms/google-services/3.2.0/google-services-3.2.0.pom
https://repo1.maven.org/maven2/com/google/gms/google-services/3.2.0/google-services-3.2.0.jar
Today there is a problem with repositories. It seems no one can build a project Could not find com.google.gms:google-services:4.1.0
I have an ionic application shows error when i run ionic cordova build android
BUILD FAILED in 4s (node:5692) UnhandledPromiseRejectionWarning:
Unhandled promise rejection (rejection id: 1): Error:
/home/bharathi/ionic/hourli/platforms/android/gradlew: Command failed
with exit code 1 Error output: FAILURE: Build failed with an
exception.
What went wrong: Execution failed for task ':transformDexArchiveWithExternalLibsDexMergerForDebug'.
com.android.builder.dexing.DexArchiveMergerException: Unable to merge dex
projects.properties
target=android-26
android.library.reference.1=CordovaLib
cordova.system.library.1=com.android.support:appcompat-v7:23+
cordova.gradle.include.1=com.synconset.imagepicker/app-ignorelinterrors.gradle
cordova.gradle.include.2=com.synconset.imagepicker/app-androidtarget.gradle
cordova.gradle.include.3=cordova-plugin-badge/app-badge.gradle
cordova.system.library.2=com.facebook.android:facebook-android-sdk:4.+
cordova.system.library.3=com.google.android.gms:play-services-auth:11.6.2
cordova.system.library.4=com.google.android.gms:play-services-identity:11.6.2
cordova.system.library.5=com.android.support:support-v4:+
cordova.gradle.include.4=cordova-plugin-local-notification/app-localnotification.gradle
cordova.system.library.6=com.android.support:support-v4:24.1.1+
cordova.system.library.7=com.android.support:support-v4:26.+
cordova.system.library.8=com.android.support:support-v13:26.+
cordova.system.library.9=me.leolin:ShortcutBadger:1.1.17#aar
cordova.system.library.10=com.google.firebase:firebase-messaging:11.6.2
cordova.gradle.include.5=phonegap-plugin-push/app-push.gradle
build.gradle
defaultConfig {
multiDexEnabled true
}
i have added multiDexEnabled in build.gradle,still getting the same error when i try to build.I tried after
ionic cordova platform rm android
ionic cordova platform add android
but still getting the same error
It occured for me. Fixed with:
cordova clean
After 2 days trying to fix it I found a solution, in my case the following plugins caused a crash: cordova-admob-sdk, cordova-plugin-firebase and I changed manually the play-services-ads version in "project.properties" and "build.gradle" files from "com.google.android.gms:play-services-ads:+" to "com.google.android.gms:play-services-ads:16.0.0"