2013-04-26 77 views
1

我在我的Android应用中使用Google Play服务进行身份验证。该项目运行良好,直到Google Play服务的更新。我做了更新后,该项目没有运行。我收到以下错误控制台,未找到com.google.android.gms.auth共享库

[2013-04-29 13:05:08 - Opine] Android Launch! 
[2013-04-29 13:05:08 - Opine] adb is running normally. 
[2013-04-29 13:05:08 - Opine] Performing package-name.MainActivity activity launch 
[2013-04-29 13:05:08 - Opine] Automatic Target Mode: using device 'my-dev' 
[2013-04-29 13:05:08 - Opine] Uploading my-app.apk onto device 'my-dev' 
[2013-04-29 13:05:08 - Opine] Installing my-app.apk... 
[2013-04-29 13:05:21 - Opine] Installation error: INSTALL_FAILED_MISSING_SHARED_LIBRARY 
[2013-04-29 13:05:21 - Opine] Please check logcat output for more details. 
[2013-04-29 13:05:21 - Opine] Launch canceled! 

和我得到的

04-29 13:05:56.054: E/PackageManager(330): Package package-name requires unavailable shared library com.google.android.gms.auth; failing! 

以下错误我Google了错误,但未能找到任何帮助。其他人正在为地图API获取相同的错误。它被描述为here。我甚至尝试阅读Google Play Services Manual,但它再次没有奏效。 因此,我发现尝试在构建路径中包括JAR文件。仍然没有帮助。

我想在Galaxy Y,android 2.6(unrooted)和Nexus S,android 4.2(rooted)上运行。我确实有Google play服务,所以这不是错误。

现在我放弃了,从头开始一切,即格式化我的笔记本电脑,安装完全不同的操作系统,并手动复制粘贴每一个文件。但它仍然没有帮助...

请人试图帮助我... Pleaseeeeee ....

回答

1

刚刚从你的AndroidManifest.xml中删除应用库标签....

0

它会导致becuse你的项目的设置。因此请按照android developer site中给出的步骤操作。

按devloper网站:

To install the Google Play services SDK for development: 

1.Launch the SDK Manager. ◦From Eclipse (with ADT), select Window > Android SDK Manager. 
◦On Windows, double-click the SDK Manager.exe file at the root of the Android SDK directory. 
◦On Mac or Linux, open a terminal and navigate to the tools/ directory in the Android SDK, then execute android sdk. 

2. Scroll to the bottom of the package list, select Extras > Google Play services, and install it. 
The Google Play services SDK is saved in your Android SDK environment at <android-sdk-folder>/extras/google/google_play_services/. 

3.Copy the <android-sdk-folder>/extras/google/google_play_services/libproject/google-play-services_lib library project into the source tree where you maintain your Android app projects. 
If you are using Eclipse, import the library project into your workspace. Click File > Import, select Android > Existing Android Code into Workspace, and browse to the copy of the library project to import it. 


To set up a project to use the Google Play services SDK: 
1.Reference the library project in your Android project. 
See the Referencing a Library Project for Eclipse or Referencing a Library Project on the Command Line for more information on how to do this. 

Note: You should be referencing a copy of the library that you copied to your source tree—you should not reference the library from the Android SDK directory. 

2.If you are using ProGuard, add the following lines in the <project_directory>/proguard-project.txt file to prevent ProGuard from stripping away required classes: -keep class * extends java.util.ListResourceBundle { protected Object[][] getContents();} 

希望它有助于

+0

试了一下太多,但它并没有帮助... :(当我尝试导入它显示了跨库.. 。等我宁愿编辑我的问题,请尽量帮助我,如果可能 – 2013-04-27 04:27:37

0

而是直接从SDK路径添加一个参考库,进口依照该SDK项目到项目工作区。

项目资源管理器>导入> Android>现有的Android代码进入工作区。

在根目录中输入Google Play Services Lib的路径。我假设那是你想要的。 对于此库,您的路径将包含:/ sdk/extras/google

Projects部分将包含此路径中所有项目的列表,请检查google-play-services_lib并点击Finish。

现在右键单击您的Android项目,选择属性。在Android下,首先删除您当前的参考,即现在在旁边为您提供交叉的参考。

然后选择添加。你应该得到Project Selection窗口中提到的新引用的库。点击确定并应用。

只要这么多没有工作,清理项目一次。

+0

这就是我包括lib函数的方式...没有帮助... :( – 2013-04-27 11:27:18