title: Flutter - Accessing hidden method Lsun/misc/Unsafe error on Android
body: <p>I'm getting an error for a Flutter project. I will start deactivating plugins one by one and hopefully find if one of them is causing the problem. Until then I'll leave this here in case anybody has suggestions.</p>
  
  <p><code>Accessing hidden method Lsun/misc/Unsafe;-&gt;putObject(Ljava/lang/Object;JLjava/lang/Object;)V (greylist, linking, allowed)</code></p>
  
  <p><code>Accessing hidden method Lsun/misc/Unsafe;-&gt;getInt(Ljava/lang/Object;J)I (greylist, linking, allowed)
  E/GoogleMapController(29124): Cannot enable MyLocation layer as location permissions are not granted</code></p>
  
  <pre><code>dependencies:
    flutter:
      sdk: flutter
    firebase_auth: ^0.15.5+2
    cloud_firestore: ^0.13.5
    firebase_storage: ^3.1.3
    firebase_core: ^0.4.4+3
    provider: ^4.1.2
    google_sign_in: ^4.4.6
    google_maps_flutter: ^0.5.28
    latlong: ^0.6.1
    flappy_search_bar: ^1.7.2
    http: ^0.12.1
    image_cropper: ^1.2.1
    image_picker: ^0.6.3+4
    geolocator: ^5.3.1
  
  
  Doctor summary (to see all details, run flutter doctor -v):
  [✓] Flutter (Channel stable, v1.17.1, on Mac OS X 10.15.4 19E287, locale en-RO)
  
  [✓] Android toolchain - develop for Android devices (Android SDK version 29.0.3)
  [✓] Xcode - develop for iOS and macOS (Xcode 11.3.1)
  [!] Android Studio (version 3.5)
      ✗ Flutter plugin not installed; this adds Flutter specific functionality.
      ✗ Dart plugin not installed; this adds Dart specific functionality.
  [✓] VS Code (version 1.45.1)
  [✓] Connected device (1 available)
  
  ! Doctor found issues in 1 category.
  </code></pre>
  
  <p>Opening the Android app with Android Studio showed the following notice: </p>
  
  <pre><code>Compilation is not supported for following modules: cloud_firestore, cloud_firestore_web, firebase_auth, 
  firebase_core, firebase_auth_web, firebase_core_web, google_maps_flutter, flutter_plugin_android_lifecycle, 
  google_sign_in, google_sign_in_web, 
  location. 
  Unfortunately you can't have non-Gradle Java modules and Android-Gradle modules in one project.
  </code></pre>