构建app闪退,测试app扫码可以运行

报错原因是加载layer.js出现错误,没有加载layer.js时就没问题。用laya扫码就可以正常运行,但是构建app用androidstudio打开就不行了。
 
 2019-03-15 08:45:13.438 8214-8265/com.layabox.hello A/art: art/runtime/java_vm_ext.cc:470] JNI DETECTED ERROR IN APPLICATION: input is not valid Modified UTF-8: illegal continuation byte 0x7c
2019-03-15 08:45:13.438 8214-8265/com.layabox.hello A/art: art/runtime/java_vm_ext.cc:470]     string: 'http://192.168.2.139:8900/bin/libs/layer.js:2:
2019-03-15 08:45:13.438 8214-8265/com.layabox.hello A/art: art/runtime/java_vm_ext.cc:470] TypeError: Cannot read property 'length' of undefined
2019-03-15 08:45:13.438 8214-8265/com.layabox.hello A/art: art/runtime/java_vm_ext.cc:470] t.src:function(){for(var e,t=document.scripts,i=t.length-1,n=i;n>0;n--)if("interactive"===t[n].readyState){e=t[n].src;break}retutTO
2019-03-15 08:45:13.438 8214-8265/com.layabox.hello A/art: art/runtime/java_vm_ext.cc:470] �|�`r��|�@���|�
2019-03-15 08:45:13.438 8214-8265/com.layabox.hello A/art: art/runtime/java_vm_ext.cc:470]                                                   ^^                                                                                                     
2019-03-15 08:45:13.438 8214-8265/com.layabox.hello A/art: art/runtime/java_vm_ext.cc:470] TypeError: Cannot read property 'length' of undefined
2019-03-15 08:45:13.438 8214-8265/com.layabox.hello A/art: art/runtime/java_vm_ext.cc:470]     at http://192.168.2.139:8900/bin/libs/layer.js:2:185
2019-03-15 08:45:13.438 8214-8265/com.layabox.hello A/art: art/runtime/java_vm_ext.cc:470]     at http://192.168.2.139:8900/bin/libs/layer.js:2:278
2019-03-15 08:45:13.438 8214-8265/com.layabox.hello A/art: art/runtime/java_vm_ext.cc:470]     at http://192.168.2.139:8900/bin/libs/layer.js:2:324
2019-03-15 08:45:13.438 8214-8265/com.layabox.hello A/art: art/runtime/java_vm_ext.cc:470]     at http://192.168.2.139:8900/bin/ ... 22024
2019-03-15 08:45:13.438 8214-8265/com.layabox.hello A/art: art/runtime/java_vm_ext.cc:470]     at Document._downloadOk (apploader.js:5911:20)
2019-03-15 08:45:13.438 8214-8265/com.layabox.hello A/art: art/runtime/java_vm_ext.cc:470]     at apploader.js:5890:20
2019-03-15 08:45:13.438 8214-8265/com.layabox.hello A/art: art/runtime/java_vm_ext.cc:470]     at FileReader.filereader.onload (apploader.js:6436:47)'
2019-03-15 08:45:13.438 8214-8265/com.layabox.hello A/art: art/runtime/java_vm_ext.cc:470]     input: '0x68 0x74 0x74 0x70 0x3a 0x2f 0x2f 0x31 0x39 0x32 0x2e 0x31 0x36 0x38 0x2e 0x32 0x2e 0x31 0x33 0x39 0x3a 0x38 0x39 0x30 0x30 0x2f 0x62 0x69 0x6e 0x2f 0x6c 0x69 0x62 0x73 0x2f 0x6c 0x61 0x79 0x65 0x72 0x2e 0x6a 0x73 0x3a 0x32 0x3a 0x0a 0x54 0x79 0x70 0x65 0x45 0x72 0x72 0x6f 0x72 0x3a 0x20 0x43 0x61 0x6e 0x6e 0x6f 0x74 0x20 0x72 0x65 0x61 0x64 0x20 0x70 0x72 0x6f 0x70 0x65 0x72 0x74 0x79 0x20 0x27 0x6c 0x65 0x6e 0x67 0x74 0x68 0x27 0x20 0x6f 0x66 0x20 0x75 0x6e 0x64 0x65 0x66 0x69 0x6e 0x65 0x64 0x0a 0x74 0x2e 0x73 0x72 0x63 0x3a 0x66 0x75 0x6e 0x63 0x74 0x69 0x6f 0x6e 0x28 0x29 0x7b 0x66 0x6f 0x72 0x28 0x76 0x61 0x72 0x20 0x65 0x2c 0x74 0x3d 0x64 0x6f 0x63 0x75 0x6d 0x65 0x6e 0x74 0x2e 0x73 0x63 0x72 0x69 0x70 0x74 0x73 0x2c 0x69 0x3d 0x74 0x2e 0x6c 0x65 0x6e 0x67 0x74 0x68 0x2d 0x31 0x2c 0x6e 0x3d 0x69 0x3b 0x6e 0x3e 0x30 0x3b 0x6e 0x2d 0x2d 0x29 0x69 0x66 0x28 0x22 0x69 0x6e 0x74 0x65 0x72 0x61 0x63 0x74 0x69 0x76 0x65 0x22 0x3d 0x3d 0x3d 0x74 0x5b 0x6e 0x5d 0x2e
2019-03-15 08:45:13.439 8214-8265/com.layabox.hello A/art: art/runtime/java_vm_ext.cc:470]     in call to NewStringUTF
2019-03-15 08:45:13.439 8214-8265/com.layabox.hello A/art: art/runtime/java_vm_ext.cc:470] "Thread-6" prio=5 tid=28 Runnable
2019-03-15 08:45:13.439 8214-8265/com.layabox.hello A/art: art/runtime/java_vm_ext.cc:470]   | group="main" sCount=0 dsCount=0 obj=0x12d04940 self=0x8a14c300
2019-03-15 08:45:13.439 8214-8265/com.layabox.hello A/art: art/runtime/java_vm_ext.cc:470]   | sysTid=8265 nice=0 cgrp=default sched=0/0 handle=0x897ca920
2019-03-15 08:45:13.439 8214-8265/com.layabox.hello A/art: art/runtime/java_vm_ext.cc:470]   | state=R schedstat=( 1563292140 82949839 464 ) utm=150 stm=4 core=3 HZ=100
2019-03-15 08:45:13.439 8214-8265/com.layabox.hello A/art: art/runtime/java_vm_ext.cc:470]   | stack=0x896ce000-0x896d0000 stackSize=1014KB
2019-03-15 08:45:13.439 8214-8265/com.layabox.hello A/art: art/runtime/java_vm_ext.cc:470]   | held mutexes= "mutator lock"(shared held)
2019-03-15 08:45:13.439 8214-8265/com.layabox.hello A/art: art/runtime/java_vm_ext.cc:470]   native: #00 pc 00351069  /system/lib/libart.so (_ZN3art15DumpNativeStackERNSt3__113basic_ostreamIcNS0_11char_traitsIcEEEEiP12BacktraceMapPKcPNS_9ArtMethodEPv+128)
2019-03-15 08:45:13.439 8214-8265/com.layabox.hello A/art: art/runtime/java_vm_ext.cc:470]   native: #01 pc 00331729  /system/lib/libart.so (_ZNK3art6Thread9DumpStackERNSt3__113basic_ostreamIcNS1_11char_traitsIcEEEEbP12BacktraceMap+304)
2019-03-15 08:45:13.439 8214-8265/com.layabox.hello A/art: art/runtime/java_vm_ext.cc:470]   native: #02 pc 0023a327  /system/lib/libart.so (_ZN3art9JavaVMExt8JniAbortEPKcS2_+846)
2019-03-15 08:45:13.439 8214-8265/com.layabox.hello A/art: art/runtime/java_vm_ext.cc:470]   native: #03 pc 0023a85f  /system/lib/libart.so (_ZN3art9JavaVMExt9JniAbortVEPKcS2_St9__va_list+58)
2019-03-15 08:45:13.439 8214-8265/com.layabox.hello A/art: art/runtime/java_vm_ext.cc:470]   native: #04 pc 000cac4b  /system/lib/libart.so (_ZN3art11ScopedCheck6AbortFEPKcz+42)
2019-03-15 08:45:13.439 8214-8265/com.layabox.hello A/art: art/runtime/java_vm_ext.cc:470]   native: #05 pc 000cb5cf  /system/lib/libart.so (_ZN3art11ScopedCheck14CheckUtfStringEPKcb+870)
2019-03-15 08:45:13.439 8214-8265/com.layabox.hello A/art: art/runtime/java_vm_ext.cc:470]   native: #06 pc 000cabc1  /system/lib/libart.so (_ZN3art11ScopedCheck17CheckNonHeapValueEcNS_12JniValueTypeE+108)
2019-03-15 08:45:13.439 8214-8265/com.layabox.hello A/art: art/runtime/java_vm_ext.cc:470]   native: #07 pc 000c98b7  /system/lib/libart.so (_ZN3art11ScopedCheck22CheckPossibleHeapValueERNS_18ScopedObjectAccessEcNS_12JniValueTypeE+130)
2019-03-15 08:45:13.439 8214-8265/com.layabox.hello A/art: art/runtime/java_vm_ext.cc:470]   native: #08 pc 000c8d21  /system/lib/libart.so (_ZN3art11ScopedCheck5CheckERNS_18ScopedObjectAccessEbPKcPNS_12JniValueTypeE+800)
2019-03-15 08:45:13.439 8214-8265/com.layabox.hello A/art: art/runtime/java_vm_ext.cc:470]   native: #09 pc 000c4ca7  /system/lib/libart.so (_ZN3art8CheckJNI12NewStringUTFEP7_JNIEnvPKc+446)
2019-03-15 08:45:13.439 8214-8265/com.layabox.hello A/art: art/runtime/java_vm_ext.cc:470]   native: #10 pc 00180f4d  /data/app/com.layabox.hello-2/lib/arm/liblayaair.so (_ZN13CToJavaBridge10callMethodEPKcS1_S1_RNS_7JavaRetENS2_6RTTypeE+80)
2019-03-15 08:45:13.439 8214-8265/com.layabox.hello A/art: art/runtime/java_vm_ext.cc:470]   native: #11 pc 0012fc97  /data/app/com.layabox.hello-2/lib/arm/liblayaair.so (_ZN4laya9LayaAlertEPKc+70)
2019-03-15 08:45:13.439 8214-8265/com.layabox.hello A/art: art/runtime/java_vm_ext.cc:470]   native: #12 pc 0012fdbb  /data/app/com.layabox.hello-2/lib/arm/liblayaair.so (_ZN4laya7JSAlertEPKc+6)
2019-03-15 08:45:13.439 8214-8265/com.layabox.hello A/art: art/runtime/java_vm_ext.cc:470]   native: #13 pc 00110097  /data/app/com.layabox.hello-2/lib/arm/liblayaair.so (_ZN4laya7__JSRun15ReportExceptionEPN2v87IsolateEPNS1_8TryCatchE+1098)
2019-03-15 08:45:13.439 8214-8265/com.layabox.hello A/art: art/runtime/java_vm_ext.cc:470]   native: #14 pc 0010f457  /data/app/com.layabox.hello-2/lib/arm/liblayaair.so (_ZN4laya7__JSRun3RunEPKc+162)
2019-03-15 08:45:13.439 8214-8265/com.layabox.hello A/art: art/runtime/java_vm_ext.cc:470]   native: #15 pc 0012ce1d  /data/app/com.layabox.hello-2/lib/arm/liblayaair.so (_ZN4laya12imp_JS2CFuncIPFvPKcEE4callERKN2v820FunctionCallbackInfoINS6_5ValueEEE+44)
2019-03-15 08:45:13.439 8214-8265/com.layabox.hello A/art: art/runtime/java_vm_ext.cc:470]   native: #16 pc 00003947  /data/app/com.layabox.hello-2/lib/arm/libv8.cr.so (???)
2019-03-15 08:45:13.439 8214-8265/com.layabox.hello A/art: art/runtime/java_vm_ext.cc:470]   native: #17 pc 0005c46b  /data/app/com.layabox.hello-2/lib/arm/libv8.cr.so (???)
2019-03-15 08:45:13.439 8214-8265/com.layabox.hello A/art: art/runtime/java_vm_ext.cc:470]   native: #18 pc 0005bf2b  /data/app/com.layabox.hello-2/lib/arm/libv8.cr.so (???)
2019-03-15 08:45:13.439 8214-8265/com.layabox.hello A/art: art/runtime/java_vm_ext.cc:470]   native: #19 pc 00000098   (???)
2019-03-15 08:45:13.439 8214-8265/com.layabox.hello A/art: art/runtime/java_vm_ext.cc:470]   (no managed stack frames)
2019-03-15 08:45:13.439 8214-8265/com.layabox.hello A/art: art/runtime/java_vm_ext.cc:470] 
2019-03-15 08:45:13.624 8214-8265/com.layabox.hello A/art: art/runtime/runtime.cc:422] Runtime aborting...
2019-03-15 08:45:13.624 8214-8265/com.layabox.hello A/art: art/runtime/runtime.cc:422] Aborting thread:
已邀请:

要回复问题请先

商务合作
商务合作