How do I solve the problem of Build gradle? - android

I have just installed the filter but I am not able to run it
Every time I try to run it, I run into this problem
I tried to find the answer on the internet but could not find the answer
Some people said make changes to the gradle-wrapper.properties file
But he still did not answer

That project is very old and cannot be opened using newer Android Studio versions because Gradle 4 is obsoleted.
Please use Studio 3.x.
Or try to upgrade to Gradle 7+ by editing "build.gradle", but it could require other changes in gradle files and/or included libraries.

Related

Can't compile Unity Project with ARCore SDK - Problem with Gradle

I am trying to solve this problem for a few days now. Whenever I import ARCore SDK, to Unity, I cannot compile my project.
The error I am facing now is:
Minimum supported Gradle version is 5.6.4. Current Version is 5.1.1. If using the gradle wrapper, try editing the distributionUrl.
I did so, I saw in my eyes a new version is imported but I am keep getting this error.
Here are some other things I tried:
Trying to import the SDK to multiple versions of Unity.
Using a different computer.
Not changing the minimum API Level to 24.
Building the app without scenes.
trying to use different Gradle versions besides 5.6.4. In particular, 6.7, 6.1.1
Creating a system variable under Path: C:\Gradle\gradle-6.7\bin
Removing 5.1.1 folder from the Temp folder of the project, whenever I compile it (Although it keeps appearing of course)
Following the guide found at:
https://developers.google.com/ar/develop/unity/quickstart-android
Ensuring JDK, JVM and all required components are installed.
All to no avail. The project is not compiling.
Any help would be greatly appreciated!
EDIT:
I believe the root of the problem is that I haven't changed the Gradle version somewhere, despite doing so at the wrapper. The reason I stuck at 5.1.1 has something to do with the default Gradle version of my Unity version.
https://docs.unity3d.com/Manual/android-gradle-overview.html
Question is, how to solve it.
I can think about two ways to solve it (but they are pretty similar):
First Option:
Download the gradle version you want, navigate to where Unity's gradle is located in:
C:/{UnityEditorsDirectory}/{UnityVersionDirectory}/Editor/Data/PlaybackEngines/AndroidPlayer/Tools/gradle
Then replace lib folder with your new gradle lib folder.
Second Option:
In case this doesn't work, you can also try to:
Open Unity Editor, go to the menu tab Edit->Preferences->External Tools
Scroll down and find this toggle:
If you uncheck the toggle, the editor will allow you to browse where your gradle is located, paste your new directory and try if it works.
TAKE CARE: Unity's gradle version is the one that Unity's people have tested so...something can explode unexpectedly!

No builders are available to build a model of type 'org.jetbrains.plugins.gradle.model.internal.DummyModel'

After upgrading Android Studio to 4.0 version and in "gradle-wrapper.properties" :
distributionUrl=https://services.gradle.org/distributions/gradle-6.1.1-all.zip
I am getting the following error in Android Studio while syncing:
No builders are available to build a model of type 'org.jetbrains.plugins.gradle.model.internal.DummyModel'.
and unable to create or run the app build.
This can be one solution. I tried Copy and Cut everything in the setting.gradle file located in the project directory then SYNC project after Gradle is complete. Later paste the content back to the file and SYNC again. This not worked for me but for others, it worked.
Another solution is to downgrade the android studio to v 3.6.3 download by clicking here. You can follow these steps to downgrade the android studio. This solution worked for me and now I can build and run the application successfully.
I solved it by navigating to the Project settings in the settings.gradle file and COPY and CUT everything then SYNC the project after gradle is complete PASTE back the content you had copied and SYNC again.
This worked for me
Still not worked
Please use different gradle version.
ie case gradle-wrapper.properties. Instead of your version
distributionUrl=https://services.gradle.org/distributions/gradle-*.*.*-all.zip
update with
distributionUrl=https\://services.gradle.org/distributions/gradle-5.6.4-all.zip
Thanks
I tried all the solutions above but I didn't succeed so I uninstall android studio and then installed it again and saw all the problems solved and I have no problem . so I recommend you reinstall the program as a last step .
REINSTALL

Android Studio keeps resetting Gradle version when trying to install plugin

I'm fairly new to using android studio, and I can't seem to wrap my head around what i'm doing wrong.
I'm currently trying to install the Ping Plugin from Cordova, now everytime I try and install it I get the error message
Minimum supported Gradle version is 4.4. Current version is 4.1. If using the gradle wrapper, try editing the distributionUrl in /Users/sam/Development/Apps/ghost/gradle/wrapper/gradle-wrapper.properties to gradle-4.4-all.zip
So from here I go to File > Project Structure > Project and change the Gradle version to 4.4 and the Android Plugin version to 3.1.1. I then let android studios build and do what it needs to do.
From here I check the gradle-wrapper.properties file and can confirm it says 4.4-all.zip.
I then try and reinstall the plugin, it then throws the same error, so I check my gradle-wrapper.properties file and it resets itself back to 4.1!
Am I doing something stupid?
Again i'm very new to Android Studios, so apologies if i've missed anything.
Incase it helps, some extra details are
OS - macOS High Sierra 10.13.4
Homebrew - Global machine Gradle version 4.7
Android OS - 6.0.1
Cordova - 8.0.0
EDIT
Something else I have noticed, If I go into the .gradle folder in my application, and remove the 4.1 folder and try to install the plugin, it automatically recreates the 4.1 folder and uses it?
Also i've now noticed it has this behaviour every time I run any cordova command, including cordova build android
For anyone else experiencing this behaviour, once I found out that it was any cordova command that was causing the gradle to reset, It was easy to find the answer.
Answer
Basically there is a distributionUrl located inside the GradleBuilder.js file that kept on resetting my gradle back to 4.1. This needed to be changed to 4.4 and the build and plugins worked straight away!
"Moral of this particular story, for me anyway, don't update Android Studio for no good reason" - This should be made the 11th Commandment. I was able to fix this issue by deleting the /platform/android folder and re-installing it making sure not to click on any "highly recommend" upgrade options.
In addition to the answer above and listed in the path below,
Cordova build changes distributionUrl in gradle-wrapper.properties file
I found that on Android Studio 3.1.2, it is necessary to update not just GradleBuilder.js as per all previous advice, but also StudioBuilder.js.
Just to be clear, both files are in the same directory:
$PROJECT_ROOT/platforms/android/cordova/lib/builders/
and the text to be changed in this instance is
'https\://services.gradle.org/distributions/gradle-4.1-all.zip' to
'https\://services.gradle.org/distributions/gradle-4.4-all.zip'
Moral of this particular story, for me anyway, don't update Android Studio for no good reason, as it'll take up 3 hours of your day fixing sh*t. Wait till Cordova has been upgraded to suit before even thinking about it.

Gradle new version and Build version

I have updated SDK and I am using Android studio 2.0(preview). So I think all things are enough updated. For me and for my newly created projects all things work fine. But When Ever I download the code from github I always gets error of gradle versions.
So It is kind of annoying. Well I admire a lot of things are already fixed by gradle while importing that github project . But once the gradle version error occur its some times gets hard to know the exact reason. And honestly I know things about gradle quite enough , but I always get it solved by hit and trial method. So I have many confusions which I am posting below as a questions
How to know what is new gradle version is going on.
How to know which things are now forbidden in the new version of gradle
How to know which support dependencies will work with new gradle version
How to know which version of build tools will perfectly match to gradle.
I think there are many stupid things in these question and I google these questions, but end up with deciding to ask you guys as you guys can clear me formally and casually.
please answer my question if you know this thing deeply.
Android Gradle Build systems are software tools designed to automate
the process of program compilation .
How to know what is new gradle version is going on.
The Android build system uses the Android Plugin for Gradle to support
building Android applications with the Gradle build toolkit. The
plugin runs independent of Android Studio so the plugin and the Gradle
build system can be updated independently of Android Studio.
You can Mouse Hover On classpath for checking latest Version .
How to know which things are now forbidden in the new version of gradle
You should check Android Plugin for Gradle Release Notes
For classpath 'com.android.tools.build:gradle:1.3.1'
Fixed the ZipAlign task to properly consume the output of the
previous task when using a customized filename.
Fixed Renderscript packaging with the NDK.
Maintained support for the createDebugCoverageReport build task.
Fixed support for customized use of the archiveBaseName property in
the build.gradle build> file.
Fixed the Invalid ResourceType lint warning caused by parameter
method annotation lookup when running lint outside of Android
Studio.
Now For your 3rd and 4th questions you should check manual testing .

android studio: nothing working getting different different errors

I'm trying to learn AS, but after struggling for 3 days no progress.
Using https://www.udacity.com for learning.
Trying the hello world app from there, got this error Gradle DSL method not found: 'android()'.
I've worked in eclipse, but migrating from eclipse to AS looks very tough decision for me. I'm using cordova cli so far, now thinking to use AS.
While runing the app am not able to open RUN TOOL it show but is grey color(which is not clickable).
Downloaded new Gradle version (2.10), and set the path to that directory.But still showing Gradle version 2.2.1 in Project Structure.
Checked in stackoverflow as well, but nothing worked. Worst experieence.
Any body have idea what is going on, would be helpfull.
Android Studio 1.2.2
Make sure you have the latest Gradle and Android Studio:
https://www.gradle.org/
http://tools.android.com/tech-docs/new-build-system/version-compatibility
Go for more
Android Studio Gradle DSL method not found: 'android()' -- Error(17,0)
Udacity's Android courses are using the newest dependencies and AS version.
Please remove existing 1.2 version and upgrade it to 1.5.1 to get the fresh experience and less building problems
Be sure that you're using Oracle JDK7 not Java 8 SDK. It may cause some problems with Gradle
I recommend you also try to follow the steps in this post: I just installed Android Studio and created a new project, it always came up with Error with gradle
Have a question? Please free to ask

Categories

Resources