尝试运行 Android 应用程序时出现 INSTALL_FAILED_MISSING_SHARED_LIBRARY 错误 [英] INSTALL_FAILED_MISSING_SHARED_LIBRARY Error When Trying To Run Android App
问题描述
我之前从未开发过 Android 应用,我认为这不是一个好的开始.我在 Android 工作室做了一个空白项目作为测试,并尝试在我的华为 P33 手机上运行该程序.当我尝试构建和安装程序时,我收到以下消息;
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;
无法使用命令 cmd 包提交安装会话 389180709安装提交 389180709.错误:INSTALL_FAILED_MISSING_SHARED_LIBRARY:无法安装包在/data/app/com.example.myapplication-segdjrVZj4KvtCNaJ5W5oQ==中:包 com.example.myapplication 需要不可用的共享库com.google.android.things;失败!
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!
会话应用程序":安装未成功.无法安装应用程序:INSTALL_FAILED_MISSING_SHARED_LIBRARY重试
Session 'app': Installation did not succeed. The application could not be installed: INSTALL_FAILED_MISSING_SHARED_LIBRARY Retry
我花了大约一个半小时的谷歌搜索,但似乎没有人遇到过与 Android Things 库相同的问题.
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.
在AndroidManifest.xml"中,如果我将 <uses-library android:name="com.google.android.things"/>
更改为 <uses-libraryandroid:name="com.google.android"/>
,应用安装但什么也不做,一打开就崩溃.
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.
推荐答案
请转到您的清单文件,看看是否有这些代码行.如果存在,请删除它们.
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" />
这篇关于尝试运行 Android 应用程序时出现 INSTALL_FAILED_MISSING_SHARED_LIBRARY 错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!