
下载 Ant(打包使用),Node.js(下载包),HBuilder(IDE,编写代码,真机调试),Android SDK (Android编译)
加群:245285768
2.配置环境变量:
ANDROID_HOMED:\Program Files\adt\sdk (对应sdk路径)
PathD:\Program Files\apache-ant-1.9.4\bin(对应ant下bin路径)
3.安装ionic等,运行命令提示符(管理员) 输入
a. 将cordova和ionic包安装到全局环境中(可供命令行使用):
[plain] view plaincopyprint?在CODE上查看代码片派生到我的代码片
npm install -g cordova ionic
b. 进入你要创建项目的路径:
[plain] view plaincopyprint?在CODE上查看代码片派生到我的代码片
cd E:\Study\Android\ionic\Project
e:
c. 创建一个名为myApp的还有tabs的项目(ionic start <project-name><optional-template>) 可选模板为sidemenu 侧滑、tabs 底部tab切换、blank 空白):
[plain] view plaincopyprint?在CODE上查看代码片派生到我的代码片
ionic start myApp tabs
d. myApp就为项目名称,进入myApp这个文件夹:
[plain] view plaincopyprint?在CODE上查看代码片派生到我的代码片
cd myApp
e. 添加android平台:
[plain] view plaincopyprint?在CODE上查看代码片派生到我的代码片
ionic platform add android
f. 生成androidapk:
[plain] view plaincopyprint?在CODE上查看代码片派生到我的代码片
ionic build android
g. 在android模拟器或真机中模拟:
[plain] view plaincopyprint?在CODE上查看代码片派生到我的代码片
ionic emulate android
其中f和g可以合并为:
[plain] view plaincopyprint?在CODE上查看代码片派生到我的代码片
ionic run android
即生成apk,并在模拟器或真机中模拟。
4.更新ionic等
a.更新cordova及ionic包
[plain] view plaincopyprint?在CODE上查看代码片派生到我的代码片
npm update -g cordova ionic
b.更新已建ionic项目中的js类库,命令行中先进入项目所在目录,然后运行:
[plain] view plaincopyprint?在CODE上查看代码片派生到我的代码片
ionic lib update
5.展现ionic项目结果(显示在ios和android上的样式)
[plain] view plaincopyprint?在CODE上查看代码片派生到我的代码片
ionic serve --lab
6.查看ionic版本(当前最新版本为1.2.13)
因为MAC下 $(SYSROOT)/usr/include调取的是Mac的include (The problem is that the include file in /usr/include are for Mac OS X)overstack参考
另一个参考
我的方法:
在 android.mk 的LOCAL_C_INCLUDES中去掉$(SYSROOT)/usr/include,
在application.mk中有APP_STL := gnustl_static。
完整文件如下
Android.mk:
[plain] view plaincopyprint?
<code class="language-crystal hljs">LOCAL_PATH := <span class="hljs-variable">$(</span>call my-dir)
<span class="hljs-keyword">include</span> <span class="hljs-variable">$(</span>CLEAR_VARS)
LOCAL_C_INCLUDES += \
<span class="hljs-variable">${</span>NDK_DIR}/sources/cxx-stl/stlport \
<span class="hljs-variable">$(</span>JNI_H_INCLUDE)
LOCAL_SHARED_LIBRARIES += \
libutils
LOCAL_CFLAGS += -O3 -fstrict-aliasing\
-fexceptions -frtti\
-DANDROID_NDK \
-D_STLP_HAS_WCHAR_T \
-DDISABLE_IMPORTGL
LOCAL_MODULE := ddz
LOCAL_SRC_FILES := Socket32.cpp \
GB2Unicode.cpp \
DDzData.cpp \
MD5Checksum.cpp \
biostream.cpp \
TaoJNI.cpp
LOCAL_LDLIBS := -L<span class="hljs-variable">$(</span>SYSROOT)/usr/<span class="hljs-class"><span class="hljs-keyword">lib</span> -<span class="hljs-title">ldl</span> -<span class="hljs-title">llog</span></span>
LOCAL_STATIC_LIBRARIES += -llog\
-L libstlport_static.a
<span class="hljs-keyword">include</span> <span class="hljs-variable">$(</span>BUILD_SHARED_LIBRARY)
</code>
Application.mk:
APP_ABI := armeabi armeabi-v7a
APP_CPPFLAGS += -fexceptions
APP_STL := gnustl_static
APP_CPPFLAGS += -frtti
打开CSDN,阅读体验更佳
编译Android11是遇到kernel出现fatal error: ‘linux/compiler_types.h‘ file not found
1, 在Ubuntu 20.10环境下编译Android 11代码,遇到以下错误: kernel/msm-4.19/include/uapi/linux/stddef.h:2:10: fatal error: 'linux/compiler_types.h' file not found #include <linux/compiler_types.h>^~~~~~~~~~~~~~~~~~~~~~~~ 1 warning and 1 error generated. ...
继续访问
处理Matlab Coder, Compiler can't find "tmwtypes.h"
处理找不到"tmwtypes.h" 当我们使用MATLAB生成c代码用C++项目编译运行时 可能会出现这样的编译问题: can't find "tmwtypes.h" #include "tmwtypes.h" -->出错位置 这是因为我们工程文件里面没有这个.h头文件 而这个头文件是在 MATLAB的安装路径 extern\include\ 文件夹下 我们可以找到这个文...
继续访问
SQLite第三课 源码编译错误以及解决
1)fts2 has a designflaw and has been deprecated2)fts1 has a designflaw and has been deprecated解决方案:解析:FTS1和FTS2都有设计的缺陷,现在已经被废弃,目前已经提供了FTS3或者FTS4,这些作为全文搜索的模块,弥补了以前的FTS1的不足。如果确定不会使用到全文搜索,可以直接...
继续访问
实战-Android 系统读取Uboot环境变量实现
系统层读取Uboot环境变量、实现
继续访问
Beego安装问题:./proc_darwin.h:1:10: fatal error: 'sys/types.h' file not found
问题 在我按照官网的说明安装beego工具时,发生了以下错误 $ go get github.com/beego/bee # github.com/beego/bee/vendor/github.com/derekparker/delve/proc In file included from go/src/github.com/beego/bee/vendor/github.com/derekp...
继续访问
RT-Thread 编译I.MX RT1052时出现无法找到sys/types.h
..\..\..\components\dfs\include\dfs_fs.h(16): error: #5: cannot open source input file "sys/types.h": No such file or directory 下载RTT官方的Gitee上面的LTS版本3.1.3.之后进行编译出现此问题。发现之后尝试编译STM32的程序并没有出现此问题,粗略看一下源码是libc部分出现的,此部分和DFS的存储有直接关系,但是在网上并没有找到解决方案,感觉可能是电脑的libc库缺少
继续访问
Windows和Mac下获取(当前)进程内存占用
Windows下获取进程内存占用 #include <process.h>using namespace stdQString getProcessMemory() { QProcess pint PIDNum = getpid()p.start("tasklist /FI \"PID EQ " + QString::number(PIDNum) + " \"")p.waitForFinished()QString result
继续访问
全志TinaLinux编译错误fatal error: unicode/ucnv.h: No such file or directory
今天开始正式干活了 拿到一个全志Tina的板子还有一个SDK压缩包,要求我这周(只剩一天半。。。)就要把sdk编译通过并且把板子跑起来。 还特别跟我说他们试了下这个sdk编译没法通过,会报错。。。 竟然是有坑! ———————————————————————————————————————————————————————————————— 准备工作: 拷贝解压SDK 阅读Guide手...
继续访问
icu 字符串编码探测及字符串编码转换实例
编译: g++ -o x x.cpp -licuuc -licui18n 请大家确认是否安装icu库 #include #include #include #include #include #define BUF_MAX 4096 /* * data, 传入参数, 需要探测的字符串 * len, 传入参数, 探测字符串长度 * detected
继续访问
linux内核编译报错问题code/include/uapi/linux/types.h:5:10: fatal error: asm/types.h: 没有那个文件或目录
Linux内核编译报错解决办法
继续访问
最新发布 使用SDK中交叉编译工具链clang时,找不到头文件并且找不到/usr/include、/usr/local/include文件夹
使用SDK中交叉编译工具链clang时,找不到头文件并且找不到/usr/include、/usr/local/include文件夹 可使用clang++ -E -x c++ - -v </dev/null命令查看路径状态
继续访问
/usr/include/sys/types.h基本系统数据类型
https://blog.csdn.net/Rong_Toa/article/details/79254677
继续访问
找不到sys/types.h文件
准备下载sys/types.h
继续访问
<asm/types.h>在哪里
在linux中包含头文件时,有不少类似如下的写法:#include,但在linuxkernle的include文件夹下并没有这个文件夹,倒是有不少以asm打头的文件夹,如:asm_powerpc、asm_ppc等。 #include,是由Makefile根据.config内核配置自动生成的,而用make menuconfig 可以生成.config. 用make mrproper 可以清除.c
继续访问
热门推荐 Linux编程#include <sys/types.h>等一些头文件在哪里
在Linux下编写C程序的时候,对于头文件的包含会经常有 #include #include 等等这样的引用。 但是这些文件在哪里呢? 查找发现 一般在/usr/include这个目录下。这是gcc的默认头文件目录 对于子文件夹会在文件名前面加上子文件的名字这就是为什么会出现 sys/types.h的原因了
继续访问
android 动态库 如何编译<sys/types.h>,音视频学习之NDK交叉编译基础
我收集了一些学习用的资料,其中包含了很多学习,面试,中高进阶fluuter资料,还有很多视频详解,如果有同学想进一步了解,详情请看文末。也欢迎各路大神门前来装X。交叉编译交叉编译就是程序的编译环境和实际运行环境不一致,即在一个平台上生成另一个平台上的可执行代码。比如NDK,你在Mac、Win或者Linux上生成的C/C++的代码要在Android平台上运行,就需要使用到交叉编译了。通俗点说就是你的...
继续访问
JNI
Mac
Android NDK
欢迎分享,转载请注明来源:内存溢出
微信扫一扫
支付宝扫一扫
评论列表(0条)