我的构建和应用程序非常简单。当我在虚拟设备中安装该apk时,它已成功安装并按原样运行。但是当我在移动设备中安装相同的APK(签名的apk)时,它会给出错误"Application not installed"
。我已经下载了NDK并在项目结构中给出了它的路径。应用程序在虚拟设备中正常工作,但不能在实际设备中安装。
救命!
提前致谢。
以下是我在虚拟设备上运行应用程序时的控制台输出。
Executing tasks: [:app:generateDebugSources, :app:generateDebugAndroidTestSources, :app:mockableAndroidJar, :app:prepareDebugUnitTestDependencies]
Configuration on demand is an incubating feature.
Incremental java compilation is an incubating feature.
:app:preBuild UP-TO-DATE
:app:preDebugBuild UP-TO-DATE
:app:checkDebugManifest
:app:preReleaseBuild UP-TO-DATE
:app:prepareComAndroidSupportAnimatedVectorDrawable2600Alpha1Library
:app:prepareComAndroidSupportAppcompatV72600Alpha1Library
:app:prepareComAndroidSupportConstraintConstraintLayout102Library
:app:prepareComAndroidSupportSupportCompat2600Alpha1Library
:app:prepareComAndroidSupportSupportCoreUi2600Alpha1Library
:app:prepareComAndroidSupportSupportCoreUtils2600Alpha1Library
:app:prepareComAndroidSupportSupportFragment2600Alpha1Library
:app:prepareComAndroidSupportSupportMediaCompat2600Alpha1Library
:app:prepareComAndroidSupportSupportV42600Alpha1Library
:app:prepareComAndroidSupportSupportVectorDrawable2600Alpha1Library
:app:prepareComGoogleAndroidGmsPlayServicesAds1104Library
:app:prepareComGoogleAndroidGmsPlayServicesAdsLite1104Library
:app:prepareComGoogleAndroidGmsPlayServicesBase1104Library
:app:prepareComGoogleAndroidGmsPlayServicesBasement1104Library
:app:prepareComGoogleAndroidGmsPlayServicesClearcut1104Library
:app:prepareComGoogleAndroidGmsPlayServicesGass1104Library
:app:prepareComGoogleAndroidGmsPlayServicesSafetynet1104Library
:app:prepareComGoogleAndroidGmsPlayServicesTasks1104Library
:app:prepareDebugDependencies
:app:compileDebugAidl UP-TO-DATE
:app:compileDebugRenderscript
:app:generateDebugBuildConfig UP-TO-DATE
:app:generateDebugResValues UP-TO-DATE
:app:generateDebugResources
:app:mergeDebugResources
:app:processDebugManifest
:app:processDebugResources
:app:generateDebugSources
:app:preDebugAndroidTestBuild UP-TO-DATE
:app:prepareComAndroidSupportTestEspressoEspressoCore222Library
:app:prepareComAndroidSupportTestEspressoEspressoIdlingResource222Library
:app:prepareComAndroidSupportTestExposedInstrumentationApiPublish05Library
:app:prepareComAndroidSupportTestRules05Library
:app:prepareComAndroidSupportTestRunner05Library
:app:prepareDebugAndroidTestDependencies
:app:compileDebugAndroidTestAidl UP-TO-DATE
:app:processDebugAndroidTestManifest UP-TO-DATE
:app:compileDebugAndroidTestRenderscript UP-TO-DATE
:app:generateDebugAndroidTestBuildConfig UP-TO-DATE
:app:generateDebugAndroidTestResValues UP-TO-DATE
:app:generateDebugAndroidTestResources UP-TO-DATE
:app:mergeDebugAndroidTestResources UP-TO-DATE
:app:processDebugAndroidTestResources UP-TO-DATE
:app:generateDebugAndroidTestSources UP-TO-DATE
:app:mockableAndroidJar UP-TO-DATE
:app:preDebugUnitTestBuild UP-TO-DATE
:app:prepareDebugUnitTestDependencies
BUILD SUCCESSFUL
Total time: 18.303 secs
答案 0 :(得分:0)
在你的设备和虚拟机上运行相同的apk吗?
Relese在某些方面比调试更严格,
谷歌下一步,找到它是否有效
android {
lintOptions {
abortOnError false
}
}
}
答案 1 :(得分:0)
确保在Android工作室中运行的实例已禁用。
如果激活“即时运行”,则会导致移动某些类。 要禁用即时运行 转到文件 - >设置 - >构建,执行,部署 - >即时运行 - >取消选中"启用即时运行"
它对我有用。 我希望它能帮到你解决问题。
很高兴为您提供帮助!