dex

社区观点 | 理解比原链MOV链上交换协议

邮差的信 提交于 2019-12-27 18:03:05
【推荐】2019 Java 开发者跳槽指南.pdf(吐血整理) >>> 去中心化交换协议的发展 从Bitshare,Stellar到以太坊上的Etherdelta,Bancor,0x协议,去中心化交换协议也经过了好几代发展和很多模式的探索,每一代都通过前面的协议的痛点来进行改进和深化, 主要分为: 链上orderbook,链上结算; 链下orderbook,链上结算; 基于智能合约管理的资金池; 链上orderbook,链上结算 最早的 基于以太坊的去中心化交换协议的成功探索非Etherdelta莫属,曾一度占据去中心化交换市场的半壁江山。Etherdelta是较为完全的去中心化模式,用户充值、挂单、吃单、结算及提现全部在链上完成。 具体运行机制如下: Etherdelta的整个运行都在链上完成,用户保管自己的私钥,平台不会触碰用户资产,保证了资产和交换的安全、透明。但其弊病也较为明显: 由于所有的交换环节都在链上完成,且每一个挂单、撤单、吃单等操作都会消耗GAS费用,导致延时高、成本效益低下。 存在矿工非法预先交换的可能。 链下orderbook,链上结算 为了解决纯链上效率低下,且手续费低廉的问题,0x协议引入了relayer(中继)的概念,所有订单都发给relayer,无需上链,只有成交才会上链。 0x的“链下订单中继、链上最终结算”运作模式如下: 0x协议的主要问题在于

Android java unable to load class

一曲冷凌霜 提交于 2019-12-26 05:00:05
问题 hi am unable to load class in my android app , i can load basic class but when i Initialize context in that class then am not able to load it public class main { // Initalize context Context mContext; public main(Context mContext){ this.mContext = mContext; } public boolean main() { Log.d("MYLOG", "main() called successfully when there context is not initialized like above"); // some code here } } my class loading code try{ final File tmpDir = context.getDir("dex", 0); final DexClassLoader

Android java unable to load class

耗尽温柔 提交于 2019-12-26 04:59:32
问题 hi am unable to load class in my android app , i can load basic class but when i Initialize context in that class then am not able to load it public class main { // Initalize context Context mContext; public main(Context mContext){ this.mContext = mContext; } public boolean main() { Log.d("MYLOG", "main() called successfully when there context is not initialized like above"); // some code here } } my class loading code try{ final File tmpDir = context.getDir("dex", 0); final DexClassLoader

Class resolved by unexpected DEX, how to avoid duplicate imports

旧城冷巷雨未停 提交于 2019-12-25 06:59:21
问题 I'm trying to build an plugin-system which is importing Fragments from other apks as described here. Eclipse keeps telling me: 12-01 15:17:18.609: W/dalvikvm(23425): Class resolved by unexpected DEX: Lde/anthropotec/activityapp/firstplugin/UI;(0x42901520):0x57d93000 ref [Lde/anthropotec/activityapp/api/PluginAPI;] Lde/anthropotec/activityapp/api/PluginAPI;(0x428eb2b8):0x527e1000 (Lde/anthropotec/activityapp/firstplugin/UI; had used a different Lde/anthropotec/activityapp/api/PluginAPI; during

Android Studio Gradle error “Multiple dex files define…”

ぐ巨炮叔叔 提交于 2019-12-25 06:23:13
问题 My Project was working fine, until I added the volley library. Then, it started giving me an error like this: Error:Execution failed for task ':app:packageAllDebugClassesForMultiDex'.> java.util.zip.ZipException: duplicate entry: com/android/volley/AuthFailureError.class What should I do to fix this error? My App gradle is below apply plugin: 'com.android.application' android { compileSdkVersion 23 buildToolsVersion "23.0.1" useLibrary 'org.apache.http.legacy' defaultConfig { applicationId

D8 desugaring: Unexpected type adjustment

允我心安 提交于 2019-12-24 06:23:23
问题 I enable the new D8 desuaring in Android Studio 3.1.3 in my gradle.properties : android.enableD8.desugaring=true Now the compilation fails with this error in one of the java-only modules: com.android.tools.r8.errors.Unreachable: Unexpected type adjustment from java.lang.String[] to java.lang.Object[] Here is the full stack-trace Note: the old dexer works fine (when I deactivate the option above) I've checked the java-module and I cannot even find String[] or Object[] in any of the java-files.

How to find cause of error when dexing: MethodHandle.invoke and MethodHandle.invokeExact

百般思念 提交于 2019-12-24 02:47:28
问题 I have a project that has started throwing this error when building in Android Studio or Gradle: com.android.tools.r8.ApiLevelException: MethodHandle.invoke and MethodHandle.invokeExact are only supported starting with Android O (--min-api 26) Now I assume that it's related to use of Java 8 features, perhaps a lambda, but the error message gives no clue as to where the problem lies - it could be my code or it could be a library. What's the best way to find out where the offending code is? It

Unable to execute dex: Multiple dex files define Lorg/simpleframework/xml/Attribute

梦想与她 提交于 2019-12-24 00:09:22
问题 I am implementing C2Call library for dial call purpose in one application, and C2Call library has lots of jar files, simple-xml-2.6.7.jar is part of C2Call library. simple-xml-2.6.7.jar is giving me an error in my application at compile time: [2014-08-21 11:09:56 - Dex Loader] Unable to execute dex: Multiple dex files define Lorg/simpleframework/xml/Attribute; [2014-08-21 11:09:56 ] Conversion to Dalvik format failed: Unable to execute dex: Multiple dex files define Lorg/simpleframework/xml

Using scala-library.jar in an Android project throws error: Library cannot be dexed

孤人 提交于 2019-12-23 02:05:27
问题 I have a very simple Android project set up that uses: Several custom Scala JARs that are going to perform some functionality for my app scala-library.jar version 2.9.1 final so the Scala jars can run However, whenever I try to launch the app, I get errors saying that the scala-library cannot be Dexed because it is too large. Googling shows that this is a problem, but I am unsure how to fix it. Some say Proguard is the answer, but I don't know how to do that. I don't currently use Ant for any

Decompiling and recompiling APK file

拜拜、爱过 提交于 2019-12-22 09:59:49
问题 I'm currently working on analyzing some android malwares and i need to decompile APK files. Reading an answer and many other answers like it, i know that we can extract java source code and other resources, create a new project and put those files in, make some modifications and compile the project. Is this approach applicable to every APK file ? If we aim to make very little or no modifications in the java source code, does this approach work for every APK file? If not, what is the main