3

After trying to gradle sync... it fails and says in the messages dialog box

Missing Android platform(s) detected: 'android-26' Install missing platform(s) 
and sync project

when im clicking Install missing platform(s) and sync project a progress bar window pops up which says Downloading and when reaching about half way it just closes and nothing happens ive installed api 26 from the settings and tried uninstall and install again.

Zoe
  • 27,060
  • 21
  • 118
  • 148
hila edri
  • 31
  • 1
  • 3

5 Answers5

6

If you have the message:

Missing Android platform (s) detected

And you see that the SDK is installed. Here is the procedure to solve your problem.

Select menu "File" -> "Project Structure ..." (CtrlAltShiftS), select "SDK Location" and click on button "..." to edit "Android SDK Location" :

Button to edit Android SDK Location

In the dialog box, "select the directory where is installed the SDK" (For me: /home/mathieu/Android/Sdk).

Click on next until the end of the procedure.

Your project should now recompile with the SDK. I hope I've helped you!

Best regards

Karl Hill
  • 12,937
  • 5
  • 58
  • 95
MLabar
  • 523
  • 5
  • 13
0

Problem Starts Here: ["Install missing platform(s) and sync project" (link) doesn't work & gradle sync failed]

you can solved it by changing the target version from 26 to any above version. i have not tried any below version. first install the higher version let suppose it is 27. which is android 8.1 Oreo. how to install android 8.1 Oreo v27

Now open the build.gradle from your project and

compile 'com.android.support:design:26.2.0'
compile 'com.android.support:support-v4:26.2.0'

change these line from 26 to 27

compile 'com.android.support:design:27.3.0'
compile 'com.android.support:support-v4:27.3.0'

and also change the compileSdkVersion 26 to 27 and targetSDKVersion to 27

android {
compileSdkVersion 27
buildToolsVersion '27.0.3'
defaultConfig {
    applicationId "com.example.kashif.silenceinmasjid"
    minSdkVersion 15
    targetSdkVersion 27
    versionCode 1
    versionName "1.0"
}

than synchronized

0

For me, the problem was solved when I realized that my Android SDK was placed in C:/User/Admin while I was logged in Windows by a different account which needed permissions to access C:/User/Admin directory. I changed my user account to Admin and it worked fine on it. If you want to use it on the same account however, you should change permissions from the Admin account to let other users access it.

Abdul Mateen
  • 1,418
  • 1
  • 14
  • 32
0

I install the NDK.and config the ndk path enter image description here

Ado
  • 411
  • 4
  • 9
0

This is the solution I found by watching this video.

Link - Find the missed Image Asset in Android studio

Steps to be taken(Assuming You are working on Android, but It worked for me working on flutter as well)

  1. Open the PARENT android project in a new Android Studio Window. Open the Android project in a new Window

  2. Search for the Android root folder. Let the Gradle Sync run for some time

  3. Try again, right clicking the res folder. This time it will come up.

Core Problem - It is an Issue with the Gradle sync not done properly, but with the above approach we forced Android Studio to resync it.