Plugin android application is false - java

For some unknown reason, when I pulled my project from GitHub, the Android Studio told me this:
"Plugin[id:com.android.application',version'7.3.2',apply:false]was not found in any of the following sources:
And in the build file build.gradle it's only this:
I repeat I just only pull my project from GitHub:
Also, I have this exception:
org.gradle.api.plugins.UnknownPluginException: Plugin [id: 'com.android.application', version: '7.3.2', apply: false] was not found in any of the following sources:
- Gradle Core Plugins (plugin is not in 'org.gradle' namespace)
- Plugin Repositories (could not resolve plugin artifact 'com.android.application:com.android.application.gradle.plugin:7.3.2')
Searched in the following repositories:
Gradle Central Plugin Repository
Google
MavenRepo
I tried to update both android studio versions, but the problem was still there. I tried copying the manifest cause it was incomplete for some reason, and it only created more errors.

Related

Localazy: Localazy Gradle plugin requires Android Gradle plugin 3.5.0 and newer

I am trying to use https://localazy.com/p/locakalazy/integration/android for android language localization.
But while adding this in app module ->
apply plugin: 'com.localazy.gradle'
localazy {
readKey "########"
writeKey "########"
}
I am getting this error ->
Build file 'C:\Users\91863\AndroidStudioProjects\android-localization\app\build.gradle' line: 48
An exception occurred applying plugin request [id: 'com.localazy.gradle']
Failed to apply plugin 'com.localazy.gradle'.
Localazy: Localazy Gradle plugin requires Android Gradle plugin 3.5.0 and newer.
But I do have the newer plugin version
I'm the author of the Localazy Gradle plugin and I will do my best to help you resolve the issue.
It seems that the version cannot be obtained correctly from the Android Gradle plugin and thus Localazy Gradle plugin fails.
Would you be so kind to contact us through the online chat on our website? I would need more information about your situation to simulate and resolve it.
Once we fix it for you (and possibly all other users as well), I will publish the solution here.
EDIT: The detection mechanism was fixed in version 1.5.4.

Unable to download Spring Boot 2.1.7.RELEASE

I'm not familiar with Spring eco and to run gradle to install required modules.
I just cloned this spring boot repo and tried to run it
git#github.com:didinj/springboot-mongodb-security.git
Plugin [id: 'org.springframework.boot', version: '2.1.7.RELEASE'] was not found in any of the following sources:
* Try:
Run with --info or --debug option to get more log output. Run with --scan to get full insights.
* Exception is:
org.gradle.api.plugins.UnknownPluginException: Plugin [id: 'org.springframework.boot', version: '2.1.7.RELEASE'] was not found in any of the following sources:
- Gradle Core Plugins (plugin is not in 'org.gradle' namespace)
- Plugin Repositories (could not resolve plugin artifact 'org.springframework.boot:org.springframework.boot.gradle.plugin:2.1.7.RELEASE')
Searched in the following repositories:
Gradle Central Plugin Repository
at .....
How come? Does this mean the 'org.springframework.boot', version: '2.1.7.RELEASE' is not in this world anymore? If so, the package management system is holly crap.
What should I do? I cloned bunch of git repos from the github and try to run gradle and always have this problem.
Java ecosystem is too broken. Unlike NPM or ruby gem which is so stable and no-brain to use.
Is there related to my gradle setting, java version, or anything else?
Use JDK 8. Change or config MongoDB at https://github.com/didinj/springboot-mongodb-security/blob/master/src/main/resources/application.properties
git clone https://github.com/didinj/springboot-mongodb-security.git
cd springboot-mongodb-security
gradlew bootRun
There is no 2.1.7.RELEASE version of this plugin available at Maven Central Repository (which is used in your build.gradle script), since this version is outdated. But it's still accessible at Gradle Plugin Repository (https://mvnrepository.com/artifact/org.springframework.boot/org.springframework.boot.gradle.plugin/2.1.17.RELEASE).
So you should either use least available plugin version from Central repository (2.2.0.RELEASE) or add Gradle Plugin Repository to the repositories section of your build.gradle
repositories {
mavenCentral()
maven { url "https://plugins.gradle.org/m2/" }
}

Eclipse maven project not recognising any of the dependencies

I am trying to create maven project by importing as existing maven project from eclipse workspace project but eclipse is not able to resolve any of the dependencies. Everytime I create the project, update maven dependencies or clean project the dependencies get downloaded but they are not getting referenced from the local maven repository. The build is generated when i run mvn clean install from command line
I am exhausted trying out all the fixes for the issue like enabling indexing, cleaning the project, maven -> update project
My eclipse version is
Eclipse version - Version: 2019-03 (4.11.0)
Build id: 20190314-1200
Java version - java 11 openjdk
Maven preferences are like below
Also this is my maven setting when I run mvn - X
[DEBUG] Message styles: debug info warning error success failure strong mojo project
[DEBUG] Reading global settings from /usr/share/maven/conf/settings.xml
[DEBUG] Reading user settings from /home/ramesh/.m2/settings.xml
[DEBUG] Reading global toolchains from /usr/share/maven/conf/toolchains.xml
[DEBUG] Reading user toolchains from /home/ramesh/.m2/toolchains.xml
[DEBUG] Using local repository at /home/ramesh/.m2/repository
Can someone help me understand the issue and fix ?
Please check below points to get solution from any.
Check if pom.xml is available in your project which you are
importing.
Better to create your project with spring-initializr
from https://start.spring.io/ and add all required dependencies.
At last, you can try to remove your .m2 directory available at home
dir. and then again start eclipse and import project to re-install
all jars.
You should use Maven -> Update and check forced update after import.
Hope you will find solution from any above point.

