amenijemai / google-gson

Automatically exported from code.google.com/p/google-gson
0 stars 0 forks source link

Gson 2.2.4 not recognized in Android Studio Editor (inline compile) #571

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?

1. Create new Android Studio project
2. add the 'com.google.code.gson:gson:2.2.3' dependency and sync project
3. write some code that invokes the Gson library
4. replace the gson 2.2.3 dependency with 'com.google.code.gson:gson:2.2.3' (or 
'com.google.code.gson:gson:2.2.+') and sync project

What is the expected output? What do you see instead?

- project should compile and show no errors after step 2 and after step 4
- instead, after step 2 everything is OK, but after step 4 the project still 
compiles and I'm able to deploy to device, but the Android Studio Editor shows 
compile errors that the symbol gson cannot be found (see attachment) and there 
is no META-INF or classes shown under the External Libraries in the Project 
window on the left side

What version of the product are you using? On what operating system?

- Gson 2.4.4
- Windows 8.1 N x64
- Java 1.7
- Android Studio 0.5.3
- Android Api 19

Original issue reported on code.google.com by sbi...@gmail.com on 3 Apr 2014 at 11:09

Attachments:

GoogleCodeExporter commented 9 years ago
Sorry, in the above steps to reproduce, step 4, should be of course:
4. replace the gson 2.2.3 dependency with 'com.google.code.gson:gson:2.2.4' (or 
'com.google.code.gson:gson:2.2.+') and sync project

Original comment by sbi...@gmail.com on 3 Apr 2014 at 11:11

GoogleCodeExporter commented 9 years ago
I suspect that the dependency is being added in the wrong place. Can you show 
us the build.gradle file in the root of the project and also the build.gradle 
inside the app/ directory?

I'm closing the issue because I can assure you the dependency is available. You 
can see it here: 
http://search.maven.org/#search%7Cga%7C1%7Cg%3Acom.google.code.gson%20a%3Agson

Original comment by j...@squareup.com on 9 Aug 2014 at 5:42

GoogleCodeExporter commented 9 years ago
This happened to me after i updated the android studio to 1.0.1 but the reason 
was that i had accidentally checked the offline in in gradle setting and then 
was trying to sync. :( 

Original comment by uxyrat...@gmail.com on 16 Dec 2014 at 5:01