【问题标题】:install_failed_missing_shared_library how can i solve this issue?install_failed_missing_shared_library 我该如何解决这个问题?
【发布时间】:2020-12-28 09:46:24
【问题描述】:

我正在尝试在 Android Studio 上调试我的项目,这是非常简单的 hello world 事情。 我收到了这条消息:

"安装失败。 无法安装应用程序:INSTALL_FAILED_MISSING_SHARED_LIBRARY

apk 列表: [0] 'C:\Users\Pierr\AndroidStudioProjects\Hello\app\build\outputs\apk\debug\app-debug.apk' 安装失败,原因是:'null'" “” 这是我的 AndroidManifest.xml ""`

<application android:label="@string/app_name">
    <uses-library android:name="com.google.android.things"  />

    <activity android:name=".MainActivity">
        <intent-filter>
            <action android:name="android.intent.action.MAIN" />

            <category android:name="android.intent.category.LAUNCHER" />
        </intent-filter>
    </activity>
</application>

` 如果我把 android:required="false" 它会工作,但在我们看到任何东西之前就会崩溃。 我检查了我是否有他们正在寻找的文件 ,我确实有,请帮忙。

【问题讨论】:

    标签: android debugging kotlin web-applications android-manifest


    【解决方案1】:

    尝试将此复制到您的清单中,不要忘记更改 package = "您的应用程序包名称

    ?xml version="1.0" encoding="utf-8"?>
    <manifest xmlns:android="http://schemas.android.com/apk/res/android"
        package="your app package name">
    
    
    
        <application
            android:allowBackup="true"
            android:icon="@mipmap/ic_launcher"
            android:label="@string/app_name"
            android:roundIcon="@mipmap/ic_launcher_round"
            android:supportsRtl="true"
            android:theme="@style/Theme.EternalLove">
    
    
    
        enter code here
            </activity>
            <activity android:name=".MainActivity">
                <intent-filter>
                    <action android:name="android.intent.action.MAIN" />
    
                    <category android:name="android.intent.category.LAUNCHER" />
                </intent-filter>
            </activity>
        </application>
    
    </manifest>
    

    【讨论】:

      【解决方案2】:

      我今天遇到了同样的问题, 我通过在清单中删除这部分来解决它

      <uses-library
              android:name="com.google.android.wearable"
              android:required="true" />
      

      【讨论】:

        【解决方案3】:

        如果您添加空白活动,那么您将面临此错误 解决方案只需从清单中删除以下代码

            <meta-data
                android:name="com.google.android.wearable.standalone"
                android:value="true" />
        
            <uses-library
                android:name="com.google.android.wearable"
                android:required="true" />
        

        【讨论】:

          猜你喜欢
          • 2020-03-25
          • 2020-02-14
          • 2021-10-23
          • 1970-01-01
          • 2021-07-31
          • 2019-12-03
          相关资源
          最近更新 更多