INSTALL_FAILED_MISSING_SHARED_LIBRARY Error When Trying To Run Android App
Asked Answered
M

3

5

I've never made an Android app before and I'm this isn't a great start. I made a blank project on Android studios as a test and tried to run the program on my Huawei P33 phone. When I attempt to build and install the program, I get the following messages;

Failed to commit install session 389180709 with command cmd package install-commit 389180709. Error: INSTALL_FAILED_MISSING_SHARED_LIBRARY: Package couldn't be installed in /data/app/com.example.myapplication-segdjrVZj4KvtCNaJ5W5oQ==: Package com.example.myapplication requires unavailable shared library com.google.android.things; failing!

Session 'app': Installation did not succeed. The application could not be installed: INSTALL_FAILED_MISSING_SHARED_LIBRARY Retry

I've spent about an hour and a half googling, but no one has seemed to have the same issue with the Android Things library.

In 'AndroidManifest.xml', if I change <uses-library android:name="com.google.android.things" /> to <uses-library android:name="com.google.android" />, the app installs but does nothing and crashes as soon as it is opened.

Mahau answered 30/10, 2019 at 1:25 Comment(2)
#58148817Jacelynjacenta
I too found problem with Huawei p40 liteBeing
D
14

Please go to your manifest file and see if these lines of code are there. If present please delete them.

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

    <!--
           Set to true if your app is Standalone, that is, it does not require the handheld
           app to run.
    -->
    <meta-data
        android:name="com.google.android.wearable.standalone"
        android:value="true" />
Dieterich answered 23/7, 2020 at 16:24 Comment(1)
Android-studio added these wearable lines after I tried adding a blank Activity from the right-click menu --- and messed up the activity's XML. When I selected Empty Activity from the gallery, it worked, but left these lines in the manifest.Tarsus
A
2

Given that you've never made an Android app before, it's likely that you picked an Android Things template on the new project Wizard. Just create a new project and make sure to select just phone and tablet, not Android Things.

Adlee answered 30/10, 2019 at 21:38 Comment(0)
B
0

I think you deleted an element that is still in the manifest.

for example u deleted activity, and element is still in the manifest.

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

            <category android:name="android.intent.category.LAUNCHER" />
        </intent-filter>
    </activity>
Brackely answered 19/1, 2021 at 7:46 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.