=。=研究了1天接SDK到处都在报错,于是使用logcat查看原因截取到这样的Exception.

call to OpenGL ES API withno current context(logged once per thread)这个BUG,是因为android xml配置屏幕显示和Unity不匹配,导致程序闪退

配合节点:

如果你发现confiChanges和下面不一样,90%就是这个原因,在调用的页面添加以下节点. 上一次我接支付宝的SDK也是遇到这个问题.我想应该也是这个造成的

android:configChanges="fontScale|keyboard|keyboardHidden|locale|mnc|mcc|navigation|orientation|screenLayout|screenSize|smallestScreenSize|uiMode|touchscreen"
android:screenOrientation="landscape"

附上Unity接移动MM AndroidManifest.xml配置

<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.smart.helloZhiFu2"
android:versionCode=""
android:versionName="1.0" > <uses-sdk android:minSdkVersion="" />
<supports-screens android:largeScreens="true" /> <application
android:label="@string/app_name" >
<activity
android:name="com.smart.helloZhiFu2.MainActivity"
android:label="@string/app_name"
android:configChanges="fontScale|keyboard|keyboardHidden|locale|mnc|mcc|navigation|orientation|screenLayout|screenSize|smallestScreenSize|uiMode|touchscreen"
android:screenOrientation="landscape" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity> <service
android:name="mm.purchasesdk.iapservice.PurchaseService"
android:exported="true" > <!-- android:process="mm.iapServices" > -->
<intent-filter android:priority="" >
<action android:name="com.aspire.purchaseservice.BIND" /> <category android:name="android.intent.category.DEFAULT" />
</intent-filter>
<intent-filter android:priority="" >
<action android:name="com.smart.helloZhiFu2.purchaseservice.BIND" />
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
<intent-filter android:priority="" >
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.SAFIAP.COMPONENT" >
</category>
</intent-filter>
</service>
<!-- android:excludeFromRecents="true" -->
<!-- android:launchMode="singleInstance" -->
<activity
android:name="mm.purchasesdk.iapservice.BillingLayoutActivity"
android:configChanges="fontScale|keyboard|keyboardHidden|locale|mnc|mcc|navigation|orientation|screenLayout|screenSize|smallestScreenSize|uiMode|touchscreen"
android:theme="@android:style/Theme.Translucent"
android:screenOrientation="landscape" >
<intent-filter android:priority="" >
<action android:name="com.smart.helloZhiFu2.com.mmiap.activity" />
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
</activity> <!-- android:process="safiap.framework.safframeworkmanager" begin -->
<service
android:name="safiap.framework.SafFrameworkManager"
android:exported="true"
android:process="safiap.framework" >
<intent-filter android:priority="" > <!-- ID for services declared in AIDL -->
<action android:name="safiap.framework.sdk.ISAFFramework" />
</intent-filter>
<intent-filter android:priority="" > <!-- ID for services declared in AIDL -->
<action android:name="safiap.framework.ACTION_START_DOWNLOAD" />
</intent-filter>
<intent-filter android:priority="" > <!-- ID for services declared in AIDL -->
<action android:name="safiap.framework.ACTION_CHECK_UPDATE" />
</intent-filter>
</service>
<!-- receivers -->
<receiver android:name="safiap.framework.CheckUpdateReceiver" >
<intent-filter>
<action android:name="safiap.framework.ACTION_CANCEL_NOTIFICATION" />
</intent-filter>
<intent-filter>
<action android:name="safiap.GET_SHARED_DATA" />
</intent-filter>
<intent-filter>
<action android:name="safiap.framework.ACTION_SET_TIMER" />
</intent-filter>
</receiver> <activity
android:name="safiap.framework.ui.UpdateHintActivity"
android:configChanges="fontScale|keyboard|keyboardHidden|locale|mnc|mcc|navigation|orientation|screenLayout|screenSize|smallestScreenSize|uiMode|touchscreen"
android:excludeFromRecents="true"
android:launchMode="singleInstance"
android:screenOrientation="landscape"
android:theme="@android:style/Theme.Translucent.NoTitleBar" >
<intent-filter>
<action android:name="safiap.framework.ACTION_TO_INSTALL" />
</intent-filter>
<intent-filter>
<action android:name="safiap.framework.ACTION_TO_INSTALL_IAP" />
</intent-filter>
<intent-filter>
<action android:name="safiap.framework.ACTION_NETWORK_ERROR_IAP" />
</intent-filter>
<intent-filter>
<action android:name="safiap.framework.ACTION_NETWORK_ERROR_FRAMEWORK" />
</intent-filter>
</activity> <service
android:name="safiap.framework.logreport.monitor.handler.LogreportHandler"
android:process=":remote" />
<!-- android:process="safiap.framework.safframeworkmanager" end --> <!--taklingData部分-->
<activity android:name="com.unity3d.player.UnityPlayerNativeActivity"
android:label="@string/app_name"
android:configChanges="fontScale|keyboard|keyboardHidden|locale|mnc|mcc|navigation|orientation|screenLayout|screenSize|smallestScreenSize|uiMode|touchscreen">
<meta-data android:name="android.app.lib_name" android:value="unity" />
<meta-data android:name="unityplayer.ForwardNativeEventsToDalvik" android:value="false" />
</activity> <activity android:name="com.unity3d.player.UnityPlayerActivity" android:label="@string/app_name" android:screenOrientation="landscape" android:launchMode="singleTask" android:configChanges="mcc|mnc|locale|touchscreen|keyboard|keyboardHidden|navigation|orientation|screenLayout|uiMode|screenSize|smallestScreenSize|fontScale">
<meta-data android:name="unityplayer.UnityActivity" android:value="true" />
<meta-data android:name="unityplayer.ForwardNativeEventsToDalvik" android:value="false"/>
</activity> </application> <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.READ_PHONE_STATE" />
<uses-permission android:name="android.permission.SEND_SMS" />
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.MOUNT_UNMOUNT_FILESYSTEMS" />
<uses-permission android:name="android.permission.CAMERA" />
<uses-permission android:name="android.permission.READ_CONTACTS" />
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
<uses-permission android:name="android.permission.BLUETOOTH" />
<uses-permission android:name="android.permission.BLUETOOTH_ADMIN" />
<uses-permission android:name="android.permission.SYSTEM_ALERT_WINDOW" />
<uses-permission android:name="android.permission.GET_TASKS"/> </manifest>

Unity 接MM横屏闪退的原因的更多相关文章

  1. unity在安卓中横屏闪退

    竖屏没问题,横屏闪退 配置文件的AndoridManifest.xml横竖屏设置要和UNITY设置的一致,否则就会强退 UNITY横竖屏设置

  2. iOS程序闪退的原因以及处理办法

    iOS程序闪退是一种比较常见的现象.闪退的情况很多,造成程序闪退的原因也很多. ================================启动时闪退======================= ...

  3. eclipse 导出Runnable JAR file ,双击无法执行原因与解决 双击后闪退的原因 批处理java打包文件 @echo off start javaw -jar *.jar

    eclipse 导出Runnable JAR file 导出后如果系统没有JRE,双击无法运行,需要用命令方法 安装后解决,如图 双击后闪退的原因,通过执行 java -jar TingGe.jar ...

  4. Unity3D游戏在iOS上因为trampolines闪退的原因与解决办法

    http://7dot9.com/?p=444 http://whydoidoit.com/2012/08/20/unity-serializer-mono-and-trampolines/ 确定具体 ...

  5. Unity3D 游戏在 iOS 上因为 trampolines 闪退的原因与解决办法

    崩溃的情况 进入游戏一会儿,神马都不要做,双手离开手机,盯着屏幕看吧,游戏会定时从服务器那儿读取一些数据,时间一长,闪退了.尼玛问题是神马呢?完全没有头绪,不过大体猜测是因为网络请求导致的,那么好,先 ...

  6. Tomcat双击startup.bat闪退的原因及解决方式

    很久不碰Tomcat了,最近因为种种原因需要重新投入到Java Web的怀抱,所以又重新接触了Tomcat 我下载了tomcat的压缩包将其解压缩到某个位置,我这里是D盘下的tomcat文件夹中,但是 ...

  7. 启动tomcat出现闪退的原因

    出现闪退的可能有几点: 1.没有安装jdk或者配置jdk是否配置成功 2.找不到jdk安装的路径 3.tomcat环境配置失败 如果是第二点原因(确保第一第三点配置都正确无误)找不到jdk路径的话,可 ...

  8. iOS-中app启动闪退的原因

    这种情况应和所谓的内存不足关系不大,很少有程序会在初始化时载入大量内容导致崩溃,并且这类问题也很容易在开发阶段被发现,所以内存不足造成秒退的可能性低(内存不足退,通常是程序用了一段时间,切换了几个画面 ...

  9. iOS中app启动闪退的原因

    这种情况应和所谓的内存不足关系不大,很少有程序会在初始化时载入大量内容导致崩溃,并且这类问题也很容易在开发阶段被发现,所以内存不足造成秒退的可能性低(内存不足退,通常是程序用了一段时间,切换了几个画面 ...

随机推荐

  1. phpcms 缓存

    PHPCMS设置和读取缓存文件 PHPCMS开发中经常用到读取文件缓存,比如常见的当前站点类别,是保存在缓存文件中的,读取的时候 用:$this->categorys = getcache(‘c ...

  2. feof()

    百度知道 >电脑/网络 >编程语言 >C/C++ feof()这个函数是用来判断指针是否已经到达文件尾部的. 若fp已经指向文件末尾,则feof(fp)函数值为"真&quo ...

  3. 使用 Microsoft.ApplicationBlocks.Data SqlHelper 查询超时以及解决方案

     提示: 后面附有文件,不喜欢看吐槽的,直接到文章结尾下载 摘要:Data Access Application Block 是一个 .NET 组件,包含优化的数据访问代码,可以帮助用户调用存储过程以 ...

  4. 精通CSS+DIV基础总结(二)

    上一篇我们已经总结了部分CSS+DIV相关知识,这篇我们接着总结,从下边几个方面学习一下: 一,我们看如何设置网页的背景,顾名思义背景可以通过颜色和图片来设置,下边我们看一下如何设置: 颜色的设置非常 ...

  5. XSS第二节,XSS左邻右舍

    昨天的文章中引用了OWASP2013年的江湖排名,今天来看一下TOP中XSS的左邻右舍都是谁,先看一下他们的大名,再进一步介绍 [以下主要翻译自https://www.owasp.org/index. ...

  6. 设计一个算法,求非空二叉树中指定的第k层(k&gt;1)的叶子节点的个数

    思想:採用基于层序遍历的方法. 用level扫描各层节点,若某一层的节点出队后.rear指向该层中最右节点.则将rear赋值给last(对于第一层.last=1).在出队时,若front=last,表 ...

  7. [SQL学习笔记][用exists代替全称量词 ]

    学习sql的必经问题. 学生表student (id学号 Sname姓名 Sdept所在系) 课程表Course (crscode课程号 name课程名) 学生选课表transcript (studi ...

  8. docker 数据管理

    一,介于创建docker容器退出或者删除容器数据无法得以保存以及docker容器中的分区较小的问题存在,未解决该问题,可以使用参考以下几种方法. 1,将宿主的目录挂载到容器中去. docker run ...

  9. MongoDB学习笔记01

    MongoDB的设计理念:能从服务器端转移到驱动程序来做的事,就尽量转移. 文档是MongoDB的核心概念.多个键及其关联的值有序的放置在一起便是文档.每种编程语言表示文档的方法不太一样. 文档的键是 ...

  10. (原)mkl的cblas_sgemm和cblas_dgemm

    转载请注明出处: http://www.cnblogs.com/darkknightzh/p/5553336.html 参考网址: mkl-11.3.2-developer-reference-c_0 ...