mtsahakis / MediaProjectionDemo

One Activity sample app of using Android Lollipop MediaProjection API to capture device screenshots
Other
210 stars 76 forks source link

Can't run this demo. Could not find com.android.tools.build:aapt2:3.3.2-5309881 #18

Closed MatthewTheNewbie closed 5 years ago

MatthewTheNewbie commented 5 years ago

Hi there and thank you for this interesting demo app. Unfortunately I cant get it working. WhenI press "Run" I get the error: "Could not find com.android.tools.build:aapt2:3.3.2-5309881". I've googled that and found that I should add "google()" into the section: buildscript { repositories { in file build.gradle This was already done, but still the application won't complie. Could you tell me, what I'm doing wrong? I'm so brand new to Android. Thank you...

MatthewTheNewbie commented 5 years ago

Ah, sorry, just noticed that "Mr Shakes" provided the solution in his "Pull request" already. The following code has to be added after the "buildscript" section in file build.gradle: allprojects { repositories { google() jcenter() } } Now it is working! Thank you Mr Shakes!