Вопрос

Everything is ok but when i try to run it gets one error

Gradle: : java.lang.NullPointerException

Please help me, because i wanna to throw all this stuff with my NTB down from the cliff, after about five hours of configuring git, android studio and copying my projects from Eclipse, still got this

Это было полезно?

Решение 2

You need to make sure Gradle is installed and properly configured in the preferences.

Другие советы

I had the same problem. I solved it by going into 'Project Structure' and one of my modules had both 'Android' and 'Android - Gradle'. I deleted the 'Android - Gradle' and rebuilt the project and the error disappeared.

Edit: I had bigger problems than this and ended up creating a new project...

I had the same problem. It was because the path to android studio contained a whitespace. Installing android studio to the recomended location solved my problem.

As easycheese underlined the problem is related to the presence of the android-gradle item below one or more modules in your project. Go to the "project structure" (from the File menu) and check which module has two sub-items, one of them must be the android-gradle, delete it and rebuild your project. It should fix the issue......as J.Romero says...Android Studio is far from being ready for professional use, but what it is really annoying is that Google, with all its resources, gives developers such "immature tools" that make rather waste time than anything else....shame

I wont re-write my whole answer, but check out the following page in which i replied to a Gradle common error with over 10 common solutions across the web including mine.

Long story short, for me it turned out to be system resources were getting low (Google Chrome was the greedy one)

If it works after a fresh reboot, but after a few minutes or hours it starts.. This would indicate this.

Gradle Error In Android Studio

Лицензировано под: CC-BY-SA с атрибуция
Не связан с StackOverflow
scroll top