Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[TIMOB_24681] Fixed bug detecting Android env when the target SDK is … #3

Merged
merged 1 commit into from
May 12, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
22 changes: 13 additions & 9 deletions lib/android.js
Original file line number Diff line number Diff line change
Expand Up @@ -558,13 +558,15 @@ exports.detect = function detect(config, opts, finished) {
var index = 1;
platforms.sort(sortFn).concat(addons.sort(sortFn)).forEach(function (platform) {
var abis = [];
Object.keys(platform.abis).forEach(function (type) {
platform.abis[type].forEach(function (abi) {
if (abis.indexOf(abi) === -1) {
abis.push(abi);
}
if (platform.abis) {
Object.keys(platform.abis).forEach(function (type) {
platform.abis[type].forEach(function (abi) {
if (abis.indexOf(abi) === -1) {
abis.push(abi);
}
});
});
});
}

var info = {
id: platform.id,
Expand Down Expand Up @@ -668,9 +670,11 @@ exports.detect = function detect(config, opts, finished) {
var info = config['image.sysdir.1'] && systemImagesByPath[config['image.sysdir.1'].replace(/\/$/, '')];
if (info) {
var platform = platformsById[info.id];
target = platform.name + ' (API level ' + platform.apiLevel + ')';
sdk = platform.version;
apiLevel = platform.apiLevel;
if (platform) {
target = platform.name + ' (API level ' + platform.apiLevel + ')';
sdk = platform.version;
apiLevel = platform.apiLevel;
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Won't that result in a lot of "undefined" values in ti info like here? Resolved via PM.

}

results.avds.push({
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"titanium",
"mobile"
],
"version": "0.2.2",
"version": "0.2.3",
"author": {
"name": "Appcelerator, Inc.",
"email": "info@appcelerator.com"
Expand Down