Improve building for Android
This commit is contained in:
@@ -33,7 +33,9 @@ namespace Flax.Build.Platforms
|
||||
return;
|
||||
|
||||
// Find Android SDK folder path
|
||||
var sdkPath = Environment.GetEnvironmentVariable("ANDROID_SDK");
|
||||
var sdkPath = Environment.GetEnvironmentVariable("ANDROID_HOME");
|
||||
if (string.IsNullOrEmpty(sdkPath))
|
||||
sdkPath = Environment.GetEnvironmentVariable("ANDROID_SDK");
|
||||
if (string.IsNullOrEmpty(sdkPath))
|
||||
{
|
||||
// Look for adb in Android folders of some common locations
|
||||
@@ -53,6 +55,8 @@ namespace Flax.Build.Platforms
|
||||
foreach (string searchDir in searchDirs)
|
||||
{
|
||||
string androidDir = Path.Combine(searchDir, "Android");
|
||||
if (!Directory.Exists(androidDir))
|
||||
androidDir = Path.Combine(searchDir, "sdk");
|
||||
if (Directory.Exists(androidDir))
|
||||
{
|
||||
string[] subDirs = Directory.GetDirectories(androidDir, "*sdk*", SearchOption.TopDirectoryOnly);
|
||||
@@ -72,7 +76,7 @@ namespace Flax.Build.Platforms
|
||||
}
|
||||
else if (!Directory.Exists(sdkPath))
|
||||
{
|
||||
Log.Warning(string.Format("Specified Android SDK folder in ANDROID_SDK env variable doesn't exist ({0})", sdkPath));
|
||||
Log.Warning(string.Format("Specified Android SDK folder in ANDROID_HOME env variable doesn't exist ({0})", sdkPath));
|
||||
}
|
||||
if (string.IsNullOrEmpty(sdkPath))
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user