调用Calendar.getInstance()时,给出StackOverflowError

时间:2018-10-22 07:33:52

标签: java android android-emulator stack-overflow

所以我来这里已经四个小时了。我在同一模拟器的3台不同计算机上构建了这个项目。其他计算机可以完美运行此代码而不会出错。在与UI交互并提示Calendar.getInstance()调用后不久,此计算机会不断发出此StackOverflowError。

这是该行运行之后在调试器中的内容。

E/AndroidRuntime: FATAL EXCEPTION: main
                  Process: com.coinc.coinc.coinc, PID: 3596
                  java.lang.StackOverflowError: stack size 8MB
                      at sun.util.calendar.BaseCalendar.getFixedDate(BaseCalendar.java:368)
                      at java.util.GregorianCalendar.getFixedDate(GregorianCalendar.java:3034)
                      at java.util.GregorianCalendar.computeTime(GregorianCalendar.java:2727)
                      at java.util.Calendar.updateTime(Calendar.java:3397)
                      at java.util.Calendar.getTimeInMillis(Calendar.java:1761)
                      at com.coinc.coinc.coinc.Functions.DaysBetweenTwoDates.getDays(DaysBetweenTwoDates.java:19)
                      at com.coinc.coinc.coinc.DataStructures.Activity.<init>(Activity.java:48)
                      at com.coinc.coinc.coinc.DataStructures.SubActivity.<init>(SubActivity.java:15)
                      at com.coinc.coinc.coinc.DataStructures.Activity.<init>(Activity.java:56)
                      at com.coinc.coinc.coinc.DataStructures.SubActivity.<init>(SubActivity.java:15)
                      at com.coinc.coinc.coinc.DataStructures.Activity.<init>(Activity.java:56)
                      at com.coinc.coinc.coinc.DataStructures.SubActivity.<init>(SubActivity.java:15)
                      at com.coinc.coinc.coinc.DataStructures.Activity.<init>(Activity.java:56)
                      at com.coinc.coinc.coinc.DataStructures.SubActivity.<init>(SubActivity.java:15)
                      at com.coinc.coinc.coinc.DataStructures.Activity.<init>(Activity.java:56)
                      at com.coinc.coinc.coinc.DataStructures.SubActivity.<init>(SubActivity.java:15)
                      at com.coinc.coinc.coinc.DataStructures.Activity.<init>(Activity.java:56)
                      at com.coinc.coinc.coinc.DataStructures.SubActivity.<init>(SubActivity.java:15)
                      at com.coinc.coinc.coinc.DataStructures.Activity.<init>(Activity.java:56)
                      at com.coinc.coinc.coinc.DataStructures.SubActivity.<init>(SubActivity.java:15)
                      at com.coinc.coinc.coinc.DataStructures.Activity.<init>(Activity.java:56)
                      at com.coinc.coinc.coinc.DataStructures.SubActivity.<init>(SubActivity.java:15)
                      at com.coinc.coinc.coinc.DataStructures.Activity.<init>(Activity.java:56)
                      at com.coinc.coinc.coinc.DataStructures.SubActivity.<init>(SubActivity.java:15)
                      at com.coinc.coinc.coinc.DataStructures.Activity.<init>(Activity.java:56)
                      at com.coinc.coinc.coinc.DataStructures.SubActivity.<init>(SubActivity.java:15)
                      at com.coinc.coinc.coinc.DataStructures.Activity.<init>(Activity.java:56)
                      at com.coinc.coinc.coinc.DataStructures.SubActivity.<init>(SubActivity.java:15)
                      at com.coinc.coinc.coinc.DataStructures.Activity.<init>(Activity.java:56)
                      at com.coinc.coinc.coinc.DataStructures.SubActivity.<init>(SubActivity.java:15)
                      at com.coinc.coinc.coinc.DataStructures.Activity.<init>(Activity.java:56)
                      at com.coinc.coinc.coinc.DataStructures.SubActivity.<init>(SubActivity.java:15)
                      at com.coinc.coinc.coinc.DataStructures.Activity.<init>(Activity.java:56)
                      at com.coinc.coinc.coinc.DataStructures.SubActivity.<init>(SubActivity.java:15)
                      at com.coinc.coinc.coinc.DataStructures.Activity.<init>(Activity.java:56)
                      at com.coinc.coinc.coinc.DataStructures.SubActivity.<init>(SubActivity.java:15)
                      at com.coinc.coinc.coinc.DataStructures.Activity.<init>(Activity.java:56)
                      at com.coinc.coinc.coinc.DataStructures.SubActivity.<init>(SubActivity.java:15)
                      at com.coinc.coinc.coinc.DataStructures.Activity.<init>(Activity.java:56)
                      at com.coinc.coinc.coinc.DataStructures.SubActivity.<init>(SubActivity.java:15)
                      at com.coinc.coinc.coinc.DataStructures.Activity.<init>(Activity.java:56)
                      at com.coinc.coinc.coinc.DataStructures.SubActivity.<init>(SubActivity.java:15)
                      at com.coinc.coinc.coinc.DataStructures.Activity.<init>(Activity.java:56)
                      at com.coinc.coinc.coinc.DataStructures.SubActivity.<init>(SubActivity.java:15)
                      at com.coinc.coinc.coinc.DataStructures.Activity.<init>(Activity.java:56)
                      at com.coinc.coinc.coinc.DataStructures.SubActivity.<init>(SubActivity.java:15)
                      at com.coinc.coinc.coinc.DataStructures.Activity.<init>(Activity.java:56)
                      at com.coinc.coinc.coinc.DataStructures.SubActivity.<init>(SubActivity.java:15)
                      at com.coinc.coinc.coinc.DataStructures.Activity.<init>(Activity.java:56)
                      at com.coinc.coinc.coinc.DataStructures.SubActivity.<init>(SubActivity.java:15)
