简体   繁体   English

未在已签名的APK上安装应用或未拒绝访问

[英]App isn't Installed or Access Denied on Signed apk

I know this is common question that many people ask here, but after seeing almost every related post I still don't understand. 我知道这是很多人在这里提出的常见问题,但是在看到几乎所有相关文章后,我仍然不明白。

I have a simple project that can run on a real device (the unsigned one; I copy-paste it from bin folder in my workspace). 我有一个可以在真实设备上运行的简单项目(未签名的项目;我将其从工作区中的bin文件夹中复制粘贴)。 However when I export the signed version of this it won't run and it says "Access Denied". 但是,当我导出此签名版本时,它将无法运行,并显示“访问被拒绝”。 And I seem to unable to move the apk into SD card either. 而且我似乎也无法将APK移入SD卡。 and fyi it's not a rooted phone. 而且这不是一部扎根电话。

I tried installing the signed apk on my AVD emulator, I run a command in cmd as follows: 我尝试在我的AVD模拟器上安装签名的apk,我在cmd中运行以下命令:

...\sdk\platform-tools> adb -s emulator-5554 install X:\Arya\Android\MyJlm.apk

the installation succeeded, but when I click the shortcut it says "App isn't installed". 安装成功,但是当我单击快捷方式时显示“未安装应用程序”。 and the LogCat says: LogCat说:

03-24 05:12:47.934: W/ActivityManager(370): Permission Denial: starting Intent { act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] flg=0x10200000 cmp=my.jlm/.Splash } from ProcessRecord{b4fd0b30 528:com.android.launcher/u0a7} (pid=528, uid=10007) not exported from uid 10053

It seems weird as I "certified" the apk from Eclipse wizard that does everything from creating new keystore until the end and I feel I didn't miss anything (but please correct me if I'm wrong!) 我从Eclipse向导“认证”了从创建新密钥库到结束的一切操作的apk似乎很奇怪,我觉得我什么都没错过(但是如果我错了,请纠正我!)

and I really want to know what is the cause? 我真的想知道是什么原因? is it from my way in building the manifest, permission, etc or is it from the phone itself? 是我构建清单,许可等方式产生的,还是电话本身产生的?

thank you for the kind attention 谢谢您的关注

This goes inside of projects build.gradle file 这在项目build.gradle文件中

You have to put this below Android 您必须将其放在Android

    signingConfigs {
    debug {
        storeFile file(project.property("MyApp.signing"))
        storePassword project.property("MyApp.signing.password")
        keyAlias project.property("MyApp.signing.alias")
        keyPassword project.property("MyApp.signing.password")
    }
}

On Gradle.properties do : Gradle.properties执行:

MyApp.signing=../myapp.keystore.jsk
MyApp.signing.password=helloworkd
MyApp.signing.alias=myapp_alias

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM