apk

“Conversion to Dalvik format failed with error 1” — on export only

牧云@^-^@ 提交于 2019-12-17 17:38:36
问题 I know this is a repeat question but I've read and tried every solution on this site and I'm still getting the error; also, I'm getting it ONLY when I export my signed apk from Eclipse. I'm able to build and run the unsigned apk. I have: Deleted (and later restored) all libraries from the build path Cleaned and rebuilt all my projects Restarted Eclipse with -clean option Re-create the app project from scratch I know error 1 means I have duplicate symbols but I've checked, clean and rebuilt my

Android多主题调研之Overlay机制

China☆狼群 提交于 2019-12-17 17:28:38
【推荐】2019 Java 开发者跳槽指南.pdf(吐血整理) >>> Miui的多主题效果非常cool,但应该如何实现呢?有些人可能会想到使用Android系统提供的Overlay机制。但是Overlay机制能否实现多主题呢?通过调研,我的答案是:部分实现。 为何是部分实现?究竟什么是部分实现? 部分实现指的是Overlay机制可以实现framework资源的多主题替换,但是无法做到App的多主题。Overlay机制本身的目的是为OEM厂商提供一种替换原生系统资源的机制。通过阅读framework的AssetManager.cpp代码(addAssetPath)可以知道,系统在加载framework资源时,会查找是否有framework-res.apk的overlay资源,他是在/vendor/overlay/framework目录下进行查找的。这意味着只要替换/vendor/overlay/framework中的framework-res.apk就能实现framework资源的替换,当然前提需要重启系统。 但是APP资源的Overlay只能在APP编译时完成,一旦编译完成,Overlayed资源也就固定在一个APP中了。当然framework-res.apk也支持这种overlay方式。看AssetManager.cpp代码注释中提到, // add overlay

How to run .APK file on emulator [duplicate]

Deadly 提交于 2019-12-17 17:23:51
问题 This question already has answers here : Closed 8 years ago . Possible Duplicate: How do you install an APK file in the Android emulator? I download an APK file and I want to run it on an Android emulator but I don't know how. Please help me. Thanks! 回答1: Steps (These apply for Linux. For other OS, visit here) - Copy the apk file to platform-tools in android-sdk linux folder. Open Terminal and navigate to platform-tools folder in android-sdk . Then Execute this command - ./adb install

Installing application on SD-card in Android sdk 2.2

感情迁移 提交于 2019-12-17 16:29:09
问题 I am facing this problem and finding solution for this issue since last 2 weeks. Right now i have developed an android application for the client perpose, whose size is 54 MB, from which 52 MB of only Images/Photos. [Edit: I need to keep images in "drawable" folder ] So i want to install it in sd-card on Android SDK 2.2 for that i have already set android:installLocation="preferExternal" in the AndroidManifest.xml file. I have created 256MB sd-card while creating an avd , heap size - 192 ,

Android札记【3】——关于Android反编译方面[首届 Google 暑期大学生博客分享大赛]

