-
Notifications
You must be signed in to change notification settings - Fork 451
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 extract android-sdk-preview.jar #36
Comments
Although jar files are zips, they should not be extracted. Just add this jar as a external library. |
Thanks for your very fast reply! I tried to do just that, adding it as a file dependency, but I get this error when building: Just to make sure I wasn't doing anything wrong (haven't programmed Android in a while and Android Studio changes very fast) I tried adding gson-2.2.4.jar. That works just fine. It builds and I can view the content of gson-2.2.4.jar (little triangle appears, I can access it as a folder). Maybe this is an issue with Android Studio? I can try installing Eclipse. Thanks again for your fast reply! |
Which version of Android Studio you are using? On Fri, Mar 28, 2014 at 10:02 AM, jurschreuder notifications@github.comwrote:
|
I use Android Studio 0.5.1 I copied the jar in the libs folder. right-click on project -> Open Module Settings -> Dependencies -> + -> File Dependency -> estimote-sdk-preview.jar and in build.gradle my dependencies look like this: dependencies { I used to only manually add the bottom line, but now it seems like this line is already there in 0.5.1 and Android Studio also automatically ads the "compile files('libs/estimote-sdk-previes.jar')" line, although I would think it would also work with just the bottom line. Also, when I right-click on the jar and select "add as library", it displays the following menu, which it didn't display with gson: |
If I read it correctly: "compile fileTree(dir: 'libs', include: ['*.jar'])" - means that to include all jars in a directory so you don't need those two: |
Yeah I think so to. Is this .jar confirmed to work with Android Studio? Then at least I will know that it's not a problem with the .jar file. Or maybe that I can just fix it by using Eclipse. |
He wiktor! Just in case this was an Android Studio problem (I wouldn't be surprised), I just installed good-old Eclipse. In Eclipse I get the same error: Archive for required library: '<my_path>/libs/estimote-sdk-preview.jar' in project '' cannot be read or is not a valid ZIP file. So I guess it is really a problem with the estimote-sdk-preview.jar file. |
Strange it works for me.
|
Yeah there was I typo sorry my bad. But I deleted all lines except the include ['*.jar'] one, when you suggested the thing about the duplicates, and still the same error. About the plus sign, I did just that. Add a file dependency. It's strange that I get the same error in Eclipse. Can you maybe email me a version of the estimote-sdk-preview.jar file that you have in a working project? That would help me out a lot! I am on a Big Mac right now, because I am also developing the exact same thing for iOS at the same time. I am going to boot up some other operating systems and see what they think of the .jar file... |
contact me at wiktor at estimote dot com On Fri, Mar 28, 2014 at 11:30 AM, jurschreuder notifications@github.comwrote:
|
I downloaded the file the wrong way (by right clicking the estimote-sdk-preview.jar link and select download). This actually saved an HTML page with the filename estimote-sdk-preview.jar, so this was actually just a .html file with a .jar extension. Stupid mistake. |
@jurschreuder thank you!!! I was doing the same haha |
I tried to use the .jar file in Android Studio, but it seems it cannot extract the zip.
Is android-sdk-preview.jar ready to use?
Am I doing something wrong?
I don't know, hope you can help me :)
Cheers Jurriaan
The text was updated successfully, but these errors were encountered: