简体   繁体   中英

can't run the simplest project in android studio

I started building my first app (calculator) and run into many problems. So in order to troubleshoot, I decided to create a simple project, to see if that would run without any problems. So I created a project and selected a "Empty Activity" which contains something that says "hello world" I run the project and it gives me this errors. mainActivity

package com.example.jorge.testapp;

import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;

public class MainActivity extends AppCompatActivity {

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);
    }
}

the log

Information:Gradle tasks [:app:assembleDebug]
Error:A problem occurred configuring project ':app'.
> Failed to find target with hash string 'android-24' in: /home/jorge/Android/Sdk
<a href="install.android.platform">Install missing platform(s) and sync project</a>
Information:BUILD FAILED
Information:Total time: 1.586 secs
Information:1 error
Information:0 warnings
Information:See complete output in console

You don't have the required SDK . Go to your SDK manager and check if you have the required SDK downloaded.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM