Android Studio IDE emulator opens, but project is not running/Compling

  • A+
Category:Languages

When I compiled my Android Studio IDE project, the emulator had opened, but project didn't run.I am using the latest version of Android IDE and I uninstalled Android IDE couple of times, and then again reinstalled it. Still, the problem persists.

Please help me fixing this problem.

When I run my Android Studio IDE project, I got this message at Build window:

Could not find com.android.tools.build:aapt2:3.3.1-5013011. Searched in the following locations:   - file:/C:/Users/zunayeed/AppData/Local/Android/Sdk/extras/m2repository/com/android/tools/build/aapt2/3.3.1-5013011/aapt2-3.3.1-5013011.pom   - file:/C:/Users/zunayeed/AppData/Local/Android/Sdk/extras/m2repository/com/android/tools/build/aapt2/3.3.1-5013011/aapt2-3.3.1-5013011-windows.jar   - file:/C:/Users/zunayeed/AppData/Local/Android/Sdk/extras/google/m2repository/com/android/tools/build/aapt2/3.3.1-5013011/aapt2-3.3.1-5013011.pom   - file:/C:/Users/zunayeed/AppData/Local/Android/Sdk/extras/google/m2repository/com/android/tools/build/aapt2/3.3.1-5013011/aapt2-3.3.1-5013011-windows.jar   - file:/C:/Users/zunayeed/AppData/Local/Android/Sdk/extras/android/m2repository/com/android/tools/build/aapt2/3.3.1-5013011/aapt2-3.3.1-5013011.pom   - file:/C:/Users/zunayeed/AppData/Local/Android/Sdk/extras/android/m2repository/com/android/tools/build/aapt2/3.3.1-5013011/aapt2-3.3.1-5013011-windows.jar   - https://jcenter.bintray.com/com/android/tools/build/aapt2/3.3.1-5013011/aapt2-3.3.1-5013011.pom   - https://jcenter.bintray.com/com/android/tools/build/aapt2/3.3.1-5013011/aapt2-3.3.1-5013011-windows.jar Required by:     project :app 

 


I think you missed google repository on your gradle file. To use AAPT2, make sure that you have a google() dependency in your build.gradle file, as shown here:

buildscript {     repositories {     google() // here     jcenter() } dependencies {    classpath 'com.android.tools.build:gradle:3.2.0-alpha12'    } }  allprojects {   repositories {   google() // and here   jcenter()  } 

Source: https://developer.android.com/studio/releases/#aapt2_gmaven

Comment

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen: