- iOS/Objective-C 元类和类别
- objective-c - -1001 错误,当 NSURLSession 通过 httpproxy 和/etc/hosts
- java - 使用网络类获取 url 地址
- ios - 推送通知中不播放声音
我正在使用 cocos2d-x
开发游戏 我在 iOS
、MacOS
和 win32
上成功玩了但目前我在尝试在 android 上启动它时遇到问题。编译安装完成 就是无法启动,因为看不懂的问题。有人可以帮助或提示我这个问题吗?
信息:在真实设备上测试,Android 版本 4.4.4.,cocos2d-x-3.13.1,c++,target 4.4.2,eclipse Neon.1a Release (4.6.1),mac os。
如果需要其他信息,我可以提供。
AndroidManifest.xml:
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.companyName.gameName"
android:versionCode="1"
android:versionName="1.0"
android:installLocation="auto">
<uses-sdk android:minSdkVersion="19"/>
<uses-feature android:glEsVersion="0x00020000" />
<application android:label="@string/app_name"
android:icon="@drawable/icon">
<!-- Tell Cocos2dxActivity the name of our .so -->
<meta-data android:name="android.app.lib_name"
android:value="MyGame" />
<activity android:name="org.cocos2dx.cpp.AppActivity"
android:label="@string/app_name"
android:screenOrientation="landscape"
android:theme="@android:style/Theme.NoTitleBar.Fullscreen"
android:configChanges="orientation|keyboardHidden|screenSize">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
</application>
<supports-screens android:anyDensity="true"
android:smallScreens="true"
android:normalScreens="true"
android:largeScreens="true"
android:xlargeScreens="true"/>
<uses-permission android:name="android.permission.INTERNET"/>
<permission android:name="android.permission.INTERACT_ACROSS_USERS_FULL" android:protectionLevel="signature"/>
LogCat(警告、错误、断言):
04-21 09:49:49.917: E/Watchdog(596): !@Sync 1245
04-21 09:49:52.780: W/AlarmManager(596): Set alarm: type= 3 triggerAtTime= 143810266 , called by : com.google.android.gms, intent:Intent { cmp=com.google.android.gms/.lockbox.LockboxAlarmReceiver }
04-21 09:49:59.997: W/AlarmManager(596): Set alarm: type= 3 triggerAtTime= 143817481 , called by : android, intent:Intent { act=android.intent.action.TIME_TICK flg=0x50000000 }
04-21 09:50:00.157: W/ResourceType(2304): Failure getting entry for 0x010400da (t=3 e=218) in package 0 (error -75)
04-21 09:50:00.157: E/accuweather(2304): [AccuTab_Magagine]>>> UIMK:1463 [0:0] time : 08:50
04-21 09:50:00.177: W/ResourceType(2304): Failure getting entry for 0x010400da (t=3 e=218) in package 0 (error -75)
04-21 09:50:19.917: E/Watchdog(596): !@Sync 1246
04-21 09:50:36.803: W/ContextImpl(25935): Calling a method in the system process without a qualified user: android.app.ContextImpl.startActivity:1255 android.content.ContextWrapper.startActivity:330 android.content.ContextWrapper.startActivity:330 com.samsung.android.MtpApplication.MtpReceiver$3.handleMessage:786 android.os.Handler.dispatchMessage:102
04-21 09:50:36.813: W/ContextImpl(25935): Calling a method in the system process without a qualified user: android.app.ContextImpl.startActivity:1267 android.app.ContextImpl.startActivity:1256 android.content.ContextWrapper.startActivity:330 android.content.ContextWrapper.startActivity:330 com.samsung.android.MtpApplication.MtpReceiver$3.handleMessage:786
04-21 09:50:37.033: W/ActivityManager(596): mDVFSHelper.acquire()
04-21 09:50:37.043: E/MTPRx(25935): started activity for popup
04-21 09:50:37.154: W/ApplicationPackageManager(25935): getCSCPackageItemText()
04-21 09:50:37.204: E/SettingsReceiverActivity(25935): PREF_DONT_ASK_AGAIN : true
04-21 09:50:37.214: W/InputMethodManagerService(596): Window already focused, ignoring focus gain of: com.android.internal.view.IInputMethodClient$Stub$Proxy@42ef9528 attribute=null, token = android.os.BinderProxy@42a655d8
04-21 09:50:38.084: W/ApplicationPackageManager(596): getCSCPackageItemText()
04-21 09:50:40.036: W/ActivityManager(596): mDVFSHelper.release()
04-21 09:50:49.916: E/Watchdog(596): !@Sync 1247
04-21 09:50:52.789: W/AlarmManager(596): Set alarm: type= 3 triggerAtTime= 144530276 , called by : android, intent:Intent { act=android.net.ConnectivityService.action.PKT_CNT_SAMPLE_INTERVAL_ELAPSED flg=0x4000000 }
04-21 09:50:52.849: W/AlarmManager(596): Set alarm: type= 3 triggerAtTime= 143870336 , called by : com.google.android.gms, intent:Intent { cmp=com.google.android.gms/.lockbox.LockboxAlarmReceiver }
04-21 09:50:59.996: W/AlarmManager(596): Set alarm: type= 3 triggerAtTime= 143877482 , called by : android, intent:Intent { act=android.intent.action.TIME_TICK flg=0x50000000 }
04-21 09:51:00.076: W/ResourceType(2304): Failure getting entry for 0x010400da (t=3 e=218) in package 0 (error -75)
04-21 09:51:00.076: E/accuweather(2304): [AccuTab_Magagine]>>> UIMK:1463 [0:0] time : 08:51
04-21 09:51:00.096: W/ResourceType(2304): Failure getting entry for 0x010400da (t=3 e=218) in package 0 (error -75)
04-21 09:51:03.719: E/memtrack(26128): Couldn't load memtrack module (No such file or directory)
04-21 09:51:03.719: E/android.os.Debug(26128): failed to load memtrack module: -2
04-21 09:51:03.900: W/ActivityManager(596): No content provider found for permission revoke: file:///data/local/tmp/MyGame.apk
04-21 09:51:19.915: E/Watchdog(596): !@Sync 1248
04-21 09:51:30.275: W/ApplicationPackageManager(25304): getCSCPackageItemText()
04-21 09:51:42.527: W/ActivityManager(596): No content provider found for permission revoke: file:///data/local/tmp/MyGame.apk
04-21 09:51:43.588: E/PackageManager(596): parse pkg : /data/app/vmdl276537072.tmp
04-21 09:51:43.618: E/PackageManager(596): dexopt start
04-21 09:51:44.980: E/PackageManager(596): dexopt end
04-21 09:51:49.915: E/Watchdog(596): !@Sync 1249
04-21 09:51:53.068: W/AlarmManager(596): Set alarm: type= 3 triggerAtTime= 143930557 , called by : com.google.android.gms, intent:Intent { cmp=com.google.android.gms/.lockbox.LockboxAlarmReceiver }
04-21 09:51:56.111: W/PackageManager(596): verifying app can be installed or not
04-21 09:51:56.331: W/PackageManager(596): Not granting permission android.permission.INSTALL_LOCATION_PROVIDER to package com.companyName.GameName (protectionLevel=18 flags=0x8be46)
04-21 09:51:56.511: W/ApplicationPackageManager(596): getCSCPackageItemText()
04-21 09:51:56.561: W/ApplicationPackageManager(596): getCSCPackageItemText()
04-21 09:51:56.771: W/ApplicationPackageManager(596): getCSCPackageItemText()
04-21 09:51:56.781: W/ApplicationPackageManager(930): getCSCPackageItemText()
04-21 09:51:56.781: W/ApplicationPackageManager(930): getCSCPackageItemText()
04-21 09:51:56.781: E/SamsungIME(1471): mOCRHelper is null
04-21 09:51:56.941: W/ApplicationPackageManager(951): getCSCPackageItemText()
04-21 09:51:58.343: W/ApplicationPackageManager(1195): getCSCPackageItemText()
04-21 09:51:58.453: E/EdmStorageProvider(596): Admin not in database, something went wrong
04-21 09:51:59.103: W/AlarmManager(596): Set alarm: type= 0 triggerAtTime= 1492761134119 , called by : com.android.vending, intent:Intent { cmp=com.android.vending/com.google.android.finsky.services.ContentSyncService }
04-21 09:51:59.344: W/IcingInternalCorpora(1352): getNumBytesRead when not calculated.
04-21 09:51:59.354: E/memtrack(26153): Couldn't load memtrack module (No such file or directory)
04-21 09:51:59.354: E/android.os.Debug(26153): failed to load memtrack module: -2
04-21 09:51:59.504: E/Finsky(25304): [1] com.google.android.finsky.wear.bl.a(847): onConnectionFailed: ConnectionResult{statusCode=API_UNAVAILABLE, resolution=null, message=null}
04-21 09:51:59.814: W/ActivityManager(596): mDVFSHelper.acquire()
04-21 09:51:59.994: W/AlarmManager(596): Set alarm: type= 3 triggerAtTime= 143937482 , called by : android, intent:Intent { act=android.intent.action.TIME_TICK flg=0x50000000 }
04-21 09:52:00.215: W/ActivityManager(596): Permission Denial: getCurrentUser() from pid=26179, uid=10129 requires android.permission.INTERACT_ACROSS_USERS
04-21 09:52:00.245: W/ApplicationPackageManager(26179): getCSCPackageItemText()
04-21 09:52:00.275: W/ActivityManager(596): Permission Denial: getCurrentUser() from pid=26179, uid=10129 requires android.permission.INTERACT_ACROSS_USERS
04-21 09:52:00.615: E/JniHelper(26179): Failed to find static java method. Class name: (null), method name: getCocos2dxPackageName, signature: ()Ljava/lang/String;
04-21 09:52:00.615: W/ResourceType(2304): Failure getting entry for 0x010400da (t=3 e=218) in package 0 (error -75)
04-21 09:52:00.625: A/libc(26179): Fatal signal 11 (SIGSEGV) at 0xfffffff4 (code=1), thread 26179 (peFromTheIsland)
04-21 09:52:00.635: E/accuweather(2304): [AccuTab_Magagine]>>> UIMK:1463 [0:0] time : 08:52
04-21 09:52:00.645: W/ResourceType(2304): Failure getting entry for 0x010400da (t=3 e=218) in package 0 (error -75)
04-21 09:52:00.865: W/SQLiteConnectionPool(1352): A SQLiteConnection object for database '+data+data+com_google_android_gms+databases+metrics_db' was leaked! Please fix your application to end transactions in progress properly and to close the database when it is no longer needed.
04-21 09:52:00.875: W/SQLiteConnectionPool(1352): A SQLiteConnection object for database '+data+data+com_google_android_gms+databases+help_responses_db_18' was leaked! Please fix your application to end transactions in progress properly and to close the database when it is no longer needed.
04-21 09:52:00.875: W/SQLiteConnectionPool(1352): A SQLiteConnection object for database '+data+data+com_google_android_gms+databases+auto_complete_suggestions_db' was leaked! Please fix your application to end transactions in progress properly and to close the database when it is no longer needed.
04-21 09:52:00.875: W/ApplicationPackageManager(1352): getCSCPackageItemText()
04-21 09:52:01.165: W/ActivityManager(596): Force finishing activity com.companyName.GameName/org.cocos2dx.cpp.AppActivity
04-21 09:52:01.206: W/ApplicationPackageManager(596): getCSCPackageItemText()
04-21 09:52:01.216: W/ApplicationPackageManager(596): getCSCPackageItemText()
04-21 09:52:01.516: E/android.os.Debug(596): !@Dumpstate > dumpstate -k -t -z -d -m 26179 -o /data/log/dumpstate_app_error
04-21 09:52:01.596: W/ContextImpl(596): Calling a method in the system process without a qualified user: android.app.ContextImpl.sendBroadcast:1372 com.android.server.analytics.data.collection.application.CrashAnrDetector.broadcastEvent:296 com.android.server.analytics.data.collection.application.CrashAnrDetector.processDropBoxEntry:254 com.android.server.analytics.data.collection.application.CrashAnrDetector.access$100:60 com.android.server.analytics.data.collection.application.CrashAnrDetector$1.onReceive:102
04-21 09:52:01.716: W/ActivityManager(596): Activity pause timeout for ActivityRecord{425a2d00 u0 com.companyName.GameName/org.cocos2dx.cpp.AppActivity t89 f}
04-21 09:52:01.906: W/ActivityManager(596): mDVFSHelper.release()
04-21 09:52:02.577: W/ApplicationPackageManager(596): getCSCPackageItemText()
LogCat(针对应用程序过滤(完整)):
04-21 09:52:00.185: D/ActivityThread(26179): handleBindApplication:com.companyName.gameName
04-21 09:52:00.245: W/ApplicationPackageManager(26179): getCSCPackageItemText()
04-21 09:52:00.265: D/DisplayManager(26179): DisplayManager()
04-21 09:52:00.305: D/dalvikvm(26179): Trying to load lib /data/app-lib/com.companyName.gameName-1/libMyGame.so 0x41ccab70
04-21 09:52:00.615: E/JniHelper(26179): Failed to find static java method. Class name: (null), method name: getCocos2dxPackageName, signature: ()Ljava/lang/String;
04-21 09:52:00.625: A/libc(26179): Fatal signal 11 (SIGSEGV) at 0xfffffff4 (code=1), thread 26179 (peFromTheIsland)
最佳答案
<uses-permission android:name="android.permission.INSTALL_LOCATION_PROVIDER"/>
从 Manifest
文件中删除此权限。您只能使用normal
和Dangerous
权限。
第三方开发者不能向他/她的应用程序授予安装新位置提供程序所需的权限(android.permission.INSTALL_LOCATION_PROVIDER)
。只允许 OEM 安装新的位置提供程序。
编辑
<permission android:name="android.permission.INTERACT_ACROSS_USERS_FULL" android:protectionLevel="signature"/>
编辑
检查包名称我在 AndroidManifest.xml
中看到 com.companyName.gameName
,您正在使用包 com.companyName.GameName
运行您的应用> 和 AppActivity
在 org.cocos2dx.cpp
关于android - Cocos2d-x安装的应用在android上无法启动,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/43537463/
我在将 OALSimpleAudio 导入我的 Cocos 2.X 项目时遇到了很多麻烦。 该应用程序相当大。 我将 Cocos 3.0 导入现有项目的最佳方式是什么? 最终错误如下所示: 这是我到目
Tensorflows object_detection 项目的 labelmaps 包含 90 个类,虽然 COCO 只有 80 个类别。 因此参数num_classes在所有示例配置中设置为 90
我正在使用Cocos2d-x v3.9,并且在iOS模拟器中看到某些行为,该行为仅在执行命令cocos run -p mac时出现。如果我通过XCode构建项目,则不会看到相同的行为。 Cocos和X
我正在使用 Cocos creator 创建一个仅适用于网络浏览器的简单游戏,并且需要实现一个分享到 twiiter 按钮。但我需要用普通的 javascript 来做到这一点。到目前为止,我有这段代
在我的 appDelegate 类中,我有类似这样的代码, while using cocos studio auto glview = director->getOpenGLView();
我有一个渲染循环,我想在后台运行,以便我可以控制播放循环的速度,使其动画缓慢或快速。现在,每次我想使用 Sprite 时,我都会使用 sleep 并在主线程中的 CCRenderTexture 上调用
下面是我的 HelloWorld.h 类: class HelloWorld : public cocos2d::CCLayer { public: HelloWorld(); // Here's a
我想在 cocos 2d 中用手指触摸画线。 -(void) ccTouchesMoved:(NSSet *)inappropriateTouches withEvent:(UIEvent *)eve
我是 cocos creator 和 JavaScript 编程的新手,最近 cocos creator 在其引擎中添加了“集成 Box2D 物理引擎”。我想知道我是否可以使用 ' liquidFun
我能够使用下面的代码和 COCO API 过滤图像,我为我需要的所有类多次执行此代码,这是类别 person 的示例,我这样做了用于 car 等 我现在要做的,是过滤数据集(instances_tra
我一直在检查这个detr repository类别总数为 100,但其中 10 个是空字符串,如图所示 here . 这背后有什么特别的原因吗? 最佳答案 基本上,COCO 数据集在其发布之前已在一篇
对于一个项目,我需要一个可以检测许多不同物体的检测器。为此,COCO 的 90 个类是不够的,因为我希望能够看到更多。 例如,我已经看到 imagenet 有更多的类,但是我找不到训练来检测 imag
在我的一个 iPhone 应用程序中,我需要查明该设备是否有互联网连接。有人帮忙吗? 最佳答案 使用可达性类。 if([self checkInternetConnected] ) {
我想用 Delphi 编写一个简单的编译器用于教育目的。我读过 Coco/R 并发现了 Delphi 的这个实现:http://code.google.com/p/dcocor/ 。据我所知,这是 D
关闭。这个问题需要更多 focused .它目前不接受答案。 想要改进这个问题吗? 更新问题,使其只关注一个问题 editing this post . 关闭 4 年前。 Improve this q
我正在尝试使用 https://github.com/jsbroks/coco-annotator 用 COCO 关键点注释图像以进行姿势估计。如安装部分所述,我克隆了存储库。我安装了 Docker
我正在使用 Mask-RCNN 并希望训练我自己的几类 coco 风格的数据集。一开始,我只有 2 个类(除了背景)。 虽然 Mask-RCNN 带有样本数据集,但它们要么只包含一个类,要么自己生成数
有谁知道如何更新Cocos 2D-x上的标签文本吗?我在cocos studio上创建了一个标签,现在我尝试通过我的代码访问和更改其内容。 我正在寻找 JavaScript 中的具体代码行,但我只在
我有一个 cocos2d-x 场景和上面的 Button。我尝试添加触摸事件监听器并为其提供回调函数: preloadScene.h: ... public: virtual void Do(Touc
我是cocos2d-js游戏开发的初学者,这两天正在学习。我尝试通过 cocos 命令运行我的项目,但它显示的 cocos 命令不被识别为内部或外部命令。我已按照此链接创建并运行项目 http://c
我是一名优秀的程序员,十分优秀!