The current Gradle version 6.7 is not compatible - javascript

I have this issue:
The current Gradle version 6.7 is not compatible with the Kotlin Gradle plugin. Please use Gradle 6.7.1 or newer, or the previous version of the Kotlin plugin.
enter image description here

The Solution is to Upgrade Gradle version
Try editing the distributionUrl in ..\android\gradle\wrapper\gradle-wrapper.properties to
distributionUrl=https\://services.gradle.org/distributions/gradle-6.7.1-all.zip
Other gradle versions for future reference

You can be configure via Android Studio
File -> Project Structure -> Project.
Change the Grandle version to 6.8.3 > Apply > OK

Related

Minimum supported Gradle version is 7.3.3. Current version is 7.0.2 [duplicate]

After update to Android Studio Chimpmunk, I get the error message on Gradle sync:
Minimum supported Gradle version is 7.3.3. Current version is 7.2.'
In my gradle-wrapper.properties, I have got :
distributionUrl=https\://services.gradle.org/distributions/gradle-7.3.3-bin.zip
In my build.gradle, I have :
classpath 'com.android.tools.build:gradle:7.2.0'
I can't change it to:
classpath 'com.android.tools.build:gradle:7.3.3'
the latest version being found by Android Studio being 7.2.0
If I set:
distributionUrl=https\://services.gradle.org/distributions/gradle-7.2.0-bin.zip
I also get the same error (stangely).
I to fix this problem?
Thanks.
ANSWER TO MY QUESTION :
For now, I downgraded both to 7.0.4. Update will probably be possible soon.
I just had this problem and invalidating cache fixed the issue.
Image: Invalidate Cache and restart
file/sync project with Gradle Files
I got this problem too after accepting an auto-update prompt from Android Studio. Weirdly, my machine synced OK but other people's didn't.
The gradle version requirement seems to be imposed by the Android gradle plugin (AGP) versions. So also look in your build.gradle files for this kind of thing:
plugins {
id 'com.android.application' version '7.2.0'
id 'com.android.library' version '7.2.0'
}
I found that the AGP version had got bumped to 7.2.0 by the update, and that must have a requirement of Gradle 7.3.3 (confusing!). Anyway, when I edited the AGP back to 7.1.3, then I could downgrade the base gradle distributionUrl to 7.2 and it all worked again.
So this is a compatible set of versions:
build.gradle
plugins {
id 'com.android.application' version '7.1.3'
id 'com.android.library' version '7.1.3'
}
gradle-wrapper.properties
distributionUrl=https\://services.gradle.org/distributions/gradle-7.2-all.zip
I have invalidated cache but it didnt help.
The problem of my setup was a two gradle-wrapper.properties files. Both of them should have same Gradle version but they had different.
yourproject/gradle/wrapper/gradle-wrapper.properties
and
gradle/wrapper/gradle-wrapper.properties
I set the same Gradle version for both of them to the
distributionUrl=https\://services.gradle.org/distributions/gradle-7.4.2-bin.zip
After that issue has gone.
I had the same problem for a project that i havent opened since december 2021, i fixed it by updating the gradle version to 7.4.2 in gradle.wrapper.properties
distributionUrl=https\://services.gradle.org/distributions/gradle-7.4.2-bin.zip
and used 7.2.1 for the android gradle plugin version, i've also updated Android Studio to Chipmunk 2021.2.1 Patch 1.
I faced the same issue for Gradle version 7.3.0 (Stable). This is how I solved the issue:
I changed the distribution URL present inside gradle-wrapper.properties file:
distributionUrl=https\://services.gradle.org/distributions/gradle-7.4-all.zip
Then removed the following plugin present inside the build.gradle (app module)
apply plugin: 'com.google.gms.google-services'
Finally added this line to the main/AndroidManifest.xml to the activity section:
android:exported="true"
So I've just had the same problem with the incompatible required and current Gradle versions(followed the suggested AGP update). Going back to v7.0.4 has fixed the issue.
However, the answer given by #Khaled has also worked for me.
File > Invalidate Caches > Invalidate and Restart
You have to update to android studio dolphin first (was on chipmunk).
This update support gradle version : 3.2 to 7.3, link here https://developer.android.com/studio/releases/gradle-plugin
Then update gradle-wrapper.properties :
distributionUrl=https\://services.gradle.org/distributions/gradle-7.4-bin.zip
Then update your module dependencies as below
dependencies {
classpath 'com.android.tools.build:gradle:7.3.0'
}
Optional : You will be asked to update gradle plugin to 7.3.1 so you can do it then your will have -> 'com.android.tools.build:gradle:7.3.1'
That's all you need, no invalidate cache and restart or something else.
Install new version Android Studio. It's working for me.

ERROR in Error: Metadata version mismatch for module ngx-swiper-wrapper found version 4, expected 3

