
- #Android studio 3.0.1 installer android
- #Android studio 3.0.1 installer code
- #Android studio 3.0.1 installer zip
If the application needs to open "52_hello_mobile/hello.bmp", it needs to beĪt "~/androidprojects/SDL_Tutorial/app/src/main/assets/52_hello_mobile/hello.bmp" when building.Ģ0) Our SDL application is ready to build and run, but first we need to set up our device.
#Android studio 3.0.1 installer zip
Copy the directory inside of the zip we downloaded and place it in the assets directory. "assets" at "~/androidprojects/SDL_Tutorial/app/src/main/assets".
#Android studio 3.0.1 installer code
This will change the name under the App's icon from "SDL App" to "SDL Tutorial".ġ9) At this point the app will run our code but it will fail because it can't load the media files for the tutorial. Build again and you should get no errors.ġ8) Open "~/androidprojects/SDL_Tutorial/app/src/main/res/values/strings.xml" and change "~/androidprojects/SDL_Tutorial/app/src/main/jni/Application.mk" and change Is due to the fact that the project is not set up to us the standard C++ library. Build and you should get a new error in the Gradle build menu. "~/androidprojects/SDL_Tutorial/app/src/main/jni/src/Android.mk" and change "YourSourceHere.c" to "52_hello_mobile.cpp". YourSourceHere.c is a place holder for our application source file so we need to replace it with ours.ĭownload the source for lesson 52 and place 52_hello_mobile.cpp at "~/androidprojects/SDL_Tutorial/app/src/main/jni/src/52_hello_mobile.cpp". It's trying to compile "~/androidprojects/SDL_Tutorial/app/src/main/jni/src/YourSourceHere.c" but can't find it which In this case, the error "No rule to make target" actually means it can't find the file you're asking to compile. Make: *** No rule to make target `~/androidprojects/SDL_Tutorial/app/src/main/jni/src/YourSourceHere.c', needed by `~/androidprojects/SDL_Tutorial/app/build/intermediates/ndkBuild/debug/obj/local/x86/objs-debug/main/YourSourceHere.o'. Make: *** No rule to make target `~/androidprojects/SDL_Tutorial/app/src/main/jni/src/YourSourceHere.c', needed by `~/androidprojects/SDL_Tutorial/app/build/intermediates/ndkBuild/debug/obj/local/armeabi-v7a/objs-debug/main/YourSourceHere.o'. Scroll up a bit and you'll see some errors from the ndk-build. Open up the project window, right click on app and select "Link C++ with Gradle".
#Android studio 3.0.1 installer android
What we need to do is tell Gradle (the build tool used by Android Studio) to use the Android make file for our project.

SDL2 as a shared object that will interface with Java, and we'll build our game as another shared object that will interface with SDL 2.

The Native Development Kit that allows Java to interface with native C/C++ code using the Java Native Interface.

Androidĭevelopment is mostly Java based and SDL is a C based library. Let's back up a bit and talk about how SDL 2 on Android works. This is complaining that the NDK setup is broken for our project. > Error: Your project contains C++ files but it is not using a supported native build system.Ĭonsider using CMake or ndk-build integration with the stable Android Gradle plugin: 14) If you try to hit Build -> Make Project you'll get the following error:Įrror:Execution failed for task ':app:compileDebugNdk'. Build again and you should get a new error.
