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
8ca7d7d1
Unverified
Commit
8ca7d7d1
authored
Oct 11, 2023
by
Christopher Fujino
Committed by
GitHub
Oct 11, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Stop recommending android sdk root (#136296)
Fixes
https://github.com/flutter/flutter/issues/117245
parent
e83f53e6
Changes
9
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
19 additions
and
19 deletions
+19
-19
apk_utils.dart
dev/devicelab/lib/framework/apk_utils.dart
+1
-1
devices.dart
dev/devicelab/lib/framework/devices.dart
+1
-1
android_device_discovery.dart
...utter_tools/lib/src/android/android_device_discovery.dart
+1
-1
android_sdk.dart
packages/flutter_tools/lib/src/android/android_sdk.dart
+11
-11
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/devicelab/lib/framework/apk_utils.dart
View file @
8ca7d7d1
...
...
@@ -107,7 +107,7 @@ String get _androidHome {
final
String
?
androidHome
=
Platform
.
environment
[
'ANDROID_HOME'
]
??
Platform
.
environment
[
'ANDROID_SDK_ROOT'
];
if
(
androidHome
==
null
||
androidHome
.
isEmpty
)
{
throw
Exception
(
'Environment variable `ANDROID_
SDK_ROOT
` is not set.'
);
throw
Exception
(
'Environment variable `ANDROID_
HOME
` is not set.'
);
}
return
androidHome
;
}
...
...
dev/devicelab/lib/framework/devices.dart
View file @
8ca7d7d1
...
...
@@ -1346,7 +1346,7 @@ String get adbPath {
if
(
androidHome
==
null
)
{
throw
const
DeviceException
(
'The ANDROID_
SDK_ROOT
environment variable is '
'The ANDROID_
HOME
environment variable is '
'missing. The variable must point to the Android '
'SDK directory containing platform-tools.'
);
...
...
packages/flutter_tools/lib/src/android/android_device_discovery.dart
View file @
8ca7d7d1
...
...
@@ -74,7 +74,7 @@ class AndroidDevices extends PollingDeviceDiscovery {
}
on
ProcessException
catch
(
exception
)
{
throwToolExit
(
'Unable to run "adb", check your Android SDK installation and '
'
$kAndroid
SdkRoot
environment variable:
${exception.executable}
'
,
'
$kAndroid
Home
environment variable:
${exception.executable}
'
,
);
}
final
List
<
AndroidDevice
>
devices
=
<
AndroidDevice
>[];
...
...
packages/flutter_tools/lib/src/android/android_sdk.dart
View file @
8ca7d7d1
...
...
@@ -10,27 +10,27 @@ import '../convert.dart';
import
'../globals.dart'
as
globals
;
import
'java.dart'
;
// ANDROID_
HOME
is deprecated.
// ANDROID_
SDK_ROOT
is deprecated.
// See https://developer.android.com/studio/command-line/variables.html#envar
const
String
kAndroidHome
=
'ANDROID_HOME'
;
const
String
kAndroidSdkRoot
=
'ANDROID_SDK_ROOT'
;
const
String
kAndroidHome
=
'ANDROID_HOME'
;
final
RegExp
_numberedAndroidPlatformRe
=
RegExp
(
r'^android-([0-9]+)$'
);
final
RegExp
_sdkVersionRe
=
RegExp
(
r'^ro.build.version.sdk=([0-9]+)$'
);
// Android SDK layout:
// $ANDROID_
SDK_ROOT
/platform-tools/adb
// $ANDROID_
HOME
/platform-tools/adb
// $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
/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
/platforms/android-22/android.jar
// $ANDROID_
SDK_ROOT
/platforms/android-23/android.jar
// $ANDROID_
SDK_ROOT
/platforms/android-N/android.jar
// $ANDROID_
HOME
/platforms/android-22/android.jar
// $ANDROID_
HOME
/platforms/android-23/android.jar
// $ANDROID_
HOME
/platforms/android-N/android.jar
class
AndroidSdk
{
AndroidSdk
(
this
.
directory
,
{
Java
?
java
,
...
...
packages/flutter_tools/lib/src/android/gradle_utils.dart
View file @
8ca7d7d1
...
...
@@ -742,7 +742,7 @@ void exitWithNoSdkMessage() {
flutterUsage:
globals
.
flutterUsage
)
.
send
();
throwToolExit
(
'
${globals.logger.terminal.warningMark}
No Android SDK found. '
'Try setting the ANDROID_
SDK_ROOT
environment variable.'
);
'Try setting the ANDROID_
HOME
environment variable.'
);
}
// Data class to hold normal/defined Java <-> Gradle compatability criteria.
...
...
packages/flutter_tools/test/commands.shard/permeable/build_aar_test.dart
View file @
8ca7d7d1
...
...
@@ -228,7 +228,7 @@ void main() {
arguments:
<
String
>[
'--no-pub'
],
);
},
throwsToolExit
(
message:
'No Android SDK found. Try setting the ANDROID_
SDK_ROOT
environment variable'
,
message:
'No Android SDK found. Try setting the ANDROID_
HOME
environment variable'
,
));
},
overrides:
<
Type
,
Generator
>{
...
...
packages/flutter_tools/test/commands.shard/permeable/build_apk_test.dart
View file @
8ca7d7d1
...
...
@@ -138,7 +138,7 @@ void main() {
arguments:
<
String
>[
'--no-pub'
],
),
throwsToolExit
(
message:
'No Android SDK found. Try setting the ANDROID_
SDK_ROOT
environment variable'
,
message:
'No Android SDK found. Try setting the ANDROID_
HOME
environment variable'
,
),
);
},
...
...
packages/flutter_tools/test/commands.shard/permeable/build_appbundle_test.dart
View file @
8ca7d7d1
...
...
@@ -113,7 +113,7 @@ void main() {
arguments:
<
String
>[
'--no-pub'
],
);
},
throwsToolExit
(
message:
'No Android SDK found. Try setting the ANDROID_
SDK_ROOT
environment variable'
,
message:
'No Android SDK found. Try setting the ANDROID_
HOME
environment variable'
,
));
},
overrides:
<
Type
,
Generator
>{
...
...
packages/flutter_tools/test/general.shard/android/gradle_test.dart
View file @
8ca7d7d1
...
...
@@ -198,7 +198,7 @@ void main() {
expect
(()
{
gradle_utils
.
updateLocalProperties
(
project:
FlutterProject
.
fromDirectoryTest
(
globals
.
fs
.
currentDirectory
));
},
throwsToolExit
(
message:
'
${globals.logger.terminal.warningMark}
No Android SDK found. Try setting the ANDROID_
SDK_ROOT
environment variable.'
,
message:
'
${globals.logger.terminal.warningMark}
No Android SDK found. Try setting the ANDROID_
HOME
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