E/AndroidRuntime:     at com.coinc.coinc.coinc.DataStructures.Activity.<init>(Activity.java:56)
                      at com.coinc.coinc.coinc.DataStructures.SubActivity.<init>(SubActivity.java:15)
                      at com.coinc.coinc.coinc.DataStructures.Activity.<init>(Activity.java:56)
                      at com.coinc.coinc.coinc.DataStructures.SubActivity.<init>(SubActivity.java:15)
                      at com.coinc.coinc.coinc.DataStructures.Activity.<init>(Activity.java:56)
                      at com.coinc.coinc.coinc.DataStructures.SubActivity.<init>(SubActivity.java:15)
                      at com.coinc.coinc.coinc.DataStructures.Activity.<init>(Activity.java:56)
                      at com.coinc.coinc.coinc.DataStructures.SubActivity.<init>(SubActivity.java:15)
                      at com.coinc.coinc.coinc.DataStructures.Activity.<init>(Activity.java:56)
                      at com.coinc.coinc.coinc.DataStructures.SubActivity.<init>(SubActivity.java:15)
                      at com.coinc.coinc.coinc.DataStructures.Activity.<init>(Activity.java:56)
                      at com.coinc.coinc.coinc.DataStructures.SubActivity.<init>(SubActivity.java:15)
                      at com.coinc.coinc.coinc.DataStructures.Activity.<init>(Activity.java:56)
                      at com.coinc.coinc.coinc.DataStructures.SubActivity.<init>(SubActivity.java:15)
                      at com.coinc.coinc.coinc.DataStructures.Activity.<init>(Activity.java:56)
                      at com.coinc.coinc.coinc.DataStructures.SubActivity.<init>(SubActivity.java:15)
                      at com.coinc.coinc.coinc.DataStructures.Activity.<init>(Activity.java:56)
                      at com.coinc.coinc.coinc.DataStructures.SubActivity.<init>(SubActivity.java:15)
                      at com.coinc.coinc.coinc.DataStructures.Activity.<init>(Activity.java:56)
                      at com.coinc.coinc.coinc.DataStructures.SubActivity.<init>(SubActivity.java:15)
                      at com.coinc.coinc.coinc.DataStructures.Activity.<init>(Activity.java:56)
                      at com.coinc.coinc.coinc.DataStructures.SubActivity.<init>(SubActivity.java:15)
                      at com.coinc.coinc.coinc.DataStructures.Activity.<init>(Activity.java:56)
                      at com.coinc.coinc.coinc.DataStructures.SubActivity.<init>(SubActivity.java:15)
                      at com.coinc.coinc.coinc.DataStructures.Activity.<init>(Activity.java:56)
                      at com.coinc.coinc.coinc.DataStructures.SubActivity.<init>(SubActivity.java:15)
                      at com.coinc.coinc.coinc.DataStructures.Activity.<init>(Activity.java:56)
                      at com.coinc.coinc.coinc.DataStructures.SubActivity.<init>(SubActivity.java:15)
                      at com.coinc.coinc.coinc.DataStructures.Activity.<init>(Activity.java:56)
                      at com.coinc.coinc.coinc.DataStructures.SubActivity.<init>(SubActivity.java:15)
                      at com.coinc.coinc.coinc.DataStructures.Activity.<init>(Activity.java:56)
                      at com.coinc.coinc.coinc.DataStructures.SubActivity.<init>(SubActivity.java:15)
                      at com.coinc.coinc.coinc.DataStructures.Activity.<init>(Activity.java:56)
                      at com.coinc.coinc.coinc.DataStructures.SubActivity.<init>(SubActivity.java:15)
                      at com.coinc.coinc.coinc.DataStructures.Activity.<init>(Activity.java:56)
                      at com.coinc.coinc.coinc.DataStructures.SubActivity.<init>(SubActivity.java:15)
                      at com.coinc.coinc.coinc.DataStructures.Activity.<init>(Activity.java:56)
                      at com.coinc.coinc.coinc.DataStructures.SubActivity.<init>(SubActivity.java:15)
                      at com.coinc.coinc.coinc.DataStructures.Activity.<init>(Activity.java:56)
                      at com.coinc.coinc.coinc.DataStructures.SubActivity.<init>(SubActivity.java:15)
                      at com.coinc.coinc.coinc.DataStructures.Activity.<init>(Activity.java:56)
                      at com.coinc.coinc.coinc.DataStructures.SubActivity.<init>(SubActivity.java:15)
                      at com.coinc.coinc.coinc.DataStructures.Activity.<init>(Activity.java:56)
                      at com.coinc.coinc.coinc.DataStructures.SubActivity.<init>(SubActivity.java:15)
                      at com.coinc.coinc.coinc.DataStructures.Activity.<init>(Activity.java:56)
                      at com.coinc.coinc.coinc.DataStructures.SubActivity.<init>(SubActivity.java:15)
                      at com.coinc.coinc.coinc.DataStructures.Activity.<init>(Activity.java:56)
                      at com.coinc.coinc.coinc.DataStructures.SubActivity.<init>(SubActivity.java:15)
                      at com.coinc.coinc.coinc.DataStructures.Activity.<init>(Activity.java:56)
                      at com.coinc.coinc.coinc.DataStructures.SubActivity.<init>(SubActivity.java:15)
                      at com.coinc.coinc.coinc.DataStructures.Activity.<init>(Activity.java:56)
                      at com.coinc.coinc.coinc.DataStructures.SubActivity.<init>(SubActivity.java:15)
                      at com.coinc.coinc.coinc.DataStructures.Activity.<init>(Activity.java:56)
                      at com.coinc.coinc.coinc.DataStructures.SubActivity.<init>(SubActivity.java:15)
                      at com.coinc.coinc.coinc.DataStructures.Activity.<init>(Activity.java:56)
                      at com.coinc.coinc.coinc.DataStructures.SubActivity.<init>(SubActivity.java:15)
                      at com.coinc.coinc.coinc.DataStructures.Activity.<init>(Activity.java:56)
                      at com.coinc.coinc.coinc.DataStructures.SubActivity.<init>(SubActivity.java:15)
                      at com.coinc.coinc.coinc.DataStructures.Activity.<init>(Activity.java:56)
                      at com.coinc.coinc.coinc.DataStructures.SubActivity.<init>(SubActivity.java:15)
                      at com.coinc.coinc.coinc.DataStructures.Activity.<init>(Activity.java:56)
                      at com.coinc.coinc.coinc.DataStructures.SubActivity.<init>(SubActivity.java:15)
                      at com.coinc.coinc.coinc.DataStructures.Activity.<init>(Activity.java:56)
                      at com.coinc.coinc.coinc.DataStructures.SubActivity.<init>(SubActivity.java:15)
                      at com.coinc.coinc.coinc.DataStructures.Activity.<init>(Activity.java:56)
                      at com.coinc.coinc.coinc.DataStructures.SubActivity.<init>(SubActivity.java:15)
                      at com.coinc.coinc.coinc.DataStructures.Activity.<init>(Activity.java:56)
                      at com.coinc.coinc.coinc.DataStructures.SubActivity.<init>(SubActivity.java:15)
                      at com.coinc.coinc.coinc.DataStructures.Activity.<init>(Activity.java:56)
                      at com.coinc.coinc.coinc.DataStructures.SubActivity.<init>(SubActivity.java:15)
                      at com.coinc.coinc.coinc.DataStructures.Activity.<init>(Activity.java:56)
                      at com.coinc.coinc.coinc.DataStructures.SubActivity.<init>(SubActivity.java:15)
                      at com.coinc.coinc.coinc.DataStructures.Activity.<init>(Activity.java:56)
