IntelliJ失败[INSTALL_FAILED_MISSING_SHARED_LIBRARY]

时间:2012-03-20 18:50:06

标签: android graph intellij-idea android-manifest shared-libraries

我正在使用AndroidPlot源代码和修改后的数据注入器构建的IntelliJ IDEA 11.0.2项目。构建目标是Android 3.1 API Level 12 on rooted& ClockworkMod(ed)Galaxy Tab 10.1 P7510 16gb WiFi。 Logcat(调试级别)过滤此错误:

  

03-19 23:05:54.199:ERROR / PackageManager(290):包Dynamic.XY   需要不可用的共享库libs.com.androidplot.xy.XYPlot;   失败!

我通过Windows资源管理器侧载了androidplot-0.4.4-release .jar,并通过IntelliJ的右键单击对话框添加为库。我在模块设置中找到的库的两个实例的范围都是'提供'

我的AndroidManifest:

**<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
          android:enabled="true"
          android:debuggable="true"
          android:process="Dynamic.XY"
          android:installLocation="auto"
          android:hardwareAccelerated="true"
          package="Dynamic.XY">
    <uses-sdk android:targetSdkVersion="12"/>
    <uses-feature android:name="android.hardware.bluetooth" android:required="true"/>
    <permission android:name="android.permission.BLUETOOTH"/>    <android:protectionLevel="normal"/>
<uses-permission android:name="android.permission.READ_LOGS"/>
<application android:icon="@drawable/icon" android:label="DynamicXYPlotExample" android:debuggable="true">
    <activity android:alwaysRetainTaskState="true"
              android:clearTaskOnLaunch="true"
              android:enabled="true"
              android:excludeFromRecents="false"
              android:exported="false"
              android:launchMode="standard"
              android:name="MyActivity"
              android:stateNotNeeded="false"
              android:allowTaskReparenting="true">
        <intent-filter>
            <action android:name="android.intent.action.MAIN"/>
            <category android:name="android.intent.category.LAUNCHER"/>
        </intent-filter>
    </activity>
    <uses-library android:name="libs.com.androidplot.xy.XYPlot" android:required="true"/>
    <uses-library android:name="libs.com.androidplot.xy.XYSeries" android:required="true"/>
    <uses-library android:name="libs.com.androidplot.xy.XYStepMode" android:required="true"/>
    <uses-library android:name="libs.com.androidplot.xy.LineAndPointFormatter" android:required="true"/>
    <uses-library android:name="libs.com.androidplot.Plot" android:required="true"/>
    <uses-library android:name="libs.com.androidplot.xy.BoundaryMode" android:required="true"/>
    <uses-library android:name="android.app.Activity" android:required="true"/>
    <uses-library android:name="android.graphics.Color" android:required="true"/>
    <uses-library android:name="android.os.Bundle" android:required="true"/>
    <uses-library android:name="android.bluetooth.BluetoothAdapter" android:required="true"/>
    <uses-library android:name="android.bluetooth.BluetoothDevice" android:required="true"/>
    <uses-library android:name="android.bluetooth.BluetoothSocket" android:required="true"/>
    <uses-library android:name="android.util.Log" android:required="true"/>
    <uses-library android:name="java.io.IOException" android:required="true"/>
    <uses-library android:name="java.io.InputStream" android:required="true"/>
    <uses-library android:name="java.lang.reflect.InvocationTargetException"    android:required="true"/>
    <uses-library android:name="java.lang.reflect.Method" android:required="true"/>
    <uses-library android:name="java.util.Observable" android:required="true"/>
    <uses-library android:name="java.util.Observer" android:required="true"/>
    <uses-library android:name="java.text.DecimalFormat" android:required="true"/>
    </application>
</manifest>**

1 个答案:

答案 0 :(得分:1)

省略清单上的uses-library行。

uses-library用于访问设备中的共享库。没有必要这样做,因为你在编译期间提供了库jar。