不问归期 提交于 2019-12-17 11:37:10
[首届 Google 暑期大学生博客分享大赛——2010 Android 篇] 写个东西不容易啊!第一次写了一半,上传个文件后,结果网络崩溃了。把我气得......(实践了几次之后发现,在Chrome浏览器下上传图片是会崩溃的,换了搜狗,一切才正常。)其实按照我的札记的顺序,这次本应该写一写关于Android的基本的技术和相关的知识。毕竟这样比较符合逻辑。可是最近学习的时候碰到了关于反编译方面的知识,所以自己留心进行了一系列的实践并做了一下总结,希望能够为大家提供一些帮助。通过反编译,我们可以去看一下别人的一些Android优秀的应用程序是怎样写的,这样也是一种学习的过程(虽然这种学习有点“不道德”。) (ps:对于软件开发人员来说,保护代码安全也是比较重要的因素之一,不过目前来说Google Android平台选择了Java Dalvik VM的方式使其程序很容易破解和被修改,首先APK文件其实就是一个MIME为ZIP的压缩包,我们修改ZIP后缀名方式可以看到内部的文件结构,类似Sun JavaMe的Jar压缩格式一样,不过比较去别的是Android上的二进制代码被编译成为Dex的字节码,所有的Java文件最终会编译进该文件中去,作为托管代码既然虚拟机可以识别,那么我们就可以很轻松的反编译。所有的类调用、涉及到的方法都在里面体现到,至于逻辑的执行可以通过实时调试的方法来查看

Andriod APK体积优化

霸气de小男生 提交于 2019-12-17 10:28:47
随着项目的不断迭代,功能越来越多,构建出来的apk文件的大小也会越来越大,这样会导致在移动网络情况下下载时,使用的网络流量会增大,并且apk太大,导致下载的时间也增加,虽然当前每个人的手机的流量都很多,对用户流量影响不大,但是据一些网站统计,安装包越大,用户的转化率是在降低的,所以减少apk的体积,可以让更多的用户愿意去下载和体验产品。所以,对apk体积进行瘦身还是很有必要的。在对apk体积进行瘦身前,最好保证这个apk已经是经过Proguard优化过的。 经过了Proguard对apk进行压缩,优化,混淆后,在去对这个已经进行优化过的apk进行瘦身更有意义。 下面是项目总常用的对apk进行优化的方式: 在app的主module下的gradle文件中做如下配置 buildTypes { release { //开启代码混淆 minifyEnabled true //Zipalign优化 zipAlignEnabled true //移除无用的resource文件 shrinkResources true proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' } } 使用 shrinkResources 进行移除,配合 //Zipalign优化 使用

Changing application package name in custom Ant build step

左心房为你撑大大i 提交于 2019-12-17 09:32:15
问题 I'm trying to use a custom build to repackage my Android app. I want to create an internal beta version which I can install side-by-side with my production app. This answer looks like exactly what I need, however it doesn't seem to work. Here's the update to my build.xml: <target name="-package-resources" depends="-crunch" > <echo>Repackaging AndroidManifest.xml to ${package.manifest.name} ${out.absolute.dir}/${resource.package.file.name}</echo> <exec executable="${aapt}" failonerror="true">

Changing application package name in custom Ant build step

≯℡__Kan透↙ 提交于 2019-12-17 09:32:10
问题 I'm trying to use a custom build to repackage my Android app. I want to create an internal beta version which I can install side-by-side with my production app. This answer looks like exactly what I need, however it doesn't seem to work. Here's the update to my build.xml: <target name="-package-resources" depends="-crunch" > <echo>Repackaging AndroidManifest.xml to ${package.manifest.name} ${out.absolute.dir}/${resource.package.file.name}</echo> <exec executable="${aapt}" failonerror="true">

Signing an APK with an upload key provided by Google Play

微笑、不失礼 提交于 2019-12-17 08:16:06
问题 I'm trying to make sense of how to upload an app onto Google Play while using Google Play App Signing. Here is what I did: Created an app Used keytool.exe to generate a key for that app Uploaded the app to Google Play Enrolled in the Google Play App Signing Try to upload the app again without success. It complains that the certificate is not the certificate Upload new APK to Production Upload failed You uploaded an APK that is not signed with the upload certificate. You must use the same

Change apk name with Gradle

你说的曾经没有我的故事 提交于 2019-12-17 06:32:12
问题 I have an Android project which uses Gradle for build process. Now I want to add two extra build types staging and production, so my build.gradle contains: android { buildTypes { release { runProguard false proguardFile getDefaultProguardFile('proguard-android.txt') } staging { signingConfig signingConfigs.staging applicationVariants.all { variant -> appendVersionNameVersionCode(variant, defaultConfig) } } production { signingConfig signingConfigs.production } } } and my