E/AndroidRuntime:     at com.coinc.coinc.coinc.DataStructures.SubActivity.<init>(SubActivity.java:15)
                      at com.coinc.coinc.coinc.DataStructures.Activity.<init>(Activity.java:56)
                      at com.coinc.coinc.coinc.DataStructures.SubActivity.<init>(SubActivity.java:15)
                      at com.coinc.coinc.coinc.DataStructures.Activity.<init>(Activity.java:56)
                      at com.coinc.coinc.coinc.DataStructures.SubActivity.<init>(SubActivity.java:15)
                      at com.coinc.coinc.coinc.DataStructures.Activity.<init>(Activity.java:56)
                      at com.coinc.coinc.coinc.DataStructures.SubActivity.<init>(SubActivity.java:15)
                      at com.coinc.coinc.coinc.DataStructures.Activity.<init>(Activity.java:56)
                      at com.coinc.coinc.coinc.DataStructures.SubActivity.<init>(SubActivity.java:15)
                      at com.coinc.coinc.coinc.DataStructures.Activity.<init>(Activity.java:56)
                      at com.coinc.coinc.coinc.DataStructures.SubActivity.<init>(SubActivity.java:15)
                      at com.coinc.coinc.coinc.DataStructures.Activity.<init>(Activity.java:56)
                      at com.coinc.coinc.coinc.DataStructures.SubActivity.<init>(SubActivity.java:15)
                      at com.coinc.coinc.coinc.DataStructures.Activity.<init>(Activity.java:56)
                      at com.coinc.coinc.coinc.DataStructures.SubActivity.<init>(SubActivity.java:15)
                      at com.coinc.coinc.coinc.DataStructures.Activity.<init>(Activity.java:56)
                      at com.coinc.coinc.coinc.DataStructures.SubActivity.<init>(SubActivity.java:15)
                      at com.coinc.coinc.coinc.DataStructures.Activity.<init>(Activity.java:56)
                      at com.coinc.coinc.coinc.DataStructures.SubActivity.<init>(SubActivity.java:15)
                      at com.coinc.coinc.coinc.DataStructures.Activity.<init>(Activity.java:56)
                      at com.coinc.coinc.coinc.DataStructures.SubActivity.<init>(SubActivity.java:15)
                      at com.coinc.coinc.coinc.DataStructures.Activity.<init>(Activity.java:56)
                      at com.coinc.coinc.coinc.DataStructures.SubActivity.<init>(SubActivity.java:15)
                      at com.coinc.coinc.coinc.DataStructures.Activity.<init>(Activity.java:56)
                      at com.coinc.coinc.coinc.DataStructures.SubActivity.<init>(SubActivity.java:15)
                      at com.coinc.coinc.coinc.DataStructures.Activity.<init>(Activity.java:56)
                      at com.coinc.coinc.coinc.DataStructures.SubActivity.<init>(SubActivity.java:15)
                      at com.coinc.coinc.coinc.DataStructures.Activity.<init>(Activity.java:56)
                      at com.coinc.coinc.coinc.DataStructures.SubActivity.<init>(SubActivity.java:15)
                      at com.coinc.coinc.coinc.DataStructures.Activity.<init>(Activity.java:56)
                      at com.coinc.coinc.coinc.DataStructures.SubActivity.<init>(SubActivity.java:15)
                      at com.coinc.coinc.coinc.DataStructures.Activity.<init>(Activity.java:56)
                      at com.coinc.coinc.coinc.DataStructures.SubActivity.<init>(SubActivity.java:15)
                      at com.coinc.coinc.coinc.DataStructures.Activity.<init>(Activity.java:56)
                      at com.coinc.coinc.coinc.DataStructures.SubActivity.<init>(SubActivity.java:15)
                      at com.coinc.coinc.coinc.DataStructures.Activity.<init>(Activity.java:56)
                      at com.coinc.coinc.coinc.DataStructures.SubActivity.<init>(SubActivity.java:15)
                      at com.coinc.coinc.coinc.DataStructures.Activity.<init>(Activity.java:56)
                      at com.coinc.coinc.coinc.DataStructures.SubActivity.<init>(SubActivity.java:15)
                      at com.coinc.coinc.coinc.DataStructures.Activity.<init>(Activity.java:56)
                      at com.coinc.coinc.coinc.DataStructures.SubActivity.<init>(SubActivity.java:15)
                      at com.coinc.coinc.coinc.DataStructures.Activity.<init>(Activity.java:56)
                      at com.coinc.coinc.coinc.DataStructures.SubActivity.<init>(SubActivity.java:15)
                      at com.coinc.coinc.coinc.DataStructures.Activity.<init>(Activity.java:56)
                      at com.coinc.coinc.coinc.DataStructures.SubActivity.<init>(SubActivity.java:15)
                      at com.coinc.coinc.coinc.DataStructures.Activity.<init>(Activity.java:56)
                      at com.coinc.coinc.coinc.DataStructures.SubActivity.<init>(SubActivity.java:15)
                      at com.coinc.coinc.coinc.DataStructures.Activity.<init>(Activity.java:56)
                      at com.coinc.coinc.coinc.DataStructures.SubActivity.<init>(SubActivity.java:15)
                      at com.coinc.coinc.coinc.DataStructures.Activity.<init>(Activity.java:56)
                      at com.coinc.coinc.coinc.DataStructures.SubActivity.<init>(SubActivity.java:15)
