Anyways I installed gradle and when I run terminal to compile the app, it says
Plugin is too old, please update to a more recent version, or set ANDROID_DAILY_OVERRIDE environment variable to "30ea056c59524902d1004bd520624b7571f1ad77"
FAILURE: Build failed with an exception.
* Where:
Build file '/Users/Test/Desktop/PieMessage/PieMessage-Android/app/build.gradle' line: 1
* What went wrong:
A problem occurred evaluating project ':app'.
> Failed to apply plugin [id 'com.android.application']
> Could not create plugin of type 'AppPlugin'.
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
I would prefer not to use android studio or intellij because they are not letting me run the class for some reason, the RUN option is greyed out, only the RUN.. is available and that leads to debug.
Related
What even is this lol. I am so confused as to what's going on, I just wanted to run my app, please. Im on VSCode, building for Android with Flutter.
Here is the error message.
FAILURE: Build failed with an exception.
* Where:
Script 'C:\src\flutter\packages\flutter_tools\gradle\flutter.gradle' line: 422
* What went wrong:
A problem occurred configuring project ':app'.
> Cannot run Project.afterEvaluate(Closure) when the project is already evaluated.
* 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.`
In my case OneSignal was the reason of the problem.
I change in my "android > gradle > wrapper > gradle-wrapper.properties" file the version of "distributionUrl" to "gradle-6.7.1-all.zip".
I guess is a problem with version 7 of gradle.
When I run my app use jdk_x86(jdk1.8.0_321.jdk), I can build success, but when I use jdk_arm(zulu-8.jdk), gradle sync error:
FAILURE: Build failed with an exception.
* Where:
Build file '/Users/test/Work/Test/AlbumList/library/build.gradle' line: 29
* What went wrong:
A problem occurred evaluating project ':library'.
> For input string: ""
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
* Get more help at https://help.gradle.org
BUILD FAILED in 0s
the build gradle:
29:def revisionNumber = 'git rev-list HEAD --count'.execute().getText().trim().toInteger()
I find 'git rev-list HEAD --count' run in a error path, not run in current project path.
Check if you have gradle wrapper version 7.0+
I lost quite some time testing several M1 JDK distros and all presented the same behavior.
Turns out Gradle only added support to M1 on this version thus the error you're seeing
I've updated the cordova-plugin-print (by katzer)to v0.8.0 but it fails when building with PhoneGap Build. It throws this error
Error - A plugin you are using requires a preference:
ANDROID_SUPPORT_V4_VERSION
Where: Build file
'/var/gimlet/tmp/47255016036300/3460831/project/build.gradle' line:
276
What went wrong: A problem occurred evaluating root project 'project'.
Could not get unknown property 'ANDROID_SUPPORT_V4_VERSION' for object
of type
org.gradle.api.internal.artifacts.dsl.dependencies.DefaultDependencyHandler.
Is anyone willing to help?
Your question is missing stack trace and other details. However, the plugin
cordova-plugin-x-socialsharing
has an issue and fails with:
FAILURE: Build failed with an exception.
* Where:
Build file '/home/mj/projects/benara-sales-client/platforms/android/build.gradle' line: 266
* What went wrong:
A problem occurred evaluating root project 'android'.
> Could not get unknown property 'ANDROID_SUPPORT_V4_VERSION' for object of type org.gradle.api.internal.artifacts.dsl.dependencies.DefaultDependencyHandler.
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
To fix, you may install v5.4.0
so remove the plugin and the correct version
cordova plugin rm cordova-plugin-x-social-sharing
cordova plugin add cordova-plugin-x-social-sharing#5.4.0
Hope this helps.
I've recently added a library to my react-native project. The project was running fine before adding this dependency. However, when I try tryi to run it now through react-native run-android I get this error:
File C:\Users\user\.android\repositories.cfg could not be loaded.
FAILURE: Build failed with an exception.
* What went wrong:
A problem occurred configuring project ':app'.
> Could not resolve all dependencies for configuration ':app:_debugApkCopy'.
> Could not find com.onesignal:OneSignal:23.0.1.
Required by:
project :app
> Could not find com.onesignal:OneSignal:23.0.1.
Required by:
project :app > project :react-native-onesignal
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
BUILD FAILED
Total time: 1 mins 57.711 secs
Could not install the app on the device, read the error above for details.
Make sure you have an Android emulator running or a device connected and have
set up your Android development environment:
https://facebook.github.io/react-native/docs/android-setup.html
Edit: The android emulator is of course running.
After doing som research I figured out that I could try npm uninstall and install, without success. In the build.gradle I have specified my onesignal_app_id, and compile 'com.onesignal:OneSignal:23.0.1' under dependencies. I therefore tried gradle clean which produced this error:
FAILURE: Build failed with an exception.
* What went wrong:
A problem occurred configuring project ':app'.
> Could not resolve all dependencies for configuration ':app:_debugApk'.
> A problem occurred configuring project ':react-native-onesignal'.
> Failed to notify project evaluation listener.
> com.android.build.gradle.tasks.factory.AndroidJavaCompile.setDependencyCacheDir(Ljava/io/File;)V
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
BUILD FAILED in 1s
I had similar problem with Cordova.
I fixed by changing version of gradle from 2.2.3 to 2.3.3.
Below oneliner for this:
sed -i -E 's/com.android.tools.build:gradle:2.2.[0-9]+/com.android.tools.build:gradle:2.3.3/g' build.gradle
I was using Gradle 2.2.1 with Android plugin 1.1.3 and I was a happy man.
However, I decided upgrading to Gradle 2.8 and plugin 1.3.1 and I can't build my project. All I get is an error saying:
FAILURE: Build failed with an exception.
* What went wrong:
A problem occurred configuring project ':app'.
> Failed to notify project evaluation listener.
> java.lang.NoSuchMethodException: com.android.build.gradle.BasePlugin.getLocalVersion()
> Task with name 'xxxxxxxxx' not found in project ':app'.
* Try:
Run with --stacktrace option to get the stack trace. Run with --debug option to get more log output.
BUILD FAILED
This happens whenever I try to build from both Android Studio and command-line.
Any ideas?
PS: My configuration uses the wrapper btw.