hila edri
hila edri

Reputation: 31

Missing Android platform(s) detected

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.

Upvotes: 3

Views: 7384

Answers (5)

bhavuk kalra
bhavuk kalra

Reputation: 1

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.

Upvotes: 0

Ado
Ado

Reputation: 421

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

Upvotes: 0

Abdul Mateen
Abdul Mateen

Reputation: 1674

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.

Upvotes: 0

MLabar
MLabar

Reputation: 523

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

Upvotes: 6

Muhammad Kashif Arif
Muhammad Kashif Arif

Reputation: 668

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

Upvotes: 0

Related Questions