title: Android Studio 3.6.1 | Error: "This project uses AndroidX dependencies"
body: <p>I have updated my Android Studio and the <code>targetSdkVersion</code> (build.gradle) to 29. I migrated to <a href="https://en.wikipedia.org/wiki/Android_10" rel="nofollow noreferrer">AndroidX</a>. Now the Gradle build gives me these two errors:</p>
  <blockquote>
  <p>This project uses AndroidX dependencies, but the 'android.useAndroidX' property is not enabled. Set this property to true in the gradle.properties file and retry.</p>
  <p>The following AndroidX dependencies are detected: androidx.versionedparcelable:versionedparcelable:1.0.0, androidx.fragment:fragment:1.0.0, androidx.slidingpanelayout:slidingpanelayout:1.0.0, androidx.core:core:1.0.0, androidx.customview:customview:1.0.0, androidx.swiperefreshlayout:swiperefreshlayout:1.0.0, androidx.interpolator:interpolator:1.0.0, androidx.loader:loader:1.0.0, androidx.drawerlayout:drawerlayout:1.0.0, androidx.viewpager:viewpager:1.0.0, androidx.collection:collection:1.0.0, androidx.localbroadcastmanager:localbroadcastmanager:1.0.0, androidx.lifecycle:lifecycle-common:2.0.0, androidx.arch.core:core-common:2.0.0, androidx.annotation:annotation:1.1.0, androidx.lifecycle:lifecycle-livedata:2.0.0, androidx.legacy:legacy-support-core-ui:1.0.0, androidx.lifecycle:lifecycle-viewmodel:2.0.0, androidx.lifecycle:lifecycle-livedata-core:2.0.0, androidx.arch.core:core-runtime:2.0.0, androidx.legacy:legacy-support-core-utils:1.0.0, androidx.documentfile:documentfile:1.0.0, androidx.cursoradapter:cursoradapter:1.0.0, androidx.lifecycle:lifecycle-runtime:2.0.0, androidx.coordinatorlayout:coordinatorlayout:1.0.0, androidx.asynclayoutinflater:asynclayoutinflater:1.0.0, androidx.print:print:1.0.0</p>
  </blockquote>
  <p>My code is:</p>
  <h3>File <em>MainActivity.java</em></h3>
  <pre><code>package it.manuel.myapp;
  
  import android.Manifest;
  import android.app.Activity;
  import android.app.AlertDialog;
  import android.app.DownloadManager;
  import android.app.Notification;
  import android.app.NotificationChannel;
  import android.app.NotificationManager;
  import android.content.DialogInterface;
  import android.content.pm.PackageManager;
  import android.net.Uri;
  import android.os.Build;
  import android.support.v4.app.ActivityCompat;
  import android.support.v7.app.AppCompatActivity;
  import android.os.Bundle;
  import android.webkit.DownloadListener;
  import android.webkit.URLUtil;
  import android.webkit.WebSettings;
  import android.webkit.WebView;
  import android.webkit.WebViewClient;
  import com.google.android.gms.tasks.OnCompleteListener;
  import com.google.android.gms.tasks.Task;
  import com.google.firebase.iid.FirebaseInstanceId;
  import com.google.firebase.iid.InstanceIdResult;
  import com.google.firebase.messaging.FirebaseMessaging;
  
  public class MainActivity extends AppCompatActivity {
  
      private WebView webView;
  
      @Override
      protected void onCreate(Bundle savedInstanceState) {
          super.onCreate(savedInstanceState);
          setContentView(R.layout.activity_main);
  
          webView = (WebView) findViewById(R.id.webview);
          webView.setWebViewClient(new WebViewClient());
          webView.loadUrl(&quot;http://google.com/&quot;);
          WebSettings webSettings = webView.getSettings();
          webSettings.setJavaScriptEnabled(true);
      }
  
      @Override
      public void onBackPressed() {
          if (webView.canGoBack()){
              webView.goBack();
          } else {
              super.onBackPressed();
          }
      }
  }
  </code></pre>
  <h3>File <em>build.gradle</em></h3>
  <pre><code>// Top-level build file where you can add configuration options common to all sub-projects/modules.
  
  buildscript {
  
      repositories {
          google()
          jcenter()
      }
      dependencies {
          classpath 'com.android.tools.build:gradle:3.6.1'
  
          // NOTE: Do not place your application dependencies here; they belong
          // in the individual module build.gradle files
          classpath 'com.google.gms:google-services:4.2.0'
      }
  }
  
  allprojects {
      repositories {
          google()
          jcenter()
      }
  }
  
  task clean(type: Delete) {
      delete rootProject.buildDir
  }
  </code></pre>
  <h3>File <em>build.gradle(:app)</em></h3>
  <pre><code>apply plugin: 'com.android.application'
  
  android {
      compileSdkVersion 29
      defaultConfig {
          applicationId &quot;it.manuel.myapp&quot;
          minSdkVersion 29
          targetSdkVersion 29
          versionCode 2
          versionName &quot;1.0&quot;
          testInstrumentationRunner &quot;android.support.test.runner.AndroidJUnitRunner&quot;
      }
      buildTypes {
          release {
              minifyEnabled false
              proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
          }
      }
      productFlavors {
      }
      compileOptions {
          sourceCompatibility = 1.8
          targetCompatibility = 1.8
      }
      buildToolsVersion = '28.0.3'
  }
  
  dependencies {
      implementation fileTree(include: ['*.jar'], dir: 'libs')
      implementation 'com.android.support:appcompat-v7:28.0.0'
      implementation 'com.android.support.constraint:constraint-layout:1.1.3'
      implementation 'com.google.firebase:firebase-core:17.2.3'
      implementation 'com.google.firebase:firebase-messaging:20.1.1'
      testImplementation 'junit:junit:4.13'
      androidTestImplementation 'com.android.support.test:runner:1.0.2'
      androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'
  }
  
  apply plugin: 'com.google.gms.google-services'
  </code></pre>
  <h3>File <em>AndroidManifest.xml</em></h3>
  <pre><code>&lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-8&quot;?&gt;
  &lt;manifest xmlns:android=&quot;http://schemas.android.com/apk/res/android&quot;
      package=&quot;it.manuel.myapp&quot;&gt;
  
      &lt;uses-permission android:name=&quot;android.permission.INTERNET&quot;/&gt;
      &lt;uses-permission android:name=&quot;android.permission.WRITE_EXTERNAL_STORAGE&quot;/&gt;
      &lt;uses-permission android:name=&quot;android.permission.READ_EXTERNAL_STORAGE&quot;/&gt;
  
      &lt;application
          android:allowBackup=&quot;true&quot;
          android:usesCleartextTraffic=&quot;true&quot;
          android:icon=&quot;@mipmap/ic_launcher&quot;
          android:label=&quot;MyApp&quot;
          android:roundIcon=&quot;@mipmap/ic_launcher_round&quot;
          android:supportsRtl=&quot;true&quot;
          android:theme=&quot;@style/AppTheme&quot;&gt;
          &lt;activity android:name=&quot;.MainActivity&quot;&gt;
              &lt;intent-filter&gt;
                  &lt;action android:name=&quot;android.intent.action.MAIN&quot; /&gt;
  
                  &lt;category android:name=&quot;android.intent.category.LAUNCHER&quot; /&gt;
              &lt;/intent-filter&gt;
          &lt;/activity&gt;
  
      &lt;/application&gt;
  
  &lt;/manifest&gt;
  </code></pre>
  <p>Why doesn't it work any longer?</p>