Baraa
Baraa

Reputation: 697

Android Studio first project creation/run errors (Gradle failing to complete execution)

I am completely new to android development and I am trying to create and run my very first tutorial app (being just an output of Hello World).

When I first create a project and it loads I receive the following error:

Failed to complete Gradle execution.

Cause:
A fatal exception has occurred. Program will exit.

This error also occurs whenever I try to run the pre-made program that outputs hello world.

I also get the following message in the Run tab:

Waiting for device.
Target device: samsung-sch_i545-(more numbers)
Uploading file
    local path: C:\Users\(User)\AndroidStudioProjects\MyApplication\app\build\outputs\apk\app-debug.apk
    remote path: /data/local/tmp/com.example.myfirstapp.myapplication
Local path doesn't exist.

I am choosing the Choose a running device option because when I try to Launch emulator and create one the option to Select a system image shows that I have none but then I go to Install Latest Version... I read and agree to the Android SDK Licences which will be installed but then I receive the following error:

Loading SDK information...
Refresh Sources:
  Fetched Add-ons List successfully
  Refresh Sources
Ignoring unknown package filter 'sys-img-x86-android-wear-21'
Installing Archives:
  Preparing to install archives
  Skipping 'Android TV Intel x86 Atom System Image, Android API 21, revision 1'; it depends on         'SDK Platform Android 5.0, API 21, revision 1' which was not installed.
  Skipping 'Intel x86 Atom System Image, Android API 21, revision 1'; it depends on 'SDK Platform     Android 5.0, API 21, revision 1' which was not installed.
  Done. Nothing was installed.

Any help is much appreciated, I am just trying to get this first pre-made project to run so I can start moving on to the next steps.

Upvotes: 1

Views: 1351

Answers (2)

Lalit Kushwah
Lalit Kushwah

Reputation: 4049

This error also come to my project so i done the Following Steps:-

File->Invalidate Caches/Restart->Invalidate and Restart

This will restart your android studio by clearing the caches.I fixed the same Problem by doing this try this should help you.Thank you..

Upvotes: 1

Baraa
Baraa

Reputation: 697

All I needed to do was to install necessary files through the Android SDK Manager. This can be accessed as a button within the Android Studio or Eclipse IDE.

Upvotes: 0

Related Questions