Can't run cordova run android in Ionic project - android

I'm having an issue running cordova run android in my Ionic project. I've uninstalled and reinstalled Cordova, Ionic, Gradle, and Android Studio, yet I still get this following error.
FAILURE: Build failed with an exception.
Where:
Script 'path/platforms/android/cordova-android-play-services-gradle-release/app-cordova-android-play-services-gradle-release.gradle' line: 11
What went wrong:
A problem occurred evaluating script.
Could not read script 'path/platforms/android/app/cordova-android-play-services-gradle-release/properties.gradle' as it does not exist.
Question: How can I get this error to go away and my project to run successfully?

Related

cordova build android failed with exception

I'm trying to build an Android app with cordova (without Andorid studio) from macOS.
Tried to run cordova build android
and get this error -
`cordova.gradle' line: 69
What went wrong:
A problem occurred evaluating script.
No installed build tools found. Please install the Android build tools version 30.0.3.`

Build failed when attempting to launch react native project via Android Studio

I am trying to run my react native project in Android Studio via the Emulator but the following error appears when attempting to run the project:
FAILURE: Build failed with an exception
What went wrong:
Execution failed for task ':app:mergeDebugNativeLibs'.
A failure occurred while executing com.android.build.gradle.internal.tasks.Workers$ActionFacade
More than one file was found with OS independent path 'lib/x86/libc++_shared.so'
I followed the steps for setting up the development environment, https://reactnative.dev/docs/environment-setup.
I added org.gradle.jvmargs=-Xmx4608m to the gradle.properties as advised from another fix but it is still not running.
The project runs perfectly on iOS, Xcode but not for Android.
I am using 'compileSdkVersion = 31` in the /android/build.gradle file.
Can someone please help here?

Execution error while building android phone gap build

when i Run the command phonegap build android it gives me the the error execution failed for task 'mergeDebugResources' I am implementing the plugin cordova-background-geolocation-lt and following the same as explained there and install the same SDK's.
complete error
Here is some more info about DEBUG after running the command gradlew.bat --info build clean
I think this is a clash with some other plugin. I have tried adding the diagnostic plugin to a brand new project and tried building. That worked fine.

Missing native-platform.dll error

I am building an ionic application for my android project. when I try to build the app with the command "ionic build android", I'm getting the following error
FAILURE: Build failed with an exception.
*What went wrong:
Failed to load native library 'native-platform.dll' for windows 8.1 amd64.
What would be the problem? and suggest me some solutions.

Gradle build error using cordova

After I created new project using cordova and added android platform, I got this error while building the project for first time
Download https://repo1.maven.org/maven2/com/android/tools/build/gradle-core/1.5.0/gradle-core-1.5.0.jar
FAILURE: Build failed with an exception.
* What went wrong:
A problem occurred configuring root project 'android'.
> Could not resolve all dependencies for configuration ':classpath'.
> Could not download artifact 'gradle-core.jar (com.android.tools.build:gradle-core:1.5.0)'
> Failed to move file 'C:\Users\nienb\AppData\Local\Temp\gradle_download4337332192574000593bin' into filestore at 'C:\Users\nienb\.gradle\caches\modules-2\files-2.1\com.android.tools.build\gradle-core\1.5.0\70915a3f0ef4243d4630ea23219f5445fac82700\gradle-core-1.5.0.jar'
any one could help ?
I had the same issue developing on Windows after upgrading to Cordova 6. Run cmd as administrator and it resolved my issues.
Had the same problem. I noticed that when re-running the build, the file that the build got stuck on before would suddenly transfer just fine, but then the build failed on a different file.
I re-ran the build 4 or 5 times, and eventually it worked. I was running this in an administrator command prompt; not sure if that was important.
I solve my problem by downgrade gradle version from 1.5 to 1.3, both on main app and cordova plugin, but still looking for some official solutions

Categories

Resources