为什么cocos2dx3.4环境搭建 配置完jdk后,配置其他的打开setup.py就闪退是怎么回事

粮食酒在慈灌里放了好长时间没了是怎么回事,女人屁股后同时有屁眼和逼么?
友情链接:cocos2d-3-0&alpha1&之Android交叉编译
首先了解一些基本概念:
JDK、SDK、JRE、JVM概念详解
10:41 飞翔的叶子 百度空间 字号: |
/art/755.htm
JDK、SDK、JRE、JVM概念的理解是什么呢?我们经常在进行初级学习的时候JDK、SDK、JRE、JVM概念老是混淆,那么本文讲给你点启示。
JDK、SDK、JRE、JVM概念的认识我们可以通过HelloWorld来理解这几个缩写词的具体含义:
public&class&HelloWorld&{
&&public&static&void&main(String[]&args)&{&
&&&System.out.println("helloworld");&
编译之后, 我们得到了HelloWorld.class(图中的"Your program's class files")
在HelloWorld里面, 我们调用了 JAVA API中的 java.lang.System这个类的静态成员对象 out,
out 的静态方法: public static void println(String string);
然后我们让虚拟机器来执行这个HelloWorld。
1. 虚拟机会在classpath中找到HelloWorld.class。
2. 虚拟机中的解释器(interpret)会把HelloWorld.class解释成字节码。
3. 把解释后的字节码交由execution engin执行。
4. execution engin会调用native method(即平台相关的字节码)来在host
system的stdout(显示器)的指定部分打印出指定的字符串。
5. 这样, 我们就看到"helloworld"字样了。
有了这个流程后, 我们就好理解上面几个术语了:
◆JDK: Java develop kit (Java 开发包)
◆SDK: software develop kit, 以前JDK 叫做Java software develop kit,
后来出了1.2版本后, 就改名叫JDK了, 省时省力, 节约成本。
◆JRE. Java runtime environment
我们的helloworld必须在JRE(Java运行环境,Java运行环境又叫Java平台)里面, 才能跑起来。 所以, 显然地,
JRE其实就是JDK + JVM
◆JVM Java virtual machine. 简单地讲, 就是把class文件变成字节码, 然后送到excution
engin中执行。 而为什么叫虚拟机, 而不叫真实机呢? 因为JVM本身是又不能运算, 又不能让显示器显示"helloworld"的,
它只能再调用host system的API, 比如在w32里面就会调c++的API, 来让CPU帮他做做算术运算,
来调用c++里面的API来控制显示器显示显示字符串。 而这些API不是JDK里面有的,我们平时又看不见的,所以我们就叫它native
◆解释平台无关。 有人会说, 在linux的里面调用native api与w32里面调用的api肯定不一样吧?
那为什么说Java是平台无关的呢?
其 实是这样的, 君不见里面又有jdk-for-w32又有jdk-for-linux下载吗? 刚才不是说了吗?
native api, native api, 就是我们平时看不见的api吗! 调用native这些烦琐的活儿都让jdk去做了。
所以我们调用的时候只用知道jdk(Java api) 里面的java.io.*能提供磁盘访问功能, java.awt.*
能画个框框画个圆圆就行了吗。 至于JDK又是怎么调用的, 在LINXU上更圆呢?
还是在W32上更圆,这个就是JDK个人的事情了。(理论上讲是一样圆的, 当然这又和显示器是否纯平相关了)
同时, 这里就引申出了另一个话题。 既如何编写平台无关的Java程序。 其中关键的一条, 就是调用且只调用jdk中的API,
而不要私自调用native api。 原因很简单啊, JDK-for-linux和JDK-for-w32表面都是一样的,
所以我在w32里面调用JDK写的Java程序,在linux里面也会一样的写法啊,
所以就可以移植来移植去都没问题。但是如果我在w32里面调用了 一个图形显示的native api, 当我移植到linux去的时候,
谁又能保证里面也有相同名称, 相同参数,相同返回值, 相同功能的native api供我调用呢!
以上就是JDK、SDK、JRE、JVM概念详解的介绍,其中的含义还需要慢慢琢磨... ...
Android SDK and ADT:
网站: /sdk/index.html
The Android SDK provides you the API libraries and developer tools necessary to build,
test, and debug apps for Android.
If you're a new Android developer, we recommend you download the ADT Bundle to quickly start developing apps.
It includes the essential Android SDK components and a version of
the Eclipse IDE with built-in ADT (Android Developer Tools)
to streamline your Android app development.
With a single download, the ADT Bundle includes everything you
need to begin developing apps:
Eclipse + ADT plugin
Android SDK Tools
Android Platform-tools
The latest Android platform
The latest Android system image for the emulator
/tools/sdk/ndk/index.html#Installing
The NDK is a toolset that allows you to implement parts of your
app using native-code languages such as C and C++. For certain
types of apps, this can be helpful so you can reuse existing code
libraries written in these languages, but most apps do not need the
Android NDK.
Before downloading the NDK, you should understand that
the NDK will not benefit most apps. As a
developer, you need to balance its benefits against its drawbacks.
Notably, using native code on Android generally does not result in
a noticable performance improvement, but it always increases your
app complexity. In general, you should only use the NDK if it is
essential to your app—never because you simply prefer to program in
Typical good candidates for the NDK are self-contained,
CPU-intensive operations that don't allocate much memory, such as
signal processing, physics simulation, and so on. When examining
whether or not you should develop in native code, think about your
requirements and see if the Android framework APIs provide the
functionality that you need.
The Android framework provides two ways to use native code:
Write your application using the Android framework and use JNI
to access the APIs provided by the Android NDK. This technique
allows you to take advantage of the convenience of the Android
framework, but still allows you to write native code when
necessary. If you use this approach, your application must target
specific, minimum Android platform levels, see
for more information.
Write a native activity, which allows you to implement the
lifecycle callbacks in native code. The Android SDK provides the
class, which is a convenience class that
notifies your native code of any activity lifecycle callbacks
(onCreate(), onPause(),
onResume(), etc). You can implement the callbacks in
your native code to handle these events when they occur.
Applications that use native activities must be run on Android 2.3
(API Level 9) or later.
You cannot access features such as Services and Content
Providers natively, so if you want to use them or any other
framework API, you can still write JNI code to do so.
http://en.wikipedia.org/wiki/Java_Native_Interface
The Java Native Interface (JNI) is a
that enables
code running in a
(JVM) to call and be called
by native applications (programs specific to a hardware and
platform) and libraries
written in other languages such as ,
JNI是Java Native
Interface的
缩写,中文为JAVA本地调用。从Java1.1开始,Java Native
Interface(JNI)标准成为java平台的一部分,它允许Java代码和其他语言写的代码进行交互。JNI一开始是为了本地已编译语言,尤其是
C和C++而设计的,但是它并不妨碍你使用其他语言,只要调用约定受支持就可以了。使用java与本地已编译的代码交互,通常会丧失平台可移植性。但是,
有些情况下这样做是可以接受的,甚至是必须的,比如,使用一些旧的库,与硬件、操作系统进行交互,或者为了提高程序的性能。JNI标准至少保证本地代码能
工作在任何Java虚拟机实现下。
下面开始解读cocos2d-x-3-0的交叉编译:
一下内容转载至:
/ezhong/p/3482696.html
/ezhong/p/3487206.html
/ezhong/p/3484186.html
看了下 cocos2d-x 3.0 alpha1 几个关于android的脚本
&cocos2d-x\tools\project-creator\create_project.py
&cocos2d-x\tools\android-mk-generator\android_mk_generator.py
&cocos2d-x\projects\$(your-proj-name)
\proj.android\build_native.py
& & create_project.py 里是将
cocos2d-x\template里的工程改了个名字放入了 cocos2d-x\projects下面
& 我一直以为是自动生成各个IDE的工程文件....&&
&android_mk_generator.py
根据cocos2d-x下面的指定目录下cpp文件变化情况,自动更新指定目录下的
Android.mk文件.具体由cocos2d-x\tools\android-mk-generator\config.py指定.
& 这个貌似是需要原始的Android.mk文件,只是更新c/cpp文件.
& 而不会自动更新其他类似&LOCAL_MODULE 的
值,那些值只是拷贝
build_native.py 通过环境变量获取NDK 安装目录,当前工程目录,cocos2d-x跟目录
& &编译当前工程,最后组合命令类似:
E:\T_GIT\android_dep\android-ndk-r8e\ndk-build -C
your-proj-name
NDK_MODULE_PATH=cocos2d-x;cocos2d-x/cocos2d-x/cocos
   & 最后调用os.system执行这条命令。
看了看NDK的文档....里面总是莫名的会提下windows需要cygwin环境...
但是cocos2d-x3.0alpha1 中,
  编译samples的python脚本&cocos2d-x3/build/android-build.py
  或者新建工程的python脚本
cocos2d-x3/projects//proj.android/build_native.py
  里面明显没有用到啥cygwin环境.
  python 里 设置了环境变量,然后执行了一条ndk-build命令,ndk编译就完成了.
  最后得出在CMD环境里执行NDK编译的命令:  
E:\py\ccs\projects\jjj\proj.android&E:\T_GIT\android_dep\android-ndk-r8e\ndk-build
-C E:\py\ccs\projects\jjj\proj.android NDK_MODULE_PATH=E:\py\E:\py\ccs\E:\py\ccs\cocos
ANDROID_SDK_ROOT=E:\T_GIT\android_dep\adt_bundle-windows-x86-\sdk
NDK_ROOT=E:\T_GIT\android_dep\android-ndk-r8e
NDK_TOOLCHAIN_VERSION=4.7
  ccs 是cocos2d-x根目录
  jjj 是新建工程名字
  NDK_ROOT 是NDK根目录
  NDK_MODULE_PATH 是 工程jjj/proj.android/jin/Android.mk里依赖的cocos库的
Android.mk 查找路径
    $(call import-module,SDL2-2.0.1)
这样的外部依赖,后面的SDL2-2.0.1只能填相对于NDK_MODULE_PATH的绝对路径
    不能填写依据LOCAL_PATH等推理出来的相对路径.
  ANDROID_SDK_ROOT 是android SDK根目录.
  在jjj/proj.android目录执行命令可以不用 -C 指定jni目录.&
  NDK跟目录设置到windows
PATH的话,可以直接用ndk-build,不用全路径
&--------------------------------------
&python脚本中 ,NDK_MODULE_PATH 、NDK_ROOT
、ANDROID_SDK_ROOT 都设置到了python的环境变量里
    这点比较特殊,在windows 环境变量中增加这些名字的环境变量,没有作用,或者引用环境变量方法不对...
    如果没在CMD命令中指定这些值,编译会报各种找不到的错误.
    但这些设置的变量在python的环境变量os.environ中可以找到.
    ( 11:43:07 windows 环境变量使用方法:
%NDK_ROOT%& ,也使用echo输出)
------------
  理解了下NDK在windows平台下的编译,
  用python脚本真的很方便.
NDK 编译后,用eclipse导入cocos2d-x工程&
    菜单【File】--&【New】--&【Project】 ,弹出New Project 对话框
    窗口下方 选 【Android】 --&【Android Project From Existing
    点击【Next】,Root Directory中选择工程的&proj.android
目录,点击【Finish】。
设置Java Build
    Project Explorer 中,右键工程名字 ,弹出菜单中选择【Properties】,弹出属性菜单
    左侧导航树选择 【Java Build Path 】,右侧选择【Source】 tab 页.
    点击 【Link Source 】按钮,弹出 Link Source窗口
      Linked Folder Location 选择
:&cocos2d-x3.0\2d\platform\android\java\src
      Folder Name 输入一个名字,比如cocosrc。(不能是src). 点击【Finish】。
运行 : 右键工程名字,【run as】 --&【Android Application】
    (右键工程名 ,【Android Tools】 --&【Export Signed Application
Package】/【Export Unsigned Application Package 】
    生成apk。 强烈建议qt creator 也加个这菜单.)
-------------------------------
  1. 模拟器编辑时选上 Use Host GPU ,可以运行Sample 的HellpCpp
  2. eclipse开始没有设置 &Java Build Path 的时候,直接run
as ,也生成了apk,无论真机还是模拟器都无法运行.
    有群友说正常情况不设置这个Java Build Path无法生成apk 。。。不熟悉eclipse真伤神.
  3. 小米2调试:输入神奇的电话号码:&*#*#717717#*#*
  4. eclipse右键 工程,选择 属性 ,选择【C/C++
Build】,可以将ndk编译步骤设置到这里,让eclipse自动编译,
    但我的工程在C/C++ Build 栏只是提示: This project is not a CDT
eclipse build 的时候,自己写的工程老是碰到错误,提示
    “The builder launch configuration could not be found.”
    右键工程属性,左侧选择【Builders】,
    右侧有一项 意思是 "外部编译工具" 的选项出现红色的错号提示,将其
【Remove】掉,就可以正常编译过了。
上一张图:
<img src="/blog7style/images/common/sg_trans.gif" real_src ="/blog/312/b8cbb331d07ff886a173.jpg" ALT=""
TITLE="cocos2d-3-0&alpha1&之Android交叉编译" />
哎,没好图片,用了太多精灵.........慢慢来吧
下面是在Eclipse中直接配置NDK并交叉编译:
网站:/543.html
Cocos2dx交叉编译步骤(Android)
09:36 | 1437次阅读 | <img src="/blog7style/images/common/sg_trans.gif" real_src ="/image/artnews/comment.gif" HEIGHT="12" WIDTH="13"
ALT="cocos2d-3-0&alpha1&之Android交叉编译"
TITLE="cocos2d-3-0&alpha1&之Android交叉编译" />
将编写好的Cocos2dx程序,创建到Eclipse。
New→Project(弹出NewProject对话框),选择→Android Project From
Existing Code;RootDirectory:找到对应项目文件夹下的.android文件夹,OK→Finish。2.
手动拷贝org文件夹
复制cocos2dx根目录\cocosedx\platform\android\java\src\中的org文件夹,到我们android项目中的src文件夹中即可。
配置NDK编译环境
选中目标项目,点击菜单Project→Projectes,在弹出的对话框中选择Builders→New→ProgramLocation:单击BrowseFileSystem...,选择到NDK根目录文件夹中的ndk-build.cmd文件。
workingDirectory:单击BrowseWorkspace,选中当前项目。选择Refresh选项页:选择SpecificResources,并单击SpecifyResources,在弹出的对话框中选择目标项目下的jni文件夹。
越过Envirment,单击BuildOptions,依次勾上“AllocateConsole”,“After a
'Clean'”,“During manual builder”,“During auto builders”,“During a
'Clean'”,“Specify working set of relevant resources”并单击Specify
Resources,在弹出的窗口中选中目标项目下的jni文件夹。4.
复制资源文件
将Cocos2dx项目中Resources文件夹中的所有资源文件复制到我们Android项目中的assets文件夹下,并删除其中所有后缀名为.pvr.gz的文件。
本人未测试以上方法,本人页暂未搞定这个交叉编译,权当学习先,先mark下
以上网友发言只代表其个人观点,不代表新浪网的观点或立场。Easy Guide to setup the cocos2d-x for android in Windows - Cocos2d-x Forum
T14:45:07Z —
Hello All,
I have tried very hard to find the process to get the cocos2d-x project work with Android. I finally succeeded and want you to easily install it without any trouble. Please refer to the below tutorials and let me know in case of any issues. I am as well new to this but I will try my best.
Please note that I have never posted anything in any of the forums and I was not aware how to copy the images between the lines. So, I am attaching the word document which can help you in case of any confusion with this.
Download Android SDK: Instead of downloading only SDK you can download the ADT Bundle which has a collection of Android SDK, Eclipse and Android Plugin for Eclipse. Download the latest version from . Extract ADT. I extracted in my E:Drive. My location of the ADT will beE:~~bundle-windows-x86_64-. My location of the SDK will be E:~~bundle-windows-x86_64-\sdk. Also remember to update the SDK. Select the latest version of API and also the Android 2.2 (API 8).
Download NDK from
. I am using a 64 Bit Windows 8 OS. So, I downloaded the version android-ndk-r9-windows-x86_64.zip. Extract the NDK to your C:Drive. I extracted mine at E:~~ndk-r9
Download and install Cygwin from . Cygwin is a program that enables you to get a Linux feeling on Windows. You can install certain packages on Cygwin and have a minimal Linux like environment. Install Cygwin. When asked to select packages, search for the below packages and install them:autoconf, automake, binutils, gcc-core, gcc-g**, gcc4-core, gcc4-g**, gdb, pcre, pcre-devel, gawk, makeNote: Select the GUI version of make as well otherwise you will not be able to build your project using NDK.
Download JDK from . No matter if you system is 32 bit or 64 bit, you need to download only the 32 bit version. Install Java in C:
Download the latest version of Cocos2d-X. Extract it to your C:Drive. I extracted mine at E:2d-x-2.2
Setup Environment Variables for Java, Cocos2d-x, SDK and NDK:Mine will look like below:COCOS2DX_ROOTE:2d-x-2.2ANDROID_SDK_ROOTE:~~bundle-windows-x86_64-\sdk
NDK_ROOTE:~~ndk-r9JAVA_HOMEC:_32_Bit\jdk1.7.0_40If you are not sure how to set the environment variables here is a quick guide:
Open Cygwin: Right click on the icon and Run as administrator.
We want to create a new cocos2d-x project now. We will create it for all the platforms and select only the android one later.cd \$COCOS2DX_ROOTcd tools/project-creatorNow enter the below command to create a new project:python ./create_project.py~~project TestGame ~~package com.MyCompany.TestGame~~language cpp
A new project will be created under the projects directory. For me it will be in the location E:2d-x-2.2\projects
While running the create_project.py script, If you are seeing some error like:E:2d-x-2.2\tools\project-creator&create_project.py ~~project MyGame~~package com.webfolks.AwesomeGame ~~language cpp File “E:2d-x-2.2\tools\project-creator\create_project.py”, line 63 print "Invalid~~project parameter" \^SyntaxError: invalid syntax
Perform the below steps to fix this issue:Put all the print statements in the create-project.py file in paranthesis.
Original statement: print “Usage: create_project.py-project PROJECT_NAME-package PACKAGE_NAME-language PROGRAMING_LANGUAGE”
Revised statement: print (“Usage: create_project.py-project PROJECT_NAME-package PACKAGE_NAME-language PROGRAMING_LANGUAGE”)
Set Permissions: The problem with the generated new project is that, it is generated using a different user in windows and our actual login will not have access to copy or modify it. For this to work, right click on the generated project folder ‘TestGame’ go to the Security Tab, click Advanced and select the first option. Allow, Everyone, Full Control, This folder subfolders and files. Screen shots below.Also check the option ‘Replace all child object permission entries with inheritable permission entries from this object’ This will modify the permissions for all subfolders.
Now we are done creating a project. To import this to Android we need to build the generated project with NDK. To do this go to cygwin and navigate to the TestGame folder that we created.Now go to the proj.android folder. Here, we need to run the build_native.sh script. Enter the command:./ build_native.sh
It will take a while for the build to complete.
Most of you might see an error like:cygwin warning: MS-DOS style path detected: E:~~ndk-r9/ndk-build Preferred POSIX equivalent is: /cygdrive/e/android-ndk-r9/ndk-buildOne way to fix this is to go the environment variables and change the NDK_ROOT from E:~~ndk-r9 to /cygdrive/e/android-ndk-r9/ndk-build . If you do this you need to restart cygwin and run the build_native.sh.
I prefer an alternate method where I will edit the build_natiive.sh file and set the NDK_ROOK temporarily.
In Windows, go to the newly created project folder ‘proj.android’ and then navigate to proj.android. Here you will see a file called build_native.sh. Open this file in any of the text editor and add the below line in the second line:
set \$NDK_ROOT = “/cygdrive/e/android-ndk-r9/ndk-build”;
With this step there is no need to restart cygwin.
Now, in cygwin go to the newly created project folder and go to the proj.android folder. Now run the command :./ build_native.shIt would take a while for your project to be built.
Once this is done copy the entire project to any other location, I choose Desktop\Cocos_Games. Open Eclipse(Remember, you dowloaded the ADT from Android site for SDK and Eclipse), and import the new project. File & Import & Existing Android Code Into Workspace & NextIn the Root Directory click on Browse and navigate till proj.android and click ok.Note: Do not select ‘Import to Workspace’ Option.
You will see some errors in the imported project saying that it certain cocos2d import statements failed to be imported. To fix this follow the below steps(Thanks to Paras Mendiratta):
1: In Eclipse, right-click on your project and select the last option “properties”.2: In Project Properties window, select “Java Build Path” in the left pane.3: Under Java Build Path, select tab “source”. It should be selected by default.4: Click on button “Link Source”5: Browse it to following location-& COCOS2D-X_INSTALLATION_FOLDER/cocos2dx/platform/android/java/src. My path will be: E:2d-x-2.2\cocos2dx\platform\android\java\src6: Give any folder name. For example, remove src and replace it with: Cocos2d-x-source. Click Finish.We are done now. Run your poject on an Andorid Device and it should show you the nead cocos2d-x logo. Please note that running this in an Android Virtual Machine may not always work.
(199.3 KB)
T01:06:57Z —
It looks great. Thank you.On the other hand, I am trying to build for android via MSVC 2012 Express + vs-android (/p/vs-android/). See if I could get positive results
T01:44:38Z —
I am using VS 2010 Ultimate and it worked for me.
Did you do this step?For Vista or Windows 7 you will need to right click ‘install_vs20XX.cmd’, and choose to ’Run as Administrator".
Are you getting any error?
minhntbkhn
T10:55:32Z —
@Sriram Kumar Bikkina : Hi! Thank you for your tutorial. I did it follow your guide conveniently from start to 11th step. But on the 12th step, when I import my project into Eclipse, I have a error like:program “bash” is not found in PATHI’m a beginner. Please help me for this problem. Thank a lot
T16:09:04Z —
Hi Nquyen,
In Step 11, did you compile with ./build_native.sh (I meant did you add “./” before the shell script?)
Also can you let me know the version of Eclipse you are using? Is it downloaded from the Android Developer Site?
Also please confirm if you are only importing the proj.android folder.
Nguyen Truong Minh wrote:
@Sriram Kumar Bikkina : Hi! Thank you for your tutorial. I did it follow your guide conveniently from start to 11th step. But on the 12th step, when I import my project into Eclipse, I have a error like:program “bash” is not found in PATHI’m a beginner. Please help me for this problem. Thank a lot
minhntbkhn
T17:40:30Z —
@Sriram Kumar Bikkina : Thank you for the reply! I did it step by step, until Step 11, I typed “sh build_native.sh”. And I also downloaded the latest version of “ADT Bundle”. In Step 12, I imported the project by navigating till proj.android folder. Please look at this picture : [[/albums/tt173/minhnt_bkhn/Untitled_zpsf5c3f9a0.jpg]] . Please tell me when you find any mistakes. Thank you !
JairHumberto
T23:52:56Z —
Hello, How can I find the gcc4-core and gcc4-g++ cygwin packages? I found the others except this two. :/
T01:05:59Z —
Sriram Kumar Bikkina wrote:
I am using VS 2010 Ultimate and it worked for me.&Did you do this step?For Vista or Windows 7 you will need to right click ‘install_vs20XX.cmd’, and choose to ’Run as Administrator".&Are you getting any error?
Problem is that I am able to compile sample vs-android project while I do not know how to setup for cocos2d-x projects:)
T02:05:24Z —
That is the problem with VS Android. No where they mentioned about how to create a new project. When I googled, I found that there is no way to create a new project with vs-adnroid. Only thing you can do is to edit one of the sample projects and start building your project.winipcfg exe wrote:
Sriram Kumar Bikkina wrote:& I am using VS 2010 Ultimate and it worked for me.&& Did you do this step?& For Vista or Windows 7 you will need to right click ‘install_vs20XX.cmd’, and choose to ’Run as Administrator".&& Are you getting any error?&Problem is that I am able to compile sample vs-android project while I do not know how to setup for cocos2d-x projects:)
T02:11:30Z —
Just try the search work ‘GCC’ and you will find a lot of packages. In the install the below list and as well any others which you think would be necessary.
cygwin32-gcc-core: GCC for Cygwin 32bit toolchain (C, OpenMP)gcc-core: GNU COmpiler Collection (C, OpenMP)gcc-g**: GNU Complier CollectionGCC C runtime library
Jair Humberto da Silva Filho wrote:
Hello, How can I find the gcc4-core and gcc4-g** cygwin packages? I found the others except this two. :/
T02:36:29Z —
You do not need Cygwin for Windows Android.
Cygwin will just make it too complex. use ndk-build.cmd
T04:43:37Z —
Hi Nguyen,
I did check this again and did not see any issues on my PC. I googled as well on this error and I found that it might be related to the issues with the NDK Build. So, I think your code might not be properly build for android using NDK. I suggest you go through some alternative way to build your native code using NDK. Cory Trese suggested a good way to go with this.
Nguyen Truong Minh wrote:
@Sriram Kumar Bikkina : Thank you for the reply! I did it step by step, until Step 11, I typed “sh build_native.sh”. And I also downloaded the latest version of “ADT Bundle”. In Step 12, I imported the project by navigating till proj.android folder. Please look at this picture : [[/albums/tt173/minhnt_bkhn/Untitled_zpsf5c3f9a0.jpg]] . Please tell me when you find any mistakes. Thank you !
T15:44:05Z —
Sriram Kumar Bikkina wrote:
That is the problem with VS Android. No where they mentioned about how to create a new project. When I googled, I found that there is no way to create a new project with vs-adnroid. Only thing you can do is to edit one of the sample projects and start building your project.winipcfg exe wrote:& Sriram Kumar Bikkina wrote:& & I am using VS 2010 Ultimate and it worked for me.& && & Did you do this step?& & For Vista or Windows 7 you will need to right click ‘install_vs20XX.cmd’, and choose to ’Run as Administrator".& && & Are you getting any error?&& Problem is that I am able to compile sample vs-android project while I do not know how to setup for cocos2d-x projects:)
I am trying to convert the win32 solution to Android. After updating definitions, configurations and seems like everything is still like a mess
Is it possible to give us some tips on how to setup and compile a cocos2d-x sample? Thanks.
T20:29:38Z —
Jair Humberto da Silva Filho wrote:
Hello, How can I find the gcc4-core and gcc4-g++ cygwin packages? I found the others except this two. :/
Configuring stuff these days is such a nightmare and all the missing pieces to find, conflicts and where do I have to jump through what hoops to get this piece of junk to build…
What would be heroic, if someone would build a virtual machine, (VMWare, Virtual PC, Virtual Box, whatever) that had an O/S (any I don’t care but Linux would be legal) and a pre-installed Cocos2dx development environment for Android development.
That would be would get kudos by the bucketful from me.
I’ve been messing about with SailfishOS SDK, Tizen SDK, and other useless pieces of crap. I am thoroughly sick and tired of installing things that don’t work, require conflicting plugins or are just thoroughly a sick joke. There is no Windows8 installer and the Windows7 installer won’t install on Windows8, the OS-X installer won’t install on the current version of OS-X because it seems to rely on an OS-X version two whole point releases ago. Back to Cocos2dx, Windows Phone8 won’t even build release versions out of the box, how hard can it be to change the freaking drop down from Debug to Release before packaging a build.
I am just so over installing stuff that does not work out of the box, without spending days trying to resolve conflicts of some kind or another. I just want to creating not spend my time tweaking utterly worthless useless rubbish. Instead we have this just follow this easy 13 step plan, maybe just maybe you won’t stuff one of them up, maybe just maybe there won’t be some freaking missing dependancy or some useless conflict with something else.
I will probably never ever buy a SailfishOS or Tizen phone just because the time I’ve wasted trying to get their gao shi development environments to work.
I’ve never ever been able to get a dev environment for Cocos2dx for Android to work properly but I’ve been able to create 12 apps in the apps store with iOS (including Cocos2d) because shit just works out of the box in xcode.
Don’t waste my time trying to config stuff or jump through hoops to get a feaking release build to work.
JairHumberto
T00:45:12Z —
Hello Regan Russell, I understand you completely. Good people try to help, like our friend Sriram Kumar Bikkina. But unfortunately, what you said is what happens.
T01:45:00Z —
Regan, I understand your frustration on setting up cocos2d-x. I myself worked hard on a trail and error basis for almost a week and then succeeded in installing cocos2d-x on a windows machine. I can say that this time was well wasted. I figured out there might be fellas’ like me and wanted to help them to easily setup cocos2d-x. That’s the reason I wrote this guide.
Regan Russell wrote:
Jair Humberto da Silva Filho wrote:& Hello, How can I find the gcc4-core and gcc4-g++ cygwin packages? I found the others except this two. :/&Configuring stuff these days is such a nightmare and all the missing pieces to find, conflicts and where do I have to jump through what hoops to get this piece of junk to build…&What would be heroic, if someone would build a virtual machine, (VMWare, Virtual PC, Virtual Box, whatever) that had an O/S (any I don’t care but Linux would be legal) and a pre-installed Cocos2dx development environment for Android development.&That would be would get kudos by the bucketful from me.&I’ve been messing about with SailfishOS SDK, Tizen SDK, and other useless pieces of crap. I am thoroughly sick and tired of installing things that don’t work, require conflicting plugins or are just thoroughly a sick joke. There is no Windows8 installer and the Windows7 installer won’t install on Windows8, the OS-X installer won’t install on the current version of OS-X because it seems to rely on an OS-X version two whole point releases ago. Back to Cocos2dx, Windows Phone8 won’t even build release versions out of the box, how hard can it be to change the freaking drop down from Debug to Release before packaging a build. &I am just so over installing stuff that does not work out of the box, without spending days trying to resolve conflicts of some kind or another. I just want to creating not spend my time tweaking utterly worthless useless rubbish. Instead we have this just follow this easy 13 step plan, maybe just maybe you won’t stuff one of them up, maybe just maybe there won’t be some freaking missing dependancy or some useless conflict with something else.&I will probably never ever buy a SailfishOS or Tizen phone just because the time I’ve wasted trying to get their gao shi development environments to work.&I’ve never ever been able to get a dev environment for Cocos2dx for Android to work properly but I’ve been able to create 12 apps in the apps store with iOS (including Cocos2d) because shit just works out of the box in xcode.&Don’t waste my time trying to config stuff or jump through hoops to get a feaking release build to work.&R.
T02:24:28Z —
I’ve been a paid coder since 1988, so I am a grumpy old fart having a major melt down.
However, here is my experiences with Cocos2d:iOS— Install xcode, cocos2d, churn out a dozen apps about half are cocos2d apps. Everything just works. I configure nothing, nada, nil, zilch, zip.
Windows Phone————— Install Visual Studio, install a version of cocos2d much older than the current one. Build a cocos2d app. Jump through hoops trying to get the release build to work..Write up something on the wiki about working with the older version for WP8 Audio works in debug, release build - no audio, post on these forums, no help.Sit down with a Microsoft support Engineer in the local Microsoft building, he couldn’t work it out either. Release a crappy game with no audio -
Download the current version of cocos2d for Windows Phone, build debug, test, works okay, good, now switch to release on the drop down in VS, won’t even build..
I’ve done nothing but change a drop down and within 10 minutes of downloading the latest version I’m giving up on it.
Android——-Attempt to mess about with the Android SDK, NDK, and whatever on 3 different platforms (OS-X, Linux, Windows), get annoyed enough to wander off and kick something, each time. Not even to the point of working with Cocos2d.
Sriram Kumar Bikkina wrote:
Regan, I understand your frustration on setting up cocos2d-x. I myself worked hard on a trail and error basis for almost a week and then succeeded in installing cocos2d-x on a windows machine.So thanks for providing this guide. Damn shame that stuff doesn’t just work and you have to waste a week trying to figure stuff out. Personally, I hate guessing games.
Now, you darn kids git orf my lawn
JairHumberto
T03:34:50Z —
The python package should be included among the cygwin packages, and gcc4-core and gcc4-g*+ should be removed, once gcc-core and gcc-g*+ are mentioned already.
Well, finally I arrived at the twelfth step, but unfortunatelly, the same error Nguyen got, happened to me :/
however, this tutorial is great! Congratulations, you was a real warrior discovering everything.
JairHumberto
T03:51:27Z —
I found the solution for the problem above in
But, now, I got the following problem“\* Android NDK: Aborting. .Stop.”
minhntbkhn
T09:23:02Z —
@Jair Humberto da Silva: I also did follow the guide in that link, fortunately my problem is solved .

我要回帖

更多关于 cocos2dx3.6环境搭建 的文章

 

随机推荐