简体   繁体   中英

Android does not release memory on 4.4.2 samsung

new to android i'm starting to loose my hair :

When i launch my app on a Samsung this is what i get each time an activity launches :

 Pause GC
12-02 12:31:53.791: E/ActivityThread(10642): java.lang.reflect.InvocationTargetException
12-02 12:31:53.791: E/ActivityThread(10642):    at java.lang.reflect.Method.invokeNative(Native Method)
12-02 12:31:53.791: E/ActivityThread(10642):    at java.lang.reflect.Method.invoke(Method.java:515)
12-02 12:31:53.791: E/ActivityThread(10642):    at android.app.ActivityThread.pauseGC(ActivityThread.java:5525)
12-02 12:31:53.791: E/ActivityThread(10642):    at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2324)
12-02 12:31:53.791: E/ActivityThread(10642):    at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2471)
12-02 12:31:53.791: E/ActivityThread(10642):    at android.app.ActivityThread.access$900(ActivityThread.java:175)
12-02 12:31:53.791: E/ActivityThread(10642):    at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1308)
12-02 12:31:53.791: E/ActivityThread(10642):    at android.os.Handler.dispatchMessage(Handler.java:102)
12-02 12:31:53.791: E/ActivityThread(10642):    at android.os.Looper.loop(Looper.java:146)
12-02 12:31:53.791: E/ActivityThread(10642):    at android.app.ActivityThread.main(ActivityThread.java:5602)
12-02 12:31:53.791: E/ActivityThread(10642):    at java.lang.reflect.Method.invokeNative(Native Method)
12-02 12:31:53.791: E/ActivityThread(10642):    at java.lang.reflect.Method.invoke(Method.java:515)
12-02 12:31:53.791: E/ActivityThread(10642):    at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1283)
12-02 12:31:53.791: E/ActivityThread(10642):    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1099)
12-02 12:31:53.791: E/ActivityThread(10642):    at dalvik.system.NativeStart.main(Native Method)
12-02 12:31:53.791: E/ActivityThread(10642): Caused by: java.lang.UnsatisfiedLinkError: Native method not found: dalvik.system.VMRuntime.pauseGc:(Ljava/lang/String;)I
12-02 12:31:53.791: E/ActivityThread(10642):    at dalvik.system.VMRuntime.pauseGc(Native Method)
12-02 12:31:53.791: E/ActivityThread(10642):    ... 15 more

This means (i think) the memory is not released so app crash when you use the app for a long time. I do not know what to say to my customer... Any help ? Thank you

It's a bug on Samsung. Look here :

Yeah, i don't think we ever had a VMRuntime.pauseGC method. (and even if we did, VMRuntime and its methods are not public.)

And check this answer. Seems like this is Samsung bug.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM