Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Sign in
Toggle navigation
F
Front-End
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
abdullh.alsoleman
Front-End
Commits
6a2bc261
Unverified
Commit
6a2bc261
authored
Jun 23, 2020
by
Jenn Magder
Committed by
GitHub
Jun 23, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Replace ANDROID_HOME user messages with ANDROID_SDK_ROOT (#59867)
parent
9470b9e2
Changes
11
Hide whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
23 additions
and
21 deletions
+23
-21
test.dart
dev/bots/test.dart
+1
-1
README.md
dev/devicelab/README.md
+1
-1
adb.dart
dev/devicelab/lib/framework/adb.dart
+2
-2
apk_utils.dart
dev/devicelab/lib/framework/apk_utils.dart
+1
-1
android_device_discovery.dart
...utter_tools/lib/src/android/android_device_discovery.dart
+2
-2
android_sdk.dart
packages/flutter_tools/lib/src/android/android_sdk.dart
+11
-9
gradle_utils.dart
packages/flutter_tools/lib/src/android/gradle_utils.dart
+1
-1
build_aar_test.dart
...r_tools/test/commands.shard/permeable/build_aar_test.dart
+1
-1
build_apk_test.dart
...r_tools/test/commands.shard/permeable/build_apk_test.dart
+1
-1
build_appbundle_test.dart
...s/test/commands.shard/permeable/build_appbundle_test.dart
+1
-1
gradle_test.dart
...flutter_tools/test/general.shard/android/gradle_test.dart
+1
-1
No files found.
dev/bots/test.dart
View file @
6a2bc261
...
...
@@ -1113,7 +1113,7 @@ Map<String, String> _initGradleEnvironment() {
?
Platform
.
environment
[
'ANDROID_SDK_ROOT'
]
:
Platform
.
environment
[
'ANDROID_HOME'
];
if
(
androidSdkRoot
==
null
||
androidSdkRoot
.
isEmpty
)
{
print
(
'
${red}
Could not find Android SDK; set ANDROID_SDK_ROOT
(or ANDROID_HOME)
.
$reset
'
);
print
(
'
${red}
Could not find Android SDK; set ANDROID_SDK_ROOT.
$reset
'
);
exit
(
1
);
}
return
<
String
,
String
>{
...
...
dev/devicelab/README.md
View file @
6a2bc261
...
...
@@ -94,7 +94,7 @@ reproduce a CI test failure locally.
## Prerequisites
You must set
the
`ANDROID_HOME`
or
`ANDROID_SDK_ROOT`
environment variable to run
You must set
`ANDROID_SDK_ROOT`
environment variable to run
tests on Android. If you have a local build of the Flutter engine, then you have
a copy of the Android SDK at
`.../engine/src/third_party/android_tools/sdk`
.
...
...
dev/devicelab/lib/framework/adb.dart
View file @
6a2bc261
...
...
@@ -690,8 +690,8 @@ String get adbPath {
if
(
androidHome
==
null
)
{
throw
const
DeviceException
(
'The ANDROID_SDK_ROOT
and ANDROID_HOME environment variables are
'
'missing.
At least one of these variables
must point to the Android '
'The ANDROID_SDK_ROOT
environment variable is
'
'missing.
The variable
must point to the Android '
'SDK directory containing platform-tools.'
);
}
...
...
dev/devicelab/lib/framework/apk_utils.dart
View file @
6a2bc261
...
...
@@ -105,7 +105,7 @@ String get _androidHome {
final
String
androidHome
=
Platform
.
environment
[
'ANDROID_HOME'
]
??
Platform
.
environment
[
'ANDROID_SDK_ROOT'
];
if
(
androidHome
==
null
||
androidHome
.
isEmpty
)
{
throw
Exception
(
'
Unset env flag: `ANDROID_HOME` or `ANDROID_SDK_ROOT`
.'
);
throw
Exception
(
'
Environment variable `ANDROID_SDK_ROOT` is not set
.'
);
}
return
androidHome
;
}
...
...
packages/flutter_tools/lib/src/android/android_device_discovery.dart
View file @
6a2bc261
...
...
@@ -59,10 +59,10 @@ class AndroidDevices extends PollingDeviceDiscovery {
)).
stdout
.
trim
();
}
on
ArgumentError
catch
(
exception
)
{
throwToolExit
(
'Unable to find "adb", check your Android SDK installation and '
'
ANDROID_HOME
environment variable:
${exception.message}
'
);
'
$kAndroidSdkRoot
environment variable:
${exception.message}
'
);
}
on
ProcessException
catch
(
exception
)
{
throwToolExit
(
'Unable to run "adb", check your Android SDK installation and '
'
ANDROID_HOME
environment variable:
${exception.executable}
'
);
'
$kAndroidSdkRoot
environment variable:
${exception.executable}
'
);
}
final
List
<
AndroidDevice
>
devices
=
<
AndroidDevice
>[];
parseADBDeviceOutput
(
...
...
packages/flutter_tools/lib/src/android/android_sdk.dart
View file @
6a2bc261
...
...
@@ -14,22 +14,24 @@ import '../convert.dart';
import
'../globals.dart'
as
globals
;
import
'android_studio.dart'
;
// ANDROID_HOME is deprecated.
// See https://developer.android.com/studio/command-line/variables.html#envar
const
String
kAndroidHome
=
'ANDROID_HOME'
;
const
String
kAndroidSdkRoot
=
'ANDROID_SDK_ROOT'
;
// Android SDK layout:
// $ANDROID_
HOME
/platform-tools/adb
// $ANDROID_
SDK_ROOT
/platform-tools/adb
// $ANDROID_
HOME
/build-tools/19.1.0/aapt, dx, zipalign
// $ANDROID_
HOME
/build-tools/22.0.1/aapt
// $ANDROID_
HOME
/build-tools/23.0.2/aapt
// $ANDROID_
HOME
/build-tools/24.0.0-preview/aapt
// $ANDROID_
HOME
/build-tools/25.0.2/apksigner
// $ANDROID_
SDK_ROOT
/build-tools/19.1.0/aapt, dx, zipalign
// $ANDROID_
SDK_ROOT
/build-tools/22.0.1/aapt
// $ANDROID_
SDK_ROOT
/build-tools/23.0.2/aapt
// $ANDROID_
SDK_ROOT
/build-tools/24.0.0-preview/aapt
// $ANDROID_
SDK_ROOT
/build-tools/25.0.2/apksigner
// $ANDROID_
HOME
/platforms/android-22/android.jar
// $ANDROID_
HOME
/platforms/android-23/android.jar
// $ANDROID_
HOME
/platforms/android-N/android.jar
// $ANDROID_
SDK_ROOT
/platforms/android-22/android.jar
// $ANDROID_
SDK_ROOT
/platforms/android-23/android.jar
// $ANDROID_
SDK_ROOT
/platforms/android-N/android.jar
final
RegExp
_numberedAndroidPlatformRe
=
RegExp
(
r'^android-([0-9]+)$'
);
final
RegExp
_sdkVersionRe
=
RegExp
(
r'^ro.build.version.sdk=([0-9]+)$'
);
...
...
packages/flutter_tools/lib/src/android/gradle_utils.dart
View file @
6a2bc261
...
...
@@ -304,6 +304,6 @@ void exitWithNoSdkMessage() {
BuildEvent
(
'unsupported-project'
,
eventError:
'android-sdk-not-found'
,
flutterUsage:
globals
.
flutterUsage
).
send
();
throwToolExit
(
'
$warningMark
No Android SDK found. '
'Try setting the ANDROID_
HOME
environment variable.'
'Try setting the ANDROID_
SDK_ROOT
environment variable.'
);
}
packages/flutter_tools/test/commands.shard/permeable/build_aar_test.dart
View file @
6a2bc261
...
...
@@ -266,7 +266,7 @@ void main() {
arguments:
<
String
>[
'--no-pub'
],
);
},
throwsToolExit
(
message:
'No Android SDK found. Try setting the ANDROID_
HOME
environment variable'
,
message:
'No Android SDK found. Try setting the ANDROID_
SDK_ROOT
environment variable'
,
));
},
overrides:
<
Type
,
Generator
>{
...
...
packages/flutter_tools/test/commands.shard/permeable/build_apk_test.dart
View file @
6a2bc261
...
...
@@ -212,7 +212,7 @@ void main() {
arguments:
<
String
>[
'--no-pub'
],
);
},
throwsToolExit
(
message:
'No Android SDK found. Try setting the ANDROID_
HOME
environment variable'
,
message:
'No Android SDK found. Try setting the ANDROID_
SDK_ROOT
environment variable'
,
));
},
overrides:
<
Type
,
Generator
>{
...
...
packages/flutter_tools/test/commands.shard/permeable/build_appbundle_test.dart
View file @
6a2bc261
...
...
@@ -197,7 +197,7 @@ void main() {
arguments:
<
String
>[
'--no-pub'
],
);
},
throwsToolExit
(
message:
'No Android SDK found. Try setting the ANDROID_
HOME
environment variable'
,
message:
'No Android SDK found. Try setting the ANDROID_
SDK_ROOT
environment variable'
,
));
},
overrides:
<
Type
,
Generator
>{
...
...
packages/flutter_tools/test/general.shard/android/gradle_test.dart
View file @
6a2bc261
...
...
@@ -323,7 +323,7 @@ void main() {
expect
(()
{
updateLocalProperties
(
project:
FlutterProject
.
current
());
},
throwsToolExit
(
message:
'
$warningMark
No Android SDK found. Try setting the ANDROID_
HOME
environment variable.'
,
message:
'
$warningMark
No Android SDK found. Try setting the ANDROID_
SDK_ROOT
environment variable.'
,
));
},
overrides:
<
Type
,
Generator
>{
AndroidSdk:
()
=>
null
,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment