apk

How to include version string in the filename when building Android apk with ant?

前提是你 提交于 2019-12-18 10:35:41
问题 Normally we build android package in debug mode with the command ant debug and got the apk filename AppName-debug.apk . Is there any way to generate the apk file in the format of AppName-debug-<version-number>.apk directly without 'mv' command? Thanks. 回答1: I have done this in an automated way, by using the info from the Android manifest. My approach was to modify the local project ant build.xml file to import a custom copy of the master build.xml file, in the latest version of the SDK the

modifying .smali files

房东的猫 提交于 2019-12-18 10:24:37
问题 I reverse engineered some android apks to add some instrumentation for functional testing. I want to know given an smali as following how can I add something like Log.e(TAG, "some descritpion", e); to each method in the .smali files. .class public Ld; .super Landroid/view/View; .source "SourceFile" # instance fields .field a:Z .field b:Lcom/rovio/ka3d/App; # direct methods .method public constructor <init>(Lcom/rovio/ka3d/App;)V .locals 2 .parameter .prologue const/4 v1, 0x1 .line 317 invoke

How to Fix Android App Not Installed Error?

允我心安 提交于 2019-12-18 09:38:51
问题 I have developed the app by Android Studio, and build it to signed apk with V1 and V2. It could install in my phone successfully. But, when I uninstall the app, and install the app again, it would show App not installed. But the apk file is the same apk file. Why first time can install, but not successful in second time? Now, when I see this error, I would change the versionCode, then the app could install. But beside this solution, have any solution on this problem? Thank you so much! 回答1: I

Html page to download and install apk from browser

落爺英雄遲暮 提交于 2019-12-18 09:02:44
问题 I have an app that will be installed by the user from a public webserver (outside android market). So I hosted the apk in webserver and instructed the users to type the url to download the file and then "open" the downloaded file to install it. But, almost 100% of users are having difficulties to do those simple tasks (they're are not familiar with technology...). So, I decided to make a webpage that will simplify the task. The page contains a single big button that will: Donwload the apk;

How to proect .apk file being shared with other people?

半世苍凉 提交于 2019-12-18 07:11:37
问题 So I have a problem, we want to be able to sell our Android application on our site AND on the Android market. If we just stick the .apk file on our site and let people download it after they have paid for it, how do we prevent them from just giving htat .apk file to a friend? I have been searching goolge all morning for a solution. I just want someway to be able to protect our application from being installed on more then one device. So if you get it, install it on your phone, then give it

Is there a limit on how many different apps can single developer publish on Android Market?

浪尽此生 提交于 2019-12-18 05:34:09
问题 I did the googling and checked all the relevant questions on StackOverflow but question is still standing: Is there a limit on how many different apps can single developer publish on Android Market? I am not talking about updates etc. I mean different Free Applications with different ID, different functionality and different APKs under same developer ID. Proof links are more than welcome. Update: I am aware of the limit on size. But the question is there a limit on amount? Failed to find

Android应用构建:5:Android Studio 3.5.3:签名的生成方法

醉酒当歌 提交于 2019-12-18 05:08:17
使用Android Studio构建出来的APK文件可以有签名也可以没有签名,前面文章介绍了如何构建无签名的调试版或者发布版的APK文件的方法,这篇文章将继续介绍在Android Studio中创建签名的方法。 生成签名文件 步骤1: 选择Build菜单的Generate Signed Bundle / APK …子菜单项 在接下来的页面中选择APK选项,然后点击Next按钮 在接下来的页面中即可进行新建签名或者选择既有的签名了 步骤2: 生成新的签名 注意事项:点击Create new…按钮生成新的签名(key store)或者使用Choose existing…按钮选择所使用的Key Store是首先需要做的事情,这个页面的Key store path尽量不使用手动写入的方式以避免不必要的错误。首先点击Create new…按钮在接下来的创建新的签名的页面输入如下内容创建新的证书。 设定项 设定值 项目说明 Key store path keyReleaseV2.jks 签名文件名 Password liumiaocn 密码 Confirm liumiaocn 密码确认 Alias release_v2_private_key 私钥名称 Password liumiaocn 密码 Confirm liumiaocn 密码确认 Validity(years) 25 有效期(单位

Error building APK when minifyEnabled true

旧街凉风 提交于 2019-12-18 05:05:17
问题 I need to enable proguard, so I set minifyEnabled to true. However, I then get the following error when trying to build a release APK: Error:Execution failed for task ':app:packageRelease'. Unable to compute hash of .../app/build/intermediates/classes-proguard/release/classes.jar Edit: Sounds like I need to update my proguard-rules according to the libraries I'm using. Here are my dependencies: dependencies { compile fileTree(dir: 'libs', include: ['*.jar']) testCompile 'junit:junit:4.12'

shrinkResources set to true, but all unused resources (specifically drawables) not getting removed

僤鯓⒐⒋嵵緔 提交于 2019-12-18 04:38:11
问题 I'm setting shrinkResources to true as follows: releasepro { minifyEnabled true shrinkResources true proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' applicationIdSuffix ".pro" } But this is removing only a few unused resources. I am aware that gradle does some guessing and leaves resources that is is not sure are unused. Is there a way to remove all unused resources 100% ? I read about setting the shrinkMode to strict in another thread. Will that help? I

Ignoring files from Android APK

别等时光非礼了梦想. 提交于 2019-12-18 04:33:10
问题 Is it possible to ignore files from being packaged into the Android APK? For instance, I have my .psd files in the same folder as their .png counterparts, and all the .psd files get packaged up. I know I can move them outside of the folder, but I like having them in all together and would prefer not to if possible 回答1: This is actually supported in the Android Asset Packaging Tool (AAPT). I always put my psd-like files in the resource directories like this: /res/drawable/_pre_production/ic