5

Is there a way to reset the default gradle and plugin, without resetting all my settings, so I don't keep having these errors when creating new projects?

Error: Plugin is too old, please update to a more recent version, or set ANDROID_DAILY_OVERRIDE environment variable to

enter image description here

enter image description here

So in the top level build.gradle I update to:

dependencies {
    classpath 'com.android.tools.build:gradle:2.0.0-alpha6'

}

enter image description here

enter image description here

And then change the gradle to 2.10 as per requirements here.

2.0.0-alpha5 (2016/1/14) // hence alpha6 Needs gradle 2.10 to work

enter image description here

  • what's version of Android Studio do yoy use? – piotrek1543 Jan 25 '16 at 07:39
  • find `.android` and `idea` folders (on linux are hidden in home directory, just Ctrl+h to unhide) and delete them,. Then open Android Studio - I've already done it and it would dwelete of all exisitng settings – piotrek1543 Jan 25 '16 at 08:18
  • no you should have one config `.idea` in your home ditrctory. 5GB? Hmm check what is inside, it seems to be that you have already installed some emulators. Don't be scared - it would reset your IDE, alike you have had already installed so you would see welcome views like asking which them do you prefer – piotrek1543 Jan 25 '16 at 08:45
  • check out http://stackoverflow.com/questions/19384033/how-to-reset-android-studio – Anuj TBE Jan 31 '16 at 08:15
  • @MsYvette have you try to remove old files from `.gradle` folder? I'd delete all rubbish from there first. From `wrapper` folder, `caches` and, probably, also `daemon`? (For me - MacOS - it's a hidden folder \users\\.gradle . I suspect, in Windows it should be in similar location). Let me know, if it helps – Konstantin Loginov Jan 31 '16 at 13:48
  • Oops. Was it because of deleting these files??? I'm terrible sorry :-) – Konstantin Loginov Jan 31 '16 at 15:04
  • but when i did this my new created project was with this setting only – JAAD Feb 02 '16 at 05:57
  • wait a sec let me check what i did exactly – JAAD Feb 02 '16 at 06:10
  • i changed this into settings and never that issue again , dont know if it work for me by chance or not for you – JAAD Feb 02 '16 at 07:17
  • first i changed in project structure and then changed setting to default gradle wrapper then this issue disappear and never came again – JAAD Feb 02 '16 at 07:20
  • Let us [continue this discussion in chat](http://chat.stackoverflow.com/rooms/102336/discussion-between-ankitagrawal-and-ms-yvette). – JAAD Feb 02 '16 at 09:29

2 Answers2

2

I think you need to follow below step to use Default gradle wrapper(recommended):

Android studio -> Settings -> build tools -> gradle -> Project-level settings -> select Use default gradle wrapper(recommended).

And sync gradle and rebuild your project.

See Below image to get more idea:

enter image description here

It's work for me. I hope its helps you.

pRaNaY
  • 24,642
  • 24
  • 96
  • 146
2

Android Studio Template Files located on below path:

{android_studio_installation_path}\plugins\android\lib\templates\

Now for editing every type of Android Studio Template Project you must edit respective file

For Example: (edit android studio new project template)
we must edit below files:

{above_path}\gradle-projects\NewAndroidModule\root\build.gradle.ftl

In this file you must add dependencies that you want to add in every project that you create it, inside the block of dependencies

dependencies {}

Hope my description has been helpful