Help, please !!!
Every time I start Intelij IDEA, I get the same error:
Gradle sync failed: Failed to find target with hash string ‘android-26’ in: C: \ Users \ RooT \ AppData \ Local \ Android \ Sdk
Consult IDE log for more details (Help | Show Log)
Also underlines the code in red …
Answer 1, authority 100%
Just download the SDK for API Level 26 from Android SDK Manager . The error is related to the lack of a platform, not a lack of any tool.
Answer 2
You need to specify the path to the JDK in the JAVA_HOME
variable. For example, I have C: \ Program Files \ java \ jdk1.8.0_31
.
Answer 3
According to dock any support is now downloaded from outside the SDK , but from the google repository. Those. it may help to specify its address in the build.gradle
project level:
allprojects {
repositories {
maven {url "https://maven.google.com"}
}
}
Answer 4
https://www.jetbrains.com/help/education /troubleshooting-guide.html#outside_of_known_port_range :
Windows Firewall
-
Open Windows Firewall .
-
Go to Advanced Settings .
-
Right-click Inbound Rules and select New Rule ….
-
Select Port .
-
Enter a port range that is used by your IDE of choice, in this case it’s 63342-63362 .
-
Allow the connection.
-
Restart your system.