apk

RN的打包

安稳与你 提交于 2020-01-15 08:02:53
1、首先执行以下命令 在android目录下    keytool -genkey -v -keystore my-release-key.keystore -alias my-key-alias -keyalg RSA -keysize 2048 -validity 10000    这条命令会要求你输入密钥库(keystore)和对应密钥的密码,然后设置一些发行相关的信息。最后它会生成一个叫做 my-release-key.keystore 的密钥库文件。 在运行上面这条语句之后,密钥库里应该已经生成了一个单独的密钥,有效期为10000天。--alias参数后面的别名是你将来为应用签名时所需要用到的,所以记得记录这个别名。 2、设置gradle变量   把 my-release-key.keystore 文件放到你工程中的 android/app 文件夹下   编辑android /gradle.properties (没有这个文件你就创建一个),添加如下的代码(注意把其中的 **** 替换为相应密码)    MYAPP_RELEASE_STORE_FILE=my-release-key.keystore MYAPP_RELEASE_KEY_ALIAS=my-key-alias MYAPP_RELEASE_STORE_PASSWORD=***** MYAPP_RELEASE

Frame动画实战

别说谁变了你拦得住时间么 提交于 2020-01-15 04:17:38
Android动画分为Tween动画和Frame动画,Tween动画主要包括图片的放大缩小、旋转、透明度变化、移动等等操作;Frame动画则简单得多了,就是把一张张的图片连续播放产生动画效果。 本节主要介绍一下Frame动画,Tween动画会在后面的文章中介绍,敬请关注。 Frame动画主要是通过AnimationDrawable类来实现的,它有start()和stop()两个重要的方法来启动和停止动画。Frame 动画一般通过XML文件配置,在工程的res/anim目录下创建一个XML配置文件,该配置文件有一个<animation-list>根 元素和若干个<item>子元素。 实现一个人跳舞的Frame动画,6张图片如下所示: 1、把这6张图片放到res/drawable目录下,分别取名为:p01.png,p02.png,p03.png,p04.png,p05.png,p06.png。 2、在res/anim目录下创建一个XML配置文件,文件名为:dance.xml,文件内容: <? xml version="1.0" encoding="utf-8" ?> < animation-list xmlns:apk ="http://schemas.android.com/apk/res/android" apk:oneshot ="false" > < item apk

Convert unsigned apk into signed apk

自闭症网瘾萝莉.ら 提交于 2020-01-14 03:19:22
问题 I have an android application with un-signed package, Whenever I try to install this apk, following error message throws Failure [INSTALL_PARSE_FAILED_NO_CERTIFICATES] . Now I want to insert my keystore certifcate with this apk file. is there any possibilities to do this with external command rather than IDE? 回答1: We can do this via jarsigner tool comes with the JDK Steps In Windows Step 1: set path C:\Program Files (x86)\Java\jdk1.8.0_20\bin in command line Step 2: jarsigner -verbose

Can I get APK file on phone of the installed applications

时光总嘲笑我的痴心妄想 提交于 2020-01-14 01:58:31
问题 I am trying to develop a application for backing up the files. I need to extract the APK files of installed applications like the Astro manager does. If anyone know how to extract please give me the solution. 回答1: They are stored in /data/app/ but unless your phone is rooted you won't see anything there. System apk's are stored at /system/app A better way of getting the exact apk path : PackageManager pm = getPackageManager(); List<PackageInfo> pkginfolist = pm.getInstalledPackages

RN在Android打包发布App

百般思念 提交于 2020-01-14 00:22:03
参考资料:http://www.jianshu.com/p/b8811669bcb6 RN在Android打包发布App 1-:生成一个签名密钥 你可以用keytool命令生成一个私有密钥。在Windows上keytool命令放在JDK的bin目录中(比如C:\Program Files\Java\jdkx.x.x_x\bin),你可能需要在命令行中先进入那个目录才能执行此命令。在mac上,直接进入项目根目录输入一下命令: $ keytool -genkey -v -keystore my-release-key.keystore -alias my-key-alias -keyalg RSA -keysize 2048 -validity 10000 这条命令会要求你输入密钥库(keystore)和对应密钥的密码,然后设置一些发行相关的信息。最后它会生成一个叫做my-release-key.keystore的密钥库文件。 在运行上面这条语句之后,密钥库里应该已经生成了一个单独的密钥,有效期为10000天。--alias参数后面的别名是你将来为应用签名时所需要用到的,所以记得记录这个别名。 注意:请记得妥善地保管好你的密钥库文件,不要上传到版本库或者其它的地方。 2-:设置gradle变量 把 my-release-key.keystore 文件放到你工程中的 android

Do library dependency increase size of APK?

亡梦爱人 提交于 2020-01-13 03:13:10
问题 I have multiple libraries in my project like dependencies { compile files('libs/universalloaderlibrary.jar') compile fileTree(dir: 'libs', include: ['*.jar']) compile 'com.android.support:appcompat-v7:22.2.1' compile 'com.android.support:design:22.2.1' compile 'com.android.support:recyclerview-v7:22.2.1' compile 'com.android.support:cardview-v7:22.2.1' compile 'de.hdodenhof:circleimageview:1.3.0' compile 'com.jakewharton:butterknife:7.0.1' //noinspection GradleCompatible compile 'com.google

Android: Error - App has same packaged different signature

[亡魂溺海] 提交于 2020-01-12 07:15:08
问题 I am getting an issue where android studio is saying Installation failed since the device has an application with the same package but a different signature. . . .. This is correct, as I recently signed an APK and uploaded to the beta area of my play developer console. And now I am trying to debug it locally and by default I believe that all Android projects are signed by the debug keystore hence the signatures would be different. What is the best way to deal with this? Would it be possible

apk的性能指标

≡放荡痞女 提交于 2020-01-11 23:41:42
apk关键性能参数 1、包体大小(M) 2、falsh读写 3、内存占用(M) pss---adb shell dumpsys meminfo 包名 4、cpu占用(%) adb shell top -n -1 | find "包名" 4、卸载后是否有残留 ---外部存储---/mnt//sdcard/Android/data/包名 ---内部存储---/data/data/包名 5、应用退出后是否驻留后台进程 pid---进程号 来源: https://www.cnblogs.com/zx1313/p/12181470.html

Android expansion file

半腔热情 提交于 2020-01-11 03:30:32
问题 I am trying to do an application which contain ~80mo of PNG (It's an offline app so I have to store them on the phone). The application works perfectly in local but I can't upload an apk > 50mo. So I am trying to implement an expansion file which will contain all my PNGs. So I use this simple command on Linux: _zip_ -0 _main.1.com.ctai.irisst.zip_ *_.png_ on my /res/drawable-mdpi to create my expansion file and then put it manually to /Android/data/com.ctai.irisst/ Then, I use this code to

Re-sign an Android Apk

别说谁变了你拦得住时间么 提交于 2020-01-10 14:01:15
问题 How can I Re-sign an android apk. I referred to this answer Can I re-sign an .apk with a different certificate than what it came with? but got stuck with Android Manifest.xml missing error. 回答1: Friends I found a work around to this . Resign Android Apk using android default debug.keystore. **Open the apk in the winzip browser and not by unzipping to a folder. Delete META-INF folder .zipping again is not required.** Jarsigner -verbose -keystore debug.keystore yourapk.apk aliasname **Example**