dexclassloader和pathclassloader区别
简书链接:dexclassloader和pathclassloader区别文章字数:87,阅读全文大约需要1分钟dexclassloader顾名思义用来加载dex文件,如果用pathclassloader去加载,那么提示 12345Failure to verify dex file '/data/user/0/cn.qssq666.pluginload/app_robot_out_dex/classes.dex': Bad file size (8747008, expected 8746892d) at dalvik.system.DexFile.openDexFileNative(Native Method) at dexclassloader可以指定dex优化目录,而pathclassloader不可以 dexclassloader也可以加载apk pathclassloader和dexclassloader都可以指定sd卡目录apk文件。 应用程序用的classloader是 pathclassloader
官方multidex的加载过程分析然后研究研究能否抄袭一点点技术
简书链接:官方multidex的加载过程分析然后研究研究能否抄袭一点点技术文章字数:557,阅读全文大约需要2分钟1、检测jvm版本,正则 2.1.0 那么就是支持jvm,那么默认是不是进行dex的合并。. doInstallation方法获取到了ApplicationInfo 12345mainContext: Context = {AppContext@4800} sourceApk: File = {File@4821} "/data/app/cn.qssq666.robot-2/base.apk"dataDir: File = {File@4822} "/data/user/0/cn.qssq666.robot"secondaryFolderName: String = {@4823} "secondary-dexes"prefsKeyPrefix: String = {@4824}...
ForfasterbuildsincreasethemaximumheapsizefortheGradledaemo
简书链接:ForfasterbuildsincreasethemaximumheapsizefortheGradledaemo文章字数:226,阅读全文大约需要1分钟 1234567891011o run dex in process, the Gradle daemon needs a larger heap.It currently has 1024 MB.For faster builds, increase the maximum heap size for the Gradle daemon to at least 1536 MB.To do this set org.gradle.jvmargs=-Xmx1536M in the project gradle.properties.For more information see https://docs.gradle.org/current/userguide/build_environment.htmlAGPBI:...
shell脚本存放位置,以及调用作用域
简书链接:shell脚本存放位置,以及调用作用域文章字数:47,阅读全文大约需要1分钟存储位置在/bin, /sbin, /usr/bin,如果要执行的就是这些目录就是xxx,如果是执行当前目录则是./xxx更多参考http://www.runoob.com/w3cnote/shell-quick-start.html查看安装位置which xxx wwindowwhere xxx
erroraddressofoverloadedfunctionexitdoesnotmatchrequiredt
简书链接:erroraddressofoverloadedfunctionexitdoesnotmatchrequiredt文章字数:34,阅读全文大约需要1分钟 2142:150: error: address of overloaded function 'exit' does not match required type 'void'{"a8", "(I)V", (void *) exit},最新版ndk的校验越来越严格了,解决办法是把eixt函数改一下
errorexpectedforfunctionstylecastortypeconstruction
简书链接:errorexpectedforfunctionstylecastortypeconstruction文章字数:17,阅读全文大约需要1分钟 1234aaa/Documents/redpacket/insertqqmodule/src/main/cpp/hlkq.cpp:1290:54: error: expected '(' for function-style cast or type construction if (Constant::hasExceptionAndIntercept(env, char[]{"kick fail "})) { 124: error: expected '(' for function-style cast or type construction if (Constant::hasExceptionAndIntercept(env, char[]{"kick fail...
warningISOC11doesnotallowconversionfromstringliteraltoc
简书链接:warningISOC11doesnotallowconversionfromstringliteraltoc文章字数:73,阅读全文大约需要1分钟 12warning: 'extern' is not permitted on a declaration of a type [-Wmissing-declarations]extern 12warning: ISO C++11 does not allow conversion from string literal to 'char *' [-Wwritable-strings] jmethodIDv 1231:28: warning: ISO C++11 does not allow conversion from string literal to 'char *' [-Wwritable-strings] "install",...
cannotinitializeaparameteroftypejbooleanakaunsignedchar
简书链接:cannotinitializeaparameteroftypejbooleanakaunsignedchar文章字数:69,阅读全文大约需要1分钟 cannot initialize a parameter of type ‘jboolean *’ (aka ‘unsigned char *’) with an rvalue of type ‘bool’错误代码 123456const char *jstringTocharArray(JNIEnv *env, jstring str) { return env->GetStringChars(str,false); } 最新版的jni规范检测牛逼了,出现了一大把错误,查看声明如下 12const char* GetStringUTFChars(jstring string, jboolean* isCopy) 所以要传递的非c的false我找了找语法糖,发现可能是这个,改成JNI_FALSE之后这个错误消失了。
mac笔记本jni错误fatalerrorasmtypeshfilenotfound
简书链接:mac笔记本jni错误fatalerrorasmtypeshfilenotfound文章字数:275,阅读全文大约需要1分钟 开发环境mac笔记本 android studio ndk开发window没毛病。 出现的症状1234567891011121314151617181920212223242526272829ILURE: Build failed with an exception.* What went wrong:Execution failed for task ':app:externalNativeBuildDebug'.> Build command failed. Error while executing process /Users/aaa/Library/Android/sdk/cmake/3.6.4111459/bin/cmake with arguments {--build...
androidstudiopleaseconfigureAndroidSDK
简书链接:androidstudiopleaseconfigureAndroidSDK文章字数:136,阅读全文大约需要1分钟 发生原因mac android studio拉取git请求编译项目提示需要下载ndk,下载完成之后提示这个问题了。 症状 解决办法https://stackoverflow.com/questions/21070268/intellij-idea-13-error-please-select-android-sdk 我的解决办法是重新选择一下android sdk 路径,让他自己修复一下。