dex

How to implement a Java compiler and DEX converter into an Android app?

丶灬走出姿态 提交于 2019-11-30 14:53:08
While trying to find an answer to Android Jasper Reporting I found out that there are two other questions to be answered therefor, which I been asked to ask as a question, not as an answer ;): My questions are now: "Is there any compiler to use directly on the device" AND "how to execute such without rooting the device. If anybody could give me a hint I would really appreciate it... I looked a little time forward on this approach, and found apps which makes it possible to create APKs directly on an Android device which is NOT rooted: TerminalIDE - https://play.google.com/store/apps/details?id

Android Studio 3.0 Unable to merge dex

╄→гoц情女王★ 提交于 2019-11-30 12:43:27
Just Updated android studio from 2.3.3 to 3.0 now I am having the error Error:Execution failed for task ':app:transformDexArchiveWithExternalLibsDexMergerForDebug'. java.lang.RuntimeException: java.lang.RuntimeException: com.android.builder.dexing.DexArchiveMergerException: Unable to merge dex Here is my gradle file: apply plugin: 'com.android.application' android { compileSdkVersion 25 buildToolsVersion '26.0.2' defaultConfig { applicationId "d91.compassacademy" minSdkVersion 19 targetSdkVersion 25 versionCode 3 versionName "1.0" testInstrumentationRunner "android.support.test.runner

DexIndexOverflowException: Cannot merge new index 65772 into a non-jumbo instruction!: Jumbo Mode? and/or Multi-Dex? What is behind the scene?

我的梦境 提交于 2019-11-30 11:13:54
I have tried to set jumboMode in gradle for my project, it seems able to solve the following DexIndexOverflowException: com.android.dex.DexException: Cannot merge new index 65536 into a non-jumbo instruction! DexIndexOverflowException: Cannot merge new index 65772 into a non-jumbo instruction! 1) What is jumboMode option actually does behind the scene? android { ... dexOptions { jumboMode true } } 2) I also notice that enabling multi-dex can solve the same problem as well, what is the right choice between these two approaches? android { ... defaultConfig { ... multiDexEnabled true } } "Jumbo"

Android build works in Eclipse but not with Ant (“already added”)

旧城冷巷雨未停 提交于 2019-11-30 05:46:09
问题 My Android project uses several git submodules marked as Android Libraries. These submodules all have different uses of the ORMlite Android jars and thus have the ORMlite jars included in their libs directory. Eclipse handles this situation correctly: it includes the ORMlite jars once during the dex processing and generates a valid .apk, but when I run a build via ant debug , I get: [echo] Converting compiled files and external libraries into /home/webedit/.hudson/jobs/xyz/workspace/bin

Why should I include a gradle dependency as `@aar`

夙愿已清 提交于 2019-11-30 03:03:05
问题 Why should (or shouldnt) I include a gradle dependency as @aar , What are the benefits/drawbacks if any? As you can see I added @aar to the libraries below that supported it. But everything seemed to work before doing that as well... dependencies { compile fileTree(dir: 'libs', include: ['*.jar']) compile 'com.android.support:appcompat-v7:22.1.1' compile 'com.google.android.gms:play-services-maps:7.3.+' compile 'com.google.guava:guava:18.0' compile 'com.octo.android.robospice:robospice-spring

How to avoid 65k method limit while using Google Play Services

余生颓废 提交于 2019-11-30 01:25:46
问题 If you find yourself writing a big Android application that depends on many different libraries (which I would recommend instead of reinventing the wheel) it is very likely that you have already come across the 65k method limit of the Dalvik executable file classes.dex . Furthermore, if you depend on large libraries like the Google Play Services SDK which itself in already contained more than 20k methods in version 5.0 you are forced to use tricks like stripping packages or multidex support

What is Android Pre-Dexing and how to does it increase performance?

自闭症网瘾萝莉.ら 提交于 2019-11-30 01:03:28
问题 I see ant script of Android has message that it is "pre-dexing". However dex and pre-dex uses same options, except that in one case one jar at a time, in other case multiple jars at a time. What is the real need? Is pre-dex mandatory? e.g The ' characters around the executable and arguments are not part of the command. [dex] Pre-Dexing F:\users\tejasoft\work\fnd\cmn\tools\social\sz\demo\libs\pinit-sdk-1.0.jar -> pinit-sdk-1.0-e3bebafa2727504605edf3d8d85b5d46.jar [dx] Current OS is Windows 7

Multiple dex files - Conversion to Dalvik format failed - Unable to execute dex

ε祈祈猫儿з 提交于 2019-11-30 00:43:41
问题 I have 2 app versions - pro and lite. They are both already on the market at v1.01. I am trying to release v1.1 for both. This update includes SwawrmConnect integration in order to use their global leaderboards. I should start off by saying I know I am not maintaining my code correctly. I have 2 completely separate apps and that share probably 90% of their code. I maintain them separately because after a week or 2 or 3 of failing to figure out how to do a library and share code, I gave up and

Gradle builds really slow with a multi-project structure

我只是一个虾纸丫 提交于 2019-11-29 23:02:27
When building with gradle on a multi-project setup containing roughly 140 projects/libraries, the build time took 1 hour and 22 minutes. And i was using --parallel . And our ANT build takes less than 20 minutes without parallel building. Here is exactly what i did. ./gradlew clean ./gradlew build --parallel I did a little testing it seems like the dexing is taking the longest amount of time. Is there a way to get the gradle process to re-use the stuff it has already dexed? If the libraries have already been built, it should re-use the already dexed libraries. I saw the option --no-rebuild ,

How to implement a Java compiler and DEX converter into an Android app?

China☆狼群 提交于 2019-11-29 22:25:08
问题 While trying to find an answer to Android Jasper Reporting I found out that there are two other questions to be answered therefor, which I been asked to ask as a question, not as an answer ;): My questions are now: "Is there any compiler to use directly on the device" AND "how to execute such without rooting the device. If anybody could give me a hint I would really appreciate it... I looked a little time forward on this approach, and found apps which makes it possible to create APKs directly