I'm trying to make an app with Gradle in Android Studio, but all I get is this error message:
java.lang.IllegalArgumentException: Argument 0 for @NotNull parameter of com/android/tools/idea/jps/builder/AndroidGradleBuilder.createBuildTask must not be null: Argument 0 for @NotNull parameter of com/android/tools/idea/jps/builder/AndroidGradleBuilder.createBuildTask must not be null
I've tried debugging this and I actually can't figure out what the problem is.
Anyone with any ideas?
If you are using Linux, remember that uninstalling an application does not remove the previous configuration files used by Android Studio and X-Window.
So before launching your updated AS, remove the following files:
~/.AndroidStudio*
~/.java/.userPrefs
I've had and read some discussion on Google+ about this and I figured I still do a few things wrong since my project still does not compile with Gradle.
BUT, I've fixed this issue and from my understanding is that if you use Gradle you should not have to go into Module Dependencies, because it should be setup from the Gradle files.
So the first advice I can give you is to quit Android Studio and delete the .idea folder and all the .iml files in the project folder.
After this, open Android Studio and import the project, and remember to point to the build.gradle in the root directory (basically you have a build.gradle file for the project folder and then one build.gradle file for every module), basically mimic the structure that a new project has.
This will almost certainly fix this problem and also start the project from Gradle.
But you might encounter other errors along the way which could be a hazzle to debug.
But at the moment Android Studio gives really non-infomative error messages sometimes.
I had this error, and it appeared to be because android and android-gradle facets were somehow added to the parent module the project.
Removing these facets in Project Properties> Modules fixed the problem.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With