-
Notifications
You must be signed in to change notification settings - Fork 6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Cannot cast object ':app' with class 'java.lang.String' to class 'org.gradle.api.Project' #5
Comments
Do you have a stack-trace perhaps? |
Yeah. Here it is:
|
I'll take a look at it today - didn't have any time yesterday, sorry! Btw - as a temporary fix, if your android project has the path |
At a closer look, it seems like the gradle decorated extension is interfering and not passing the public |
Indeed, removing
fixes a problem with gradle sync. But then when I try to run a test, I get
|
What is the exact path of your Android project and your test project? |
Strange, I'll look into it, meanwhile, try: robospock {
android = project( ':app' )
} |
I've did like this before. It makes gradle sync work too. But when I try to run test it says:
|
Try adding this to the root
|
I have exactly the same problem with project you suggested:
|
Also, none of your suggestions helped. |
Maybe it will be helpful to note that I use Android Studio 0.9.1 |
What happens if you run gradle via command line? |
What about: |
Looks like you're right...
|
So now the question is how can I run it under Android Studio (or have some output from Spock). Maybe you can suggest something? |
Ah, well, that's good at least... Spock/Gradle however generates its results in: If possible, I'll try to fix the part about not being able to set a string on robospock {
android = project( ':app' )
} instead. I've created a stackoverflow question about it... http://stackoverflow.com/questions/26730867/gradle-overload-extension-setter |
Wow! That's what I looked for! Thanks! I think, you can close this issue, 'cause it seems like it's not really related to the plugin itself. |
Glad it worked =) As a convenience, I recommend applying the plugin to the android project and putting the testing files in Btw, I only deserve part of the credit... I didn't create RoboSpock, I only made this gradle plugin ^^ |
Yeah, I know. But the original plugin didn't worked for me, giving
I'll try to put tests inside app/src/test and let you know what I'll get soon. |
Putting tests into
|
In gradle command line? That happened to me in Intellij too while developing the plugin... Their plugin seems to be quite crappy to be honest. |
No, in command line |
I think, I gonna try to report this issue with |
Perhaps you can provide a link to this issue? It might have to do with |
Luke Daley from Gradleware informed me that the first part about So I have no choice but to remove the |
I submitted the cannot increment error as a bug against android studio: https://code.google.com/p/android/issues/detail?id=79009&thanks=79009&ts=1415554661. |
Hi! I'm getting
Error:(13, 0) Cannot cast object ':app' with class 'java.lang.String' to class 'org.gradle.api.Project'
Here's build.gradle for tester project:
build.gradle for main project:
Also, I'm using constants from gradle.properties. Here they are:
The text was updated successfully, but these errors were encountered: