android: fix for api level detector from version
@@ -530,12 +530,20 @@ namespace "config" do
#If user has mentioned version under android, then select that particular api level.
if $app_config["android"]["version"]
apilevel = AndroidTools.get_api_level $app_config["android"]["version"]
+ if(!apilevel)
+ apilevel = AndroidTools.get_api_level ($app_config["android"]["version"] + ".0")
+ end
+ if(!apilevel)
+ apilevel = AndroidTools.get_api_level ($app_config["android"]["version"][0...-2])
+ end
if(apilevel)
$androidplatform = AndroidTools.get_platform apilevel
$found_api_level = apilevel
+ puts "Found api level #{apilevel}"
else
puts "No Android platform found of version #{$app_config['android']['version']}. Picking the latest one Android #{AndroidTools.get_market_version $found_api_level} available in machine"
end
+ exit 1
end
end
