dalvik

Multiple dex files error with signpost and gdata jars

别说谁变了你拦得住时间么 提交于 2019-12-11 20:25:36
问题 My app requires both signpost-core-1.2.1.2.jar and one of Google's libraries gdata-core-1.0.jar . But the signpost jar has some of the classes packaged in the gdata-core package. So, my app project is not building. Here is the error: Unable to execute dex: Multiple dex files define Lcom/google/gdata/util/common/base/Escaper; How can I fix this conflict.. I need both the jars for different purposes within my app. 回答1: You can still keep two jars, but you would need to modify / repackage one of

How can I include proper include files for using libdvm.so at my shared library?

☆樱花仙子☆ 提交于 2019-12-11 19:58:10
问题 I want to use below API which is at dalvik/vm/native/dalvik_system_DexFile.cpp: static void Dalvik_dalvik_system_DexFile_defineClass(const u4* args, JValue* pResult) static void Dalvik_dalvik_system_DexFile_openDexFile_bytearray(const u4* args, JValue* pResult) But I don't know how can I include proper include files for using above two APIs in libdvm.so. I tried to include whole headers in android project, but it failed with this compile error message: "Argument list too long". Does anybody

The interpretor for android ART runtime

家住魔仙堡 提交于 2019-12-11 16:27:11
问题 I am currently working with android source tree. For my work I need to go through the instruction at run time. Previously when I used Dalvik VM I hooked into by enabling the interpreter mode and going through the following file dalvik/vm/mterp/out/InterpC-Portable.cpp . There is a loop that continuously cycle through the instructions. I want to find something similar to this for the ART runtime. What files should I modify? Do I need to change something like enabling interpreter mode as I did

Trying to understand Dalvikvm and memory leaks

人走茶凉 提交于 2019-12-11 13:17:20
问题 I am trying to wrap my head around finding memory leaks. I suppose the first step is to see if i have one by looking at the dalvikvm but i am not really understanding whether it is good or bad. Here is a snap shot of my dalvikvm log: could someone just speak a bit to what is seen above. What are red flags? what is normal? In addition, i have installed MAT for eclipse and while there are many links to tutorials about using MAT to find memory links, none of them seem to really explain how they

Error accessing Android API when running a java program directly from dex archive on android

喜欢而已 提交于 2019-12-11 12:18:21
问题 It is possible to run a plain old java program on android directly without an apk. (see detailed instructions in JesusFreke's comment here: How to execute the dex file in android with command?) It works like a charm as long as the program uses stock JDK classes. But when I tried to refer to a simple android API like in the code below: import android.os.Build; public class HelloWorld { public static void main(String[] args) { System.out.println("Hello World, API v" + Build.VERSION.SDK_INT); }

Types of memory leaks in a garbage-collected language running in virtual machines (ie, Dalvik)

前提是你 提交于 2019-12-11 12:02:38
问题 Aren't there two types of memory leaks when dealing with a garbage collected language: user-coded and runtime-environment? That is, poor user code (say lots of global static references) vs bugs in the runtime, or are they considered one in the same? Are the tools used to find them the same typically? 回答1: As I know, poor user code is the main problem for leading memory leak. And In Dalvik, the java-heap uses dlmalloc for allocing memory, this may lead more Memory fragmentation; even if you

Does dx conversion to dex include verification of original class files?

橙三吉。 提交于 2019-12-11 09:39:37
问题 I'm interested in doing some tinkering on compiled Class files before they're converted to dex files by dx. I've looked a bit at the official Dalvik documentation and also at comparisons between the DEX format and Class format. I can't find much information regarding the actual conversion process , class->dex. Does dx first verify the Class files before the conversion? Does it simply go field by field and method by method, merging groups of instructions into more compact groupings? Any

Android: unable to resolve static field 65 (state_unknown) in Lcom/android/vending/expansion/downloader/R$string;

回眸只為那壹抹淺笑 提交于 2019-12-11 09:33:30
问题 I get the warning mentioned above (in addition to other similar warnings), followed by an error: java.lang.NoClassDefFoundError: com.android.vending.expansion.downloader.R$string I get this error right after running the 2nd line here: (I'm using the Apk expansion, downloader, zip, and Licensing libraries) public void onServiceConnected(Messenger m) { Log.i("Main Activity - APK Downloader", "SERVICE CONNECTED!!!"); mRemoteService = DownloaderServiceMarshaller.CreateProxy(m); // ERROR!

DalvikVM with Input

拥有回忆 提交于 2019-12-11 08:18:00
问题 How can I start with dalvikvm an .jar-file with an input. Something like that: dalvikvm -cp /path to jar/test.jar "hello" The main method of the test.jar will be just print this hello to console. It something like that possible? What is the right way to give this input to the main method, for example as an input for String [] args of the main method. 回答1: Have you followed these steps? It looks like you need to run something like this: # /system/bin/dalvikvm -Xbootclasspath:/system/framework

Class Load Exception when using @RestService - java.lang.ClassNotFoundException (…) at dalvik.system.BaseDexClassLoader.findClass

我怕爱的太早我们不能终老 提交于 2019-12-11 07:33:56
问题 So my project is compiling and running well unitll I inject AndroidAnnotations @RestService into my MainActivity @EActivity(R.layout.activity_main) public class MainActivity extends AppCompatActivity { @RestService RestInterface restInterface; ... } MyRestClient: @Rest(rootUrl = "http://153.19.215.46:8080/api", converters = {MappingJackson2HttpMessageConverter.class}) public interface RestInterface { @Post("/device/rgbled/light") String lightLed(@Body String color); } Some sources led me to