I'm using swiper module which on installation runs fine but when I re serve the project then I'm stuck with error:
The plugin link
ERROR in Error: Metadata version mismatch for module
E:/xampp/htdocs/havemybooks/node_modules/ngx-swiper-wrapper/dist/ng
x-swiper-wrapper.d.ts, found version 4, expected 3, resolving symbol
ComponentModule in E:/xampp/htdocs/havemybooks/src/
app/component/component.module.ts, resolving symbol ComponentModule in
E:/xampp/htdocs/havemybooks/src/app/component/com ponent.module.ts
Here is the result of my ng -v
#angular/cli: 1.4.2
node: 6.10.3
os: win32 x64
#angular/animations: 4.4.5
#angular/common: 4.4.5
#angular/compiler: 4.4.5
#angular/core: 4.4.5
#angular/forms: 4.4.5
#angular/http: 4.4.5
#angular/platform-browser: 4.4.5
#angular/platform-browser-dynamic: 4.4.5
#angular/router: 4.4.5
#angular/cli: 1.4.2
#angular/compiler-cli: 4.4.5
#angular/language-service: 4.4.5
typescript: 2.3.4
After opening an issue I found that this error is due to the versioning problem as most of the plugins in the version 5 are not compatible with version 4.
Either Update your project from 4 to version 5 using this it might be time-consuming as your projects might have dependencies that are v4 compatible only so I preferred not to do that.
I ended up installing an older version of the plugin using:
npm install ngx-swiper-wrapper#prev --save
Similarly installing an working old version can be installed using the releases part in GitHub or going through the doc as most plugins give references to older versions.
Similarly, for another plugin, I faced the issue which was solved using the same approach.Consider this issue
Update: After a few months I would like to suggest upgrading your project itself. Just create a new blank project after upgrading to the latest angular version(6 as of now) and copy your src there and install each plugin separately by looking at your package.json this will install the latest versions of your plugins(Although there might be functionality change with new versions so don't forget to check them too). I know it feels hard first but I can assure you it won't cost you that much as much finding suitable versions for your old project.

Phonegap file transfer plugin causing the Android build to fail

I'm working on a mobile application for using Phonegap/Cordova, I'm using the file transfer plugin to upload photos from the photo library.
The iOS build was a success, while the Android build is giving me an error.
I'm not sure what's causing the build to fail and how to prevent that failure.
Here's the build log:
http://freetexthost.com/orbg5lm0en
cordova-plugin-file-transfer has a dependency for cordova-plugin-file 5.0.0, which is not compatible with your cordova-android version, it requires cordova-android 6.3.0 or newer. So you have two options:
Update your cordova-android 6.3.0 or newer (I would recommend 6.4.0)
Downgrade cordova-plugin-file-transfer to 1.6.3 as the dependency for cordova-plugin-file will be to an older version of the plugin that should work with your current platform
To update cordova-android you have to remove and re add it (beware that if you made some manual change on the project you will lose it)
cordova platform rm android
cordova platform add android#6.4.0
To downgrade the plugin you also have to remove it first
cordova plugin rm cordova-plugin-file-transfer
cordova plugin add cordova-plugin-file-transfer#1.6.3

How do I recompile an Ionic 1.x app?

I built an Ionic app a couple years ago with Ionix 1.x and JavaScript. It's been running fine for quite a while, but now it needs to be recompiled to allow for use on iOS 11. My build is now completely broken with the ionic#latest updates.
My question is how do I get the correct version of Ionic installed on my dev machine so that this app can compile? Should I be able to use the latest ionic-cli command with an older version of the Ionic dependencies? I'm not ready to port my application to Ionic 2+ and Angular 2+ and TypeScript.
ionic#latest cli is fine for building an ionic1 project but you will find some compatibility issues with older platforms and plugins. Suggest you start by updating the platform:
cordova platform update ios
For some of the latest iOS 11 issues and in particular, iPhone X screen issues, you may want to try:
cordova platform update ios#4.5.0
For any plugins that are causing problems, you will need to remove them individually and re-add them:
cordova plugin rm cordova-plugin-xxxx --save
cordova plugin add cordova-plugin-xxxx --save

sonar-javascript-plugin version for sonar 3.1

I am new to sonar setup. In our project we are using sonar 3.1 version. When I am trying to run the java script report, getting the following error.
“[ERROR] Failed to execute goal
org.codehaus.sonar:sonar-maven-plugin:3.1:sonar (default-cli) on
project AccountBuilder: Execution default-cli of goal
org.codehaus.sonar:sonar-maven-plugin:3.1:sonar failed: You must
intall a Sonar plugin that supports language 'js' in order to analyse
the following project: com.directv:AccountBuilder:JavaScript -> [Help
1]”**
Please let know the exact sonar-javascript-plugin version for sonar 3.1?
I have seen the following URL, but the sonar 3.1 version is not present.
Please guide me.
Javascript Plugin 1.4 is the latest version compatible with SonarQube 3.1. Note that the plugin was much improved then (current version is 2.7) !
What is the release of your JavaScript plugin?
Upgrading SonarQube version would probably solve your problem.

Categories