Error:(2, 0) Plugin with id 'jetty' not found

Yesterday I upgraded Android Studio to version 3.0, but I'm working with LibGdx and after the upgrade I cannot build my project.
When I'm try to build, it gives me an error:
Error:(2, 0) Plugin with id 'jetty' not found
How should I fix this?
Currently html module using deprecated jetty plugin which is removed in Gradle 4.1 version.
Android Studio 3.0 using Gradle-4.1 and android-gradle-plugin:3.0.0
Gradle 4.1 is not supported yet in LibGDX, there is an issue for the same, which is now upgraded for Gradle 4.6
If you still want to use Android Studio 3.0
Downgrade Gradle to 3.3 from 4.1
Find gradle folder inside your project, Open gradle-wrapper.properties and change distributionUrl for 3.3
distributionUrl=https\://services.gradle.org/distributions/gradle-3.3-all.zip
Downgrade Android-gradle-plugin to 2.3.3 from 3.0.0
Open root build.gradle file and find artifact and change version
classpath 'com.android.tools.build:gradle:2.3.3'
Comment/delete google() from repo list
--------------------------------------------------------------------------------
EDIT : Update LibGDX project to Gradle 4.6 - AS USER
Upgrade Gradle to 4.6 :
distributionUrl=https\://services.gradle.org/distributions/gradle-4.6-all.zip
Find root build.gradle file of your project and add Google's Maven repo in project repositories list as well as in buildScript repo list
repositories {
//..
google()
jcenter() // Required for org.jetbrains.trove4j:trove4j library
}
Update Android Gradle Plugin :
classpath 'com.android.tools.build:gradle:3.1.3'
Known issues with the Android Gradle Plugin
Configuration on demand with Gradle 4.6 and above:
If you're using Android Gradle Plugin 3.0.x or 3.1.x with Gradle 4.6
and above, you should disable configuration on demand to avoid some
unpredictable build errors. (If you are using Android Gradle Plugin
3.2.0 or higher, you do not need to take any action to disable configuration on demand.)
Disable configuration on demand in your gradle.properties file as shown below:
org.gradle.configureondemand=false
To disable configuration on demand in the Android Studio settings, choose File > Settings (Android Studio > Preferences on Mac), select the Compiler category in the left pane, and clear the Configure on demand checkbox.
In Android Studio 3.2 Beta 1 and higher, the options for enabling configuration on demand have been removed.
Update Android buildToolsVersion to 27.0.3 and SdkVersion to 27
Remove instrumentTest.setRoot('tests') from sourceSets inside android build.gradle file
replace all compile with implementation inside root build.gradle file
New GWT Gradle Plugin added in html module, check latest build.gradle of html module.
Run your project with Run Configuration or On Terminal using gradle task.
If you're going to create new project use gdx-setup.jar of latest build.
Suggestion from Jetty Plugin team is to switch to gretty
Please check this
Error while replacing jetty plugin to gretty plugin gradle

How to build the updated Uber Java SDK? Assistance with gradle build required

I have been using maven for project management and have no idea on running gradle. This is the Uber Java sdk which uses Gradle for build purposes.
https://github.com/uber/rides-java-sdk
Until now I had been using the SDK by adding the following artifact to my pom.xml file:
<dependency>
<groupId>com.uber.sdk</groupId>
<artifactId>rides</artifactId>
<version>0.2.0</version>
</dependency>
The last version which was officially released was 0.2.0. Since then, support for getting ride receipts has been added which can be seen in the source code. I need to fetch ride receipts and hence require the latest changes.
It seems the build.gradle file has a line "apply plugin: 'maven'" which should add the project to my local maven repo. However, when I run
gradle install, I get the following error:
Failed to notify task execution listener.
Changelog must be updated with v{0.2.1} before release. Please check /home/user/projects/rides-java-sdk-master/CHANGELOG.md
How do I rectify this error and get the latest build in my local maven repo?
After I changed the CHANGELOG.md file to begin with V0.2.1, I get the following error:
FAILURE: Build failed with an exception.
What went wrong: Execution failed for task ':install'.
Could not publish configuration 'archives'
Cannot publish artifact 'rides-java-sdk-master.zip (com.uber.sdk:rides-java-sdk-master:0.2.1)'
(/home/nikhar/projects/rides-java-sdk-master/build/distributions/rides-java-sdk-master-0.2.1.zip)
as it does not exist.
You shouldn't need to fork the repo, build it, or install the pom locally to get the latest chnages. Just referencing the artifact from maven central (ie https://mvnrepository.com/artifact/com.uber.sdk/rides/0.2.0) should work.

Categories

Resources