Quantcast
Channel: cocos2d-x - Cocos Forums
Viewing all articles
Browse latest Browse all 2748

Android on Windows 10 - Cocos2d-x Install Fixes

$
0
0

@ProfessorOak wrote:

Hello everyone,

I spent the past three days trying to get a Cocos2d-x android project to build on my new Windows 10 machine for Android Studio. I had to fix the following issues in order to build and run my project:

JDK Version:

In my experience, the build requirements were spot on except for the JDK version. I tried using the latest JDK version (v12.0.1) when attempting to compile my Cocos2d-x project and it produced a build error. The same happened for JDK v1.6. In the end, I installed the JDK v1.8.0, created a JAVA_HOME Environment Variable, then attempted to compile my Cocos2d-x project and it built successfully!

environment_variable

Gradle Plugin Update:

When I opened my project for the first time in Android Studio the following dialog box appeared.
update

I selected Update and proceeded to build my project.

Merge Assets Error:

After a successful build I received the following warning:

In order to fix it I had to open my App’s proj.android file and update the variant.mergeAssets.doLast line as shown here:

variant_before

Update that line to the following to get rid of the warning:

variant_after

Project Properties:

I had to open the gradle.properties file and remove the default setting for PROP_APP_ABI and set it to x86

app_abi

Build Variants:

The last thing I did was to update the Build Variant for my project CrabApple to debug-x86

build_variants

Final Thoughts:

It was a pain in the butt to get up and running with Cocos2d-x which sucked since this is my first time using a framework for building 2d games. I’m sure this process will continue to get better and I hope that my post will help others who run into the same roadblocks I did.

Posts: 3

Participants: 3

Read full topic


Viewing all articles
Browse latest Browse all 2748

Latest Images

Trending Articles



Latest Images