Dongyuan Li
Dongyuan Li

Reputation: 105

How to fix "Could not find compile target android-30 for modules :app" error in Andriod Studio while building apps?

I am trying to build an application from a GitHub repository repo. It's my first time using Andriod Studio and what I want is to run this application on my android phone, so I don't have basic knowledge about Java development or android SDKs.

When I am trying to set up the Studio, when I hit the "run app" button an error occured reading 'Could not find compile target android-30 for modules :app'.

error pic I have tried to uninstall and reinstall all SDKs needed and every time I click 'Sync Project with Gradle Files' this error will pop up.

Anyone who knows about Andriod Studio could help me with this issue? I appreciate every answer and hope this issue could be resolved very soon.

Upvotes: 8

Views: 19746

Answers (4)

Sajad Hosseini
Sajad Hosseini

Reputation: 155

If you run on Ubuntu be sure that your SDK directory has permission and it's not lock

Upvotes: 0

orups
orups

Reputation: 99

After reading very many suggested solutions online that didn't work, I resorted to instinct. I solved my issue on Windows 10, Android studio Giraffe by going to Android studio menu > Build > Make Module 'XYZ.app' which is below "Make Project" option for most android studio versions. Android studio then prompted me to download and install missing intermediaries associated with the new target SDK. After that, I was able to build successfully.

Upvotes: 0

Alfred Müller
Alfred Müller

Reputation: 21

On mac I just opened the settings - opened the android sdk - edit - next - next - finish

After this everything worked

Upvotes: 2

Oleksandr
Oleksandr

Reputation: 102

Close Android Studio. Run it as Administrator. Then create a new project. You probably had an error before the project was created and ignored it

(error : Failed to read or create install properties file.).

The file "Android SDK Platform 32" (I had platform 30) needs to be installed and so if you ran Android Studio without administrator rights it won't install. With Administrator rights it'll install automatically and that's it.

Upvotes: 7

Related Questions