使用来自 Cloud Endpoint 的客户端库.jar 导入不起作用 [英] Using client library from Cloud Endpoints. jar import not working
问题描述
我为我的 appengine (python) 应用程序创建了一个 jar 文件.我已按照以下步骤从 这个例子.在我尝试使用库中的类之前,Android Studio 似乎正确导入了所有内容(没有错误).我开始打开 jar 文件中包含的类,看看是否一切正常.这是我发现的:
I'm created a jar file for my appengine (python) application. I've followed the steps to import my library (.jar) files from this example. It seems Android Studio imported everything correctly (no error) until I try to use the classes in the library. I started to open up the classes that are contained in the jar files to see if everything looked to be in order. This is what I found:
UserMessage 不包含任何错误.
UserMessage does not contain any errors.
谁能帮助解释为什么这些类不能互相看到/使用?这是 jar 还是 Android studio 的问题?
Can anyone help explain why the classes can't see/use each other? Is this an issue with the jar or Android studio?
推荐答案
我在使用 Android Studio 和 Eclipse 时遇到了同样的问题.我的解决方案可能不是最好和最简单的,但它有效.
I had the same problem with Android Studio and Eclipse. My solution is probably not the best and the easiest, but it works.
我所做的是从 .jar 文件中提取代码并将其放入 src 中.
What I did is I extracted the code from the .jar file and placed it inside src.
现在我有类似以下结构的东西:
Now I have something similar to the following structure:
这篇关于使用来自 Cloud Endpoint 的客户端库.jar 导入不起作用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!