安装时出现Android错误:[INSTALL_FAILED_MISSING_SHARED_LIBRARY]

时间:2013-04-25 21:39:33

标签: android maven android-fragments actionbarsherlock emulation

所以这一直困扰着我一段时间。当我把它放在一个实际的Android设备上时它曾经工作正常,并且当我试图在模拟器上安装我的应用程序时只显示错误但现在它出现在模拟器和实际设备上。错误是:

pkg: /data/local/tmp/com.parse.starter
Failure [INSTALL_FAILED_MISSING_SHARED_LIBRARY]

logcat显示了很多内容,但大部分内容都是这样的(上传整个logcat超出了我的字数限制):

  

04-25 21:23:25.420:ERROR / StrictMode(1703):null           android.app.ServiceConnectionLeaked:服务com.android.exchange.ExchangeService已泄露ServiceConnection   com.android.emailcommon.service.ServiceProxy$ProxyConnection@40cfecc0   最初绑在这里           在android.app.LoadedApk $ ServiceDispatcher。(LoadedApk.java:969)           在android.app.LoadedApk.getServiceDispatcher(LoadedApk.java:863)           在android.app.ContextImpl.bindService(ContextImpl.java:1418)           在android.app.ContextImpl.bindService(ContextImpl.java:1407)           在android.content.ContextWrapper.bindService(ContextWrapper.java:473)           在com.android.emailcommon.service.ServiceProxy.setTask(ServiceProxy.java:157)           在com.android.emailcommon.service.ServiceProxy.setTask(ServiceProxy.java:145)           在com.android.emailcommon.service.ServiceProxy.test(ServiceProxy.java:191)           在com.android.exchange.ExchangeService $ 7.run(ExchangeService.java:1850)           在com.android.emailcommon.utility.Utility $ 2.doInBackground(Utility.java:551)           在com.android.emailcommon.utility.Utility $ 2.doInBackground(Utility.java:549)           在android.os.AsyncTask $ 2.call(AsyncTask.java:287)           在java.util.concurrent.FutureTask.run(FutureTask.java:234)           at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1080)           at java.util.concurrent.ThreadPoolExecutor $ Worker.run(ThreadPoolExecutor.java:573)           at java.lang.Thread.run(Thread.java:856)04-25 21:23:25.447:ERROR / ActivityThread(1703):服务   com.android.exchange.ExchangeService已泄露ServiceConnection   com.android.emailcommon.service.ServiceProxy$ProxyConnection@40cff068   最初绑在这里           android.app.ServiceConnectionLeaked:服务com.android.exchange.ExchangeService已泄露ServiceConnection   com.android.emailcommon.service.ServiceProxy$ProxyConnection@40cff068   最初绑在这里           在android.app.LoadedApk $ ServiceDispatcher。(LoadedApk.java:969)           在android.app.LoadedApk.getServiceDispatcher(LoadedApk.java:863)           在android.app.ContextImpl.bindService(ContextImpl.java:1418)           在android.app.ContextImpl.bindService(ContextImpl.java:1407)           在android.content.ContextWrapper.bindService(ContextWrapper.java:473)           在com.android.emailcommon.service.ServiceProxy.setTask(ServiceProxy.java:157)           在com.android.emailcommon.service.ServiceProxy.setTask(ServiceProxy.java:145)           在com.android.emailcommon.service.AccountServiceProxy.getDeviceId(AccountServiceProxy.java:116)           在com.android.exchange.ExchangeService.getDeviceId(ExchangeService.java:1249)           在com.android.exchange.ExchangeService $ 7.run(ExchangeService.java:1856)           在com.android.emailcommon.utility.Utility $ 2.doInBackground(Utility.java:551)           在com.android.emailcommon.utility.Utility $ 2.doInBackground(Utility.java:549)           在android.os.AsyncTask $ 2.call(AsyncTask.java:287)           在java.util.concurrent.FutureTask.run(FutureTask.java:234)           at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1080)           at java.util.concurrent.ThreadPoolExecutor $ Worker.run(ThreadPoolExecutor.java:573)           在java.lang.Thread.run(Thread.java:856)

最后,这是我的清单,有什么不对吗?我知道它通常与某些事情有关,但我想我已经在那里了

<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
    package="com.parse.starter"
    android:versionCode="1"
    android:versionName="1.0" >

    <uses-sdk android:minSdkVersion="4" android:targetSdkVersion="16"/>
    <permission
            android:name="com.parse.starter.permission.MAPS_RECEIVE"
            android:protectionLevel="signature"/>
    <uses-permission android:name="com.parse.starter.permission.MAPS_RECEIVE"/>
    <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>
    <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
    <uses-permission android:name="android.permission.INTERNET" />
    <uses-permission android:name="android.permission.VIBRATE" />
    <uses-permission android:name="com.google.android.providers.gsf.permission.READ_GSERVICES"/>
    <!-- The following two permissions are not required to use
         Google Maps Android API v2, but are recommended. -->
    <uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION"/>
    <uses-permission android:name="android.permission.ACCESS_FINE_LOCATION"/>
    <uses-permission android:name="android.permission.WAKE_LOCK"/>

    <application
        android:name="ParseApplication"
        android:icon="@drawable/ic_launcher"
        android:label="@string/app_name" >
        <activity
            android:name=".ParseStarterProjectActivity"

            android:label="@string/app_name" >
            <intent-filter>
                <action android:name="android.intent.action.MAIN" />

                <category android:name="android.intent.category.LAUNCHER" />
            </intent-filter>
        </activity>
        <activity android:name=".Register"/>
        <activity android:name=".Login"/>
        <activity android:name=".MedicationInfo"/>
        <activity android:name=".Disclaimer"/>
        <activity android:name=".MainFragmentHolder"/>
        <activity android:name=".twitterShare"/>
        <receiver android:name=".AlarmManagerBroadcastReciever">
        </receiver>
        <service android:name=".Notifications" >
        </service>

        <uses-library android:name="com.google.android.maps"/>
        <uses-library android:name="com.actionbarsherlock" />
        <meta-data
                android:name="com.google.android.maps.v2.API_KEY"
                android:value="MY API KEY"/>
    </application>
    <uses-feature android:glEsVersion="0x00020000" android:required="true"/>

</manifest>

1 个答案:

答案 0 :(得分:1)

摆脱:

<uses-library android:name="com.actionbarsherlock" />

因为<uses-library>仅适用于固件库。

此外,您似乎正在使用Maps V1和Maps V2,这可能但不太可能。如果您尝试使用Maps V2,请删除:

 <uses-library android:name="com.google.android.maps"/>

因为那是地图V1。