2013-04-26 151 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