[Android] Am I able to build my project for API 23?

As the title says, am I really able to do so? The question is that I have Nvidia Shield Tablet with Android version 6.0.1, so I installed Android SDK with API level 23, but when I tried to build my project for my android device, I got tons of errors like: “package org.apache.http does not exist”, etc.

Then I googled about this kind of errors and found out that HttpAndroidClient class was removed from API 23, which causes errors. At this point, is the only solution to force me to use downgraded versions of Android SDK like API 19?

Hey Zikdoz,

Could you please provide me with an uploaded .txt file of the error logs you received from the editor? It would also be helpful if you could provide a screenshot like this:

78885-androidsdk.png

Thanks!

I know that it’s recommended to use AndroidWorks 1R1, but I’m willing to use CodeWorks 1R4 because of it’s an updated version of the same stuff + it has API 23 support, etc.

I’ll provide you my error logs and a screenshot of my Android SDK settings in UE4 in a second.

That’s it.

Hey Zikdoz,

This is the error you’re running in to: Program.Main: ERROR: AutomationTool terminated with exception: ERROR: cmd.exe failed with args /c “C://apache-ant-1.8.2/bin/ant.bat” debug

Please open up the SDK Manager in: C:\android-sdk-windows and download all tools. After that, you should be able to build and package your project.

Let me know if this doesn’t resolve the whole issue, thanks!

I’ve downloaded all the tools, but the issue is still here with another kind of errors: [cook.log][1]

92359-unrealbuildtool-2016.05.28-12.44.48.txt (78.7 KB)

You still have the same issue going on:

BUILD FAILED
C:\android-sdk-windows\tools\ant\build.xml:649: The following error occurred while executing this line:
C:\android-sdk-windows\tools\ant\build.xml:655: null returned: 1

Total time: 6 seconds
UnrealBuildTool Exception: ERROR: cmd.exe failed with args /c “C://apache-ant-1.8.2/bin/ant.bat” debug

Could you please send screenshots of your Android SDK Manager? I’ll be able to compare yours to mine and see what may be missing.

Change SDK API Level to matchndk and change NDK API Level to.

Thank you!

Sure, I’ll give you some a bit later.

But that’s what this topic is all about! I can build without any problems for API 19, but I want to use API 23 :confused:

Android API 23 has trouble with our engine, which is why we suggest you use latest, matchndk or (21). I did verify that using 23 does cause an error with our engine.

SDK API Level set to “latest” will use
the highest number found installed. If
you have API-23 installed, you should
change the SDK API Level from “latest”
to “matchndk” or “android-21” (check
your SDK’s platforms directory for
which versions are available). It is
OK for SDK to be set higher than NDK.

[Android SDK & API 23 Forum Post][1]

Android SDK and API 23 - Mobile - Epic Developer Community Forums

Something I have noticed over the last month, after working with two different computers running Unreal Engine 4 and trying to launch or build for Android devices is - so far Unreal Engine 4 will only be successful in building or launching only if I set the API level to 19. I have many other API’ s installed in the codeworks manager, however, no matter which one I select in the Unreal Engine “Platforms - android SDK” section, they never work unless its 19. I have even had problems on one of my computers with API 19. That computer wont even build or launch for API 19.

I’m really not sure what the problem is but I know that everything is installed correctly and pathed correctly. The fact that my desktop builds successfully with API 19 shows that it should work if I set it to other API’s. I can guarantee they are all installed properly.

Is it better to run older versions of Android works like 1R1, or something, for API’s that are around 8-10? By that same logic, is it better to install 1R5 to build API’s like 22-23? Or, is 1R4 the codeworks that is designed specifically for Unreal to run any API level?

These are things I’m not sure about. I wish the android quick start guide offered more information on these questions.

All I know at this point is that I can only be successful if I build for android API 19 and nothing else. I find this to be a bit of a disappointment considering I have devices that are older than API 19 and I’d like to be able to use those for testing my game.

I use or 1R5 without any trouble. I also typically only use Android 19 or Android 21 depending on if I’m working with VR or not.

so in short, it’s impossible to package android vr project for api 23 or later???

Android-23 isn’t working properly in 4.13, wait for 4.14 as it should be available then. 1R5 isn’t installing 23 or 24 by default, you’d have to install that manually for daydream.

Hope this helps.