E/AndroidRuntime:     at com.coinc.coinc.coinc.DataStructures.Activity.<init>(Activity.java:56)
                      at com.coinc.coinc.coinc.DataStructures.SubActivity.<init>(SubActivity.java:15)
                      at com.coinc.coinc.coinc.DataStructures.Activity.<init>(Activity.java:56)
                      at com.coinc.coinc.coinc.DataStructures.SubActivity.<init>(SubActivity.java:15)
                      at com.coinc.coinc.coinc.DataStructures.Activity.<init>(Activity.java:56)
                      at com.coinc.coinc.coinc.DataStructures.SubActivity.<init>(SubActivity.java:15)
                      at com.coinc.coinc.coinc.DataStructures.Activity.<init>(Activity.java:56)
                      at com.coinc.coinc.coinc.DataStructures.SubActivity.<init>(SubActivity.java:15)
                      at com.coinc.coinc.coinc.DataStructures.Activity.<init>(Activity.java:56)
                      at com.coinc.coinc.coinc.DataStructures.SubActivity.<init>(SubActivity.java:15)
                      at com.coinc.coinc.coinc.DataStructures.Activity.<init>(Activity.java:56)
                      at com.coinc.coinc.coinc.DataStructures.SubActivity.<init>(SubActivity.java:15)
                      at com.coinc.coinc.coinc.DataStructures.Activity.<init>(Activity.java:56)
                      at com.coinc.coinc.coinc.DataStructures.SubActivity.<init>(SubActivity.java:15)
                      at com.coinc.coinc.coinc.DataStructures.Activity.<init>(Activity.java:56)
                      at com.coinc.coinc.coinc.DataStructures.SubActivity.<init>(SubActivity.java:15)
                      at com.coinc.coinc.coinc.DataStructures.Activity.<init>(Activity.java:56)
                      at com.coinc.coinc.coinc.DataStructures.SubActivity.<init>(SubActivity.java:15)
                      at com.coinc.coinc.coinc.DataStructures.Activity.<init>(Activity.java:56)
                      at com.coinc.coinc.coinc.DataStructures.SubActivity.<init>(SubActivity.java:15)
                      at com.coinc.coinc.coinc.DataStructures.Activity.<init>(Activity.java:56)
                      at com.coinc.coinc.coinc.DataStructures.SubActivity.<init>(SubActivity.java:15)
                      at com.coinc.coinc.coinc.DataStructures.Activity.<init>(Activity.java:56)
                      at com.coinc.coinc.coinc.DataStructures.SubActivity.<init>(SubActivity.java:15)
                      at com.coinc.coinc.coinc.DataStructures.Activity.<init>(Activity.java:56)
                      at com.coinc.coinc.coinc.DataStructures.SubActivity.<init>(SubActivity.java:15)
                      at com.coinc.coinc.coinc.DataStructures.Activity.<init>(Activity.java:56)
                      at com.coinc.coinc.coinc.DataStructures.SubActivity.<init>(SubActivity.java:15)
                      at com.coinc.coinc.coinc.DataStructures.Activity.<init>(Activity.java:56)
                      at com.coinc.coinc.coinc.DataStructures.SubActivity.<init>(SubActivity.java:15)
                      at com.coinc.coinc.coinc.DataStructures.Activity.<init>(Activity.java:56)
                      at com.coinc.coinc.coinc.DataStructures.SubActivity.<init>(SubActivity.java:15)
                      at com.coinc.coinc.coinc.DataStructures.Activity.<init>(Activity.java:56)
                      at com.coinc.coinc.coinc.DataStructures.SubActivity.<init>(SubActivity.java:15)
                      at com.coinc.coinc.coinc.DataStructures.Activity.<init>(Activity.java:56)
                      at com.coinc.coinc.coinc.DataStructures.SubActivity.<init>(SubActivity.java:15)
                      at com.coinc.coinc.coinc.DataStructures.Activity.<init>(Activity.java:56)
                      at com.coinc.coinc.coinc.DataStructures.SubActivity.<init>(SubActivity.java:15)
                      at com.coinc.coinc.coinc.DataStructures.Activity.<init>(Activity.java:56)
                      at com.coinc.coinc.coinc.DataStructures.SubActivity.<init>(SubActivity.java:15)
                      at com.coinc.coinc.coinc.DataStructures.Activity.<init>(Activity.java:56)
                      at com.coinc.coinc.coinc.DataStructures.SubActivity.<init>(SubActivity.java:15)
                      at com.coinc.coinc.coinc.DataStructures.Activity.<init>(Activity.java:56)
                      at com.coinc.coinc.coinc.DataStructures.SubActivity.<init>(SubActivity.java:15)
                      at com.coinc.coinc.coinc.DataStructures.Activity.<init>(Activity.java:56)
                      at com.coinc.coinc.coinc.DataStructures.SubActivity.<init>(SubActivity.java:15)
                      at com.coinc.coinc.coinc.DataStructures.Activity.<init>(Activity.java:56)
                      at com.coinc.coinc.coinc.DataStructures.SubActivity.<init>(SubActivity.java:15)
                      at com.coinc.coinc.coinc.DataStructures.Activity.<init>(Activity.java:56)
                      at com.coinc.coinc.coinc.DataStructures.SubActivity.<init>(SubActivity.java:15)
                      at com.coinc.coinc.coinc.DataStructures.Activity.<init>(Activity.java:56)

这是导致此问题的代码。仅在我的设备上对此方法的调用会产生上述错误。

public static int getDays(Time t1, Time t2)
{
    Calendar cal1 = new GregorianCalendar(t1.getYear().getYear(), t1.getMonth().getMonthNumber(), t1.getDay().getDayInMonthNumber());
    Calendar cal2 = new GregorianCalendar(t2.getYear().getYear(), t2.getMonth().getMonthNumber(), t2.getDay().getDayInMonthNumber());
    long startLong = cal1.getTimeInMillis();
    long endLong = cal2.getTimeInMillis();
    long timeBetween = endLong - startLong;
    // System.out.println(endLong + " - " + startLong + " = " + timeBetween + " (" + timeBetween/86400000 + " days)");
    return (int)(timeBetween / 86400000);
}

这是我当前的模拟器设置:

Name: Copy_of_Copy_of_Nexus_7_API_26

CPU/ABI: Google APIs Intel Atom (x86)

Path: C:\Users\Cody\.android\avd\Copy_of_Copy_of_Nexus_7_API_26.avd

Target: google_apis [Google APIs] (API level 26)

Skin: nexus_7_2013

SD Card: 100M

hw.dPad: no

hw.lcd.height: 1920

runtime.network.speed: full

hw.accelerometer: yes

