go-sdl2-android-example icon indicating copy to clipboard operation
go-sdl2-android-example copied to clipboard

Importing into android studio builds but then fails to launch.

Open Saurbaum opened this issue 7 years ago • 3 comments

I followed the steps in how to build the process but when I try to launch it via android studio I get an error on the ndkBuild task.

task ndkBuild(type: Exec) { commandLine 'ndk-build', 'V=1', '-C', file('.').absolutePath }

I've checked the path is setup so ndk-build is recognised from the terminal but all I get as an error message is.

Error:Execution failed for task ':android:ndkBuild'.

A problem occurred starting process 'command 'ndk-build''

Saurbaum avatar May 13 '17 20:05 Saurbaum

What is the actual error, anything before that? Also, check if there is new version of classpath 'com.android.tools.build:gradle-experimental:0.7.0' That was experimental at that time.

gen2brain avatar May 14 '17 11:05 gen2brain

You can also use ant or gradle, without android studio (mkapk-ant.bash, mkapk-gradle.bash), what happens if you try to build it like that?

gen2brain avatar May 14 '17 12:05 gen2brain

Building this from mkapk-gradle.bash I get the same error. I've also moved up to the 0.9.2 version to see if there's a difference. That's also forced an upgrade to gradle 3.3.

:android:ndkBuild Putting task artifact state for task ':android:ndkBuild' into context took 0.0 secs. Executing task ':android:ndkBuild' (up-to-date check took 0.0 secs) due to: Task has not declared any outputs. Starting process 'command 'ndk-build''. Working directory: C:\Users\ian_n\go-sdl2-android-example\android Command: ndk-build V=1 -C C:\Users\ian_n\go-sdl2-android-example\android --debug :android:ndkBuild FAILED :android:ndkBuild (Thread[Daemon worker Thread 2,5,main]) completed. Took 0.016 secs.

FAILURE: Build failed with an exception.

Saurbaum avatar May 14 '17 18:05 Saurbaum