title: Firebase Admin SDK for Android, methods not found
body: <p>I'm building an Android app backed by a Firebase app, and I would like to be able to create an Admin account that can edit or delete other user accounts. If I'm understanding correctly, the Firebase Admin SDK should allow me to do this. So I followed the instructions <a href="https://firebase.google.com/docs/admin/setup" rel="noreferrer">here</a>.</p>
  
  <p>To set up the Admin SDK in my app. I added the following to build.app:</p>
  
  <pre><code>compile 'com.google.firebase:firebase-admin:4.1.1'
  </code></pre>
  
  <p>And in my Application class, I added this:</p>
  
  <pre><code>FileInputStream serviceAccount = null;
  try {
      serviceAccount = new FileInputStream("app/&lt;MY-DATABASE&gt;.json");
  } catch (FileNotFoundException e) {
      e.printStackTrace();
  }
  
  if (serviceAccount != null) {
      FirebaseOptions options = new FirebaseOptions.Builder()
              .setCredential(FirebaseCredentials.fromCertificate(serviceAccount))
              .setDatabaseUrl("https://&lt;MY-APP&gt;.firebaseio.com/")
              .build();
  
      FirebaseApp.initializeApp(options);
  }
  </code></pre>
  
  <p>However, it's telling me that:</p>
  
  <ul>
  <li>There is no method called setCredential() in FirebaseOptions.Builder, and</li>
  <li>FirebaseApp.initializeApp() takes a Context object, not FirebaseOptions.</li>
  </ul>
  
  <p>According to the docs, <code>FirebaseOptions.Builder.setCredential()</code> is a new method, which replaces the deprecated <code>FirebaseOptions.Builder.setServiceAccount()</code>. But <code>setServiceAccount()</code> doesn't exist either.</p>
  
  <p>What's going on here?</p>