hw.device.name: Nexus 7 2013

vm.heapSize: 128

skin.dynamic: yes

hw.device.manufacturer: Google

hw.lcd.width: 1200

hw.gps: yes

hw.initialOrientation: landscape

image.androidVersion.api: 26

hw.audioInput: yes

image.sysdir.1: system-images\android-26\google_apis\x86\

tag.id: google_apis

showDeviceFrame: yes

hw.camera.back: emulated

hw.mainKeys: no

AvdId: Copy_of_Copy_of_Nexus_7_API_26

hw.camera.front: emulated

hw.lcd.density: 320

avd.ini.displayname: Copy_of_Copy_of_Nexus_7_API_26

hw.gpu.mode: auto

hw.device.hash2: MD5:1a386603f0bf133098332c61cb3a4ee2

hw.ramSize: 1536

hw.trackBall: no

PlayStore.enabled: false

fastboot.forceColdBoot: no

hw.battery: yes

hw.cpu.ncore: 4

hw.sdCard: yes

tag.display: Google APIs

runtime.network.latency: none

hw.keyboard: yes

hw.sensors.proximity: no

disk.dataPartition.size: 800M

hw.sensors.orientation: yes

avd.ini.encoding: UTF-8

hw.gpu.enabled: yes

1 个答案:

答案 0 :(得分:0)

从堆栈跟踪中可以看到,您的SubActivity实例化了Activity,而Activity实例化了SubActivity。您需要修复此无限乒乓球。

Activity初始化的一部分是一个调用,它在调用链中深入6级(到Calendar等),最终足以溢出堆栈。