
android
笙尽缘无
这个作者很懒,什么都没留下…
展开
-
cocos 编译 armeabi-v7a出错
在cocos的安装路径下找一下prebuilt文件夹 进入android 看里面有没有 armeabi-v7a这个文件夹 。没有重新编译一下库文件就好了 cocos gen-libs -p android -m release –app-abi armeabi-v7a原创 2017-03-28 11:42:36 · 1732 阅读 · 0 评论 -
cocos js 3.9 安卓播放视频层级修改
Cocos2dxVideoHelper.java :private void _createVideoView(int index) { Cocos2dxVideoView videoView = new Cocos2dxVideoView(mActivity,index); sVideoViews.put(index, videoView); ...转载 2018-07-20 19:41:00 · 1207 阅读 · 1 评论 -
android 屏幕方向控制
1、屏幕方向参数:ActivityInfo.SCREEN_ORIENTATION_UNSPECIFIED,//未指定,此为默认值。由Android系统自己选择合适的方向。ActivityInfo.SCREEN_ORIENTATION_LANDSCAPE,//横屏ActivityInfo.SCREEN_ORIENTATION_PORTRAIT,//竖屏ActivityInfo.SCREEN_...转载 2018-05-04 17:34:55 · 2537 阅读 · 0 评论 -
debug info: JS: <no filename="filename">:0:too much recursion
我这报错的情况是在浏览器中唤起app,在java里调用js代码的时候报的错Cocos2dxJavascriptJavaBridge .evalString("");在AndroidManifest配置文件里对启动的activity 加上这段就好了android:launchMode="singleTask"原创 2018-01-16 12:56:40 · 488 阅读 · 0 评论 -
cocos 获取手机通讯录
package com.enhance.gameservice;import java.io.InputStream;import java.net.URLDecoder;import java.util.ArrayList;import org.cocos2dx.javascript.AppActivity;import android.content.ContentResolver;imp转载 2017-11-23 17:59:51 · 3121 阅读 · 0 评论 -
cocos 接第三方SDK Can't create handler inside thread that has not called Looper.prepare()解决办法
Looper.getMainLooper() //用于获取主线程的Looper对象。 new Handler(AppActivity.instance.getMainLooper()).post(new Runnable() { @Override public void run() { // TODO Auto-gen转载 2017-11-29 20:37:48 · 342 阅读 · 0 评论 -
cocos android 中文转拼音
import net.sourceforge.pinyin4j.PinyinHelper;import net.sourceforge.pinyin4j.format.HanyuPinyinCaseType;import net.sourceforge.pinyin4j.format.HanyuPinyinOutputFormat;import net.sourceforge.pinyin4j转载 2017-11-29 09:29:42 · 291 阅读 · 0 评论 -
百度SHA1查看
在Java\jdk1.8.0_45\bin 文件里 右键打开命令窗口 keytool -list -v -keystore debug.keystore 就可以了转载 2017-09-18 10:40:10 · 508 阅读 · 0 评论 -
html5 唤起app
html5 测试代码<!DOCTYPE html><html><head> <meta charset="utf-8"></head><body><h1>Test Scheme</h1><!--自动加载隐藏页面跳转--><a id="100" class="arouseApp" href="myscheme://http://196.168.2.1?key=mykey"><s转载 2017-09-05 15:42:25 · 3305 阅读 · 0 评论 -
cocos js 在android ios 打开网页
AppActivity.javapublic static void openUrl(String url) { Uri uri = Uri.parse(url); Intent it = new Intent(Intent.ACTION_VIEW,uri); instance.getContext().s转载 2017-07-04 14:04:48 · 504 阅读 · 0 评论 -
消除“Permission is only granted to system apps”错误
在AndroidManifest.xml中使用了如下的配置:Android:name="android.permission.INSTALL_PACKAGES" />就会报错:Permission is only granted to system apps原因如下:此类权限仅授予系统级应用,可以修改下Link Error Checking项的安全级别;In Ecl转载 2017-06-08 16:52:57 · 253 阅读 · 0 评论 -
android cocos ios文本复制
public void copy(final String str){System.out.println("copyText -- " + str);Runnable runnable = new Runnable() {public void run() {ClipboardManager mClipboardManager = (ClipboardManager)ge转载 2017-05-11 10:59:30 · 313 阅读 · 0 评论 -
图片保存和删除
public static String imageUrl = “”; public static void screenShot(String fullPath, String fileName) throws Exception { fullPath += “/” + fileName; boolean sdcardExist =转载 2017-03-24 15:17:35 · 452 阅读 · 0 评论 -
cocos js android 添加视频循环播放
Cocos2dxVideoView.java:private boolean isLoop = false;//添加方法public void setLooping(boolean loop) { this.isLoop = loop; if(mMediaPlayer!=null){ mMediaPlayer.setLooping(loop); }}/...原创 2018-07-20 19:43:25 · 681 阅读 · 0 评论