Welcome 微信登录

首页 / 操作系统 / Linux / Qt for Android配置详细教程(Ubuntu 11.04)

参考:http://www.linuxidc.com/Linux/2011-07/39582.htm一.环境搭建1. Java 下载安装:->jdk-6u25-linux-i586.binurl: http://www.oracle.com/technetwork/java/javase/downloads/jdk-6u25-download-346242.html->  1、jdk-1_5_0_06-linux-i586.bin下载到/usr/soft,赋予可执行权限:chmod 755 jdk-1_5_0_06-linux-i586.bin2、执行:./jdk-6u25-linux-i586.bin    空格键翻页,到最后输入yes3、配置环境变量:在/etc/profile 中加入:export  PATH=/usr/soft/jdk*.*/bin:$PATHexportJAVA_HOME=/usr/soft/jdk*.*.*4、运行:source /etc/profile  使配置文件生效5、运行:java -version,显示jdk版本,jdk安装成功->linux操作系统可能默认会安装有openjdk需要将自己安装的Java设置为默认的:sudoupdate-alternatives --install /usr/bin/java java /usr/local/jdk1.6.0_26/bin/java11602. git GIT 是用于 Linux 开发的版本控制工具-> unbutu 11.04 安装:sudo apt-get install git git-core3. Android SDK->http://developer.android.com/sdk/index.html->解压下载的SDK文件 到 <Android_SDK_Path>例如:/usr/local/bin/android-sdk-linux_x86-1.5_r2->修改/etc/profile 文件->export PATH=${PATH}:<Android_SDK_Path>/tools例如:export PATH=${PATH}:<SDK_Path>/android-sdk-linux_x86-1.5_r2/tools->save->restart->输入: sudoandroid->通过弹出界面配置SDK(此时的SDK并未安装完成,需要通过网络完成全部安装)。->在Settings 处勾选 force https://......->在AvailablePackages 处 勾选要安装的包->Install Selectted 进行安装->android avd配置信息的生成->android avd的创建格式为:androidcreate avd -n your-avd-name -t your-targets->其中: -n的参数为我们要创建的avd的名字;-t的参数为Available Android     targets的id,我们可以使用命令:android list查寻其具体信息。->$android listAvailableAndroid targets:id:1Name: Android 1.1Type: PlatformAPI level: 2Skins: HVGA-P, HVGA (default), QVGA-P, HVGA-L,QVGA-Lid:2Name: Android 1.5Type: PlatformAPI level: 3Skins: HVGA-P, HVGA (default), QVGA-P, HVGA-L,QVGA-Lid:3.....................->创建avd:$android create avd -n android1.5 -t 2Android1.5 is a basic Android platform.Doyou wish to create a custom hardware profile [no]yesDeviceram size: The amount of physical RAM on the device, in megabytes.hw.ramSize[96]:128Touch-screensupport: Whether there is a touch screen or not on the device.hw.touchScreen[yes]:yesTrack-ballsupport: Whether there is a trackball on the device.hw.trackBall[yes]:yesKeyboardsupport: Whether the device has a QWERTY keyboard.hw.keyboard[yes]:yesDPadsupport: Whether the device has DPad keyshw.dPad[yes]:yesGSMmodem support: Whether there is a GSM modem in the device.hw.gsmModem[yes]:yesCamerasupport: Whether the device has a camera.hw.camera[no]:Camerasupport: Whether the device has a camera.hw.camera[no]:yesMaximumhorizontal camera pixelshw.camera.maxHorizontalPixels[640]:854Maximumvertical camera pixelshw.camera.maxVerticalPixels[480]:480GPSsupport: Whether there is a GPS in the device.hw.gps[yes]:yesBattery support: Whether the device can run on a battery.hw.battery[yes]:yesAccelerometer:Whether there is an accelerometer in the device.hw.accelerometer[yes]:yesAudiorecording support: Whether the device can record audiohw.audioInput[yes]:yesAudioplayback support: Whether the device can play audiohw.audioOutput[yes]:yesSDCard support: Whether the device supports insertion/removal of virtual SDCards.hw.sdCard [yes]:yesCachepartition support: Whether we use a /cache partition on the device.disk.cachePartition[yes]:yesCachepartition sizedisk.cachePartition.size[66MB]:100MBCreatedAVD ""android-sdk-15"" based on Android 1.5->启动模拟器界面: $emulator @android-sdk-15-show-kernel->配置eclipse,使之支持android sdk(安装ADT插件):Eclipse,Help->SoftwareUpdates->Available Software(根据提示进行相应操作)4. Android NDK->http://developer.android.com/sdk/ndk/index.html->解压NDK包到指定目录->配置PATH->修改/etc/profile 文件->  NDKROOT=/usr/local/bin/android-ndk-r5c (用户根据自己的实际安装配置)PATH=$PATH:$NDKROOT->save->restart->测试环境变量:->cd /usr/local/bin/android-ndk-r5c/samples/hello-jni->ndk-build->将看到系统会编译出libhello-jni.so5. 安装necessitashttp://sourceforge.net/projects/necessitas/files/(包括Qt的库,Qt Createrfor Android, 同时可以选择安装NDK 和SDK(但是由于网速问题建议不要选择可以自己安装)):->下载necessitas-0.2-online-sdk-installer-linux->使用 chmod 添加可执行权限->安装过程需要网络环境6. Ministro需要在android上安装Ministro serviceurl: http://sourceforge.net/projects/ministro.necessitas.p/files/ 
  • 1
  • 2
  • 3
  • 4
  • 5
  • 下一页
Shell脚本调试方法Android平台Qt开发入门教程相关资讯      Qt  Android  Ubuntu 11.04 
  • QT 的信号与槽机制介绍  (04月07日)
  • Qt实现文件拆分和融合小工具  (01月08日)
  • Qt入门学习——Qt 5 帮助文档的使  (09/16/2015 08:32:11)
  • Qt不再使用LGPLv2.1授权  (01月14日)
  • 如何在 Ubuntu 中安装 QGit 客户端  (09/26/2015 10:10:09)
  • 在调用Qt库来实现功能过程中的一些  (08/30/2015 08:42:17)
本文评论 查看全部评论 (0)
表情: 姓名: 字数