Android中Unity3d的res文件夹的奇怪大小限制

时间:2014-02-10 10:29:53

标签: android unity3d android-2.3-gingerbread

我有一个包含所有xml文件的res文件夹。 res文件夹的大小约为2.8Mb 我还有一个zip文件,我需要捆绑到res中的原始文件夹 zip文件将res文件夹的大小增加到大约4Mb,这是奇怪的事情开始发生的时候。

我在初始化appcompat ActionBarView时看到了崩溃,但只在2.3和更旧的设备上! 如果res文件夹的大小低于2.8M,那么它也可以在2.3设备上完美运行!

无论res文件夹的大小如何,一切都在4.0及以上的设备上完美运行。

崩溃的后面跟踪是:

E/AndroidRuntime( 9234): FATAL EXCEPTION: main
E/AndroidRuntime( 9234): java.lang.Error: FATAL EXCEPTION [main]
E/AndroidRuntime( 9234): Unity version : 4.2.2f1
E/AndroidRuntime( 9234): Device model : samsung SCH-R760
E/AndroidRuntime( 9234): Device fingerprint: samsung/SCH-R760/SCH-R760:2.3.6/GINGERBREAD/FB14:user/release-keys
E/AndroidRuntime( 9234):
E/AndroidRuntime( 9234): Caused by: java.lang.RuntimeException: Unable to start activity ComponentInfo{com.genina.android.blackjack.view/com.helpshift.HSConversation}: android.view.InflateException: Binary XML file line #25: Error inflating class android.support.v7.internal.widget.ActionBarView
E/AndroidRuntime( 9234): at android.app.ActivityThread.performLaunchActivity(A ctivityThread.java:1651)
E/AndroidRuntime( 9234): at android.app.ActivityThread.handleLaunchActivity(Ac tivityThread.java:1667)
E/AndroidRuntime( 9234): at android.app.ActivityThread.access$1500(ActivityThr ead.java:117)
E/AndroidRuntime( 9234): at android.app.ActivityThread$H.handleMessage(Activit yThread.java:935)
E/AndroidRuntime( 9234): at android.os.Handler.dispatchMessage(Handler.java:99 )
E/AndroidRuntime( 9234): at android.os.Looper.loop(Looper.java:130)
E/AndroidRuntime( 9234): at android.app.ActivityThread.main(ActivityThread.jav a:3691)
E/AndroidRuntime( 9234): at java.lang.reflect.Method.invokeNative(Native Method)
E/AndroidRuntime( 9234): at java.lang.reflect.Method.invoke(Method.java:507)
E/AndroidRuntime( 9234): at com.android.internal.os.ZygoteInit$MethodAndArgsCa ller.run(ZygoteInit.java:912)
E/AndroidRuntime( 9234): at com.android.internal.os.ZygoteInit.main(ZygoteInit .java:670)
E/AndroidRuntime( 9234): at dalvik.system.NativeStart.main(Native Method)
E/AndroidRuntime( 9234): Caused by: android.view.InflateException: Binary XML file line #25: Error inflating class android.support.v7.internal.widget.ActionBarView
E/AndroidRuntime( 9234): at android.view.LayoutInflater.createView(LayoutInfla ter.java:51
E/AndroidRuntime( 9234): at android.view.LayoutInflater.createViewFromTag(Layo utInflater.java:570)
E/AndroidRuntime( 9234): at android.view.LayoutInflater.rInflate(LayoutInflate r.java:623)
E/AndroidRuntime( 9234): at android.view.LayoutInflater.rInflate(LayoutInflate r.java:626)
E/AndroidRuntime( 9234): at android.view.LayoutInflater.parseInclude(LayoutInf later.java:682)
E/AndroidRuntime( 9234): at android.view.LayoutInflater.rInflate(LayoutInflate r.java:619)
E/AndroidRuntime( 9234): at android.view.LayoutInflater.inflate(LayoutInflater .java:40
E/AndroidRuntime( 9234): at android.view.LayoutInflater.inflate(LayoutInflater .java:320)
E/AndroidRuntime( 9234): at android.view.LayoutInflater.inflate(LayoutInflater .java:276)
E/AndroidRuntime( 9234): at com.android.internal.policy.impl.PhoneWindow.setCo ntentView(PhoneWindow.java:235)
E/AndroidRuntime( 9234): at android.app.Activity.setContentView(Activity.java: 1679)
E/AndroidRuntime( 9234): at android.support.v7.app.ActionBarActivity.superSetC ontentView(ActionBarActivity.java:20
E/AndroidRuntime( 9234): at android.support.v7.app.ActionBarActivityDelegateBa se.ensureSubDecor(ActionBarActivityDelegateBase.ja va:175)
E/AndroidRuntime( 9234): at android.support.v7.app.ActionBarActivityDelegateBa se.setContentView(ActionBarActivityDelegateBase.ja va:133)
E/AndroidRuntime( 9234): at android.support.v7.app.ActionBarActivity.setConten tView(ActionBarActivity.java:76)
E/AndroidRuntime( 9234): at com.helpshift.HSConversation.onCreate(HSConversati on.java:47)
E/AndroidRuntime( 9234): at android.app.Instrumentation.callActivityOnCreate(I nstrumentation.java:1050)
E/AndroidRuntime( 9234): at android.app.ActivityThread.performLaunchActivity(A ctivityThread.java:1615)
E/AndroidRuntime( 9234): ... 11 more
E/AndroidRuntime( 9234): Caused by: java.lang.reflect.InvocationTargetException
E/AndroidRuntime( 9234): at java.lang.reflect.Constructor.constructNative(Nati ve Method)
E/AndroidRuntime( 9234): at java.lang.reflect.Constructor.newInstance(Construc tor.java:415)
E/AndroidRuntime( 9234): at android.view.LayoutInflater.createView(LayoutInfla ter.java:505)
E/AndroidRuntime( 9234): ... 28 more
E/AndroidRuntime( 9234): Caused by: java.lang.NullPointerException
E/AndroidRuntime( 9234): at android.support.v7.internal.widget.ActionBarView$H omeView.onFinishInflate(ActionBarView.java:1291)
E/AndroidRuntime( 9234): at android.view.LayoutInflater.rInflate(LayoutInflate r.java:631)
E/AndroidRuntime( 9234): at android.view.LayoutInflater.inflate(LayoutInflater .java:40
E/AndroidRuntime( 9234): at android.view.LayoutInflater.inflate(LayoutInflater .java:320)
E/AndroidRuntime( 9234): at android.support.v7.internal.widget.ActionBarView.< init>(ActionBarView.java:21
E/AndroidRuntime( 9234): ... 31 more

有人遇到过这个问题吗?

0 个答案:

没有答案