title: Unable to make Firebase work for a non Gradle build: Missing google_app_id. Firebase Analytics disabled
body: <p>The app I am working on has a very customized build process. It's not possible to use gradle to build my app. It's not ideal, but I cannot change anything about it.
  Nevertheless, I want to use Firebase Analytics in my app. In included the modules firebase-core, firebase-common, firebase-analytics, firebase-analytics-impl, firebase-iid, firebase-iid-interop, firebase-measurement-connector, firebase-measurement-connector-imple, play-services-measurement-base and play-services-measurement-api. I also added the following strings to my <code>strings.xml</code>, with the values I found in the <code>google-services.json</code> for my Firebase project:</p>
  
  <pre><code>&lt;string name="google_app_id" translatable="false"&gt;xxx&lt;/string&gt;
  &lt;string name="gcm_defaultSenderId" translatable="false"&gt;xxx&lt;/string&gt;
  &lt;string name="default_web_client_id" translatable="false"&gt;xxx&lt;/string&gt;
  &lt;string name="firebase_database_url" translatable="false"&gt;xxx&lt;/string&gt;
  &lt;string name="google_api_key" translatable="false"&gt;xxx&lt;/string&gt;
  &lt;string name="google_crash_reporting_api_key" translatable="false"&gt;xxx&lt;/string&gt;
  &lt;string name="project_id" translatable="false"&gt;xxx&lt;/string&gt;
  </code></pre>
  
  <p>(as described <a href="https://firebase.googleblog.com/2016/12/how-does-firebase-initialize-on-android.html" rel="nofollow noreferrer">here</a>) and removed the <code>FirebaseInitProvider</code> from the AndroidManifest.
  In my apps <code>Application</code> class <code>onCreate()</code> I do:</p>
  
  <pre><code>FirebaseOptions.Builder builder = new FirebaseOptions.Builder()
              .setApplicationId(getString(R.string.google_app_id))
              .setApiKey(getString(R.string.google_api_key));
  FirebaseApp.initializeApp(this, builder.build(), "[DEFAULT]");
  </code></pre>
  
  <p>No issues so far. When the above code is executed, I get a debug log message saying: </p>
  
  <pre><code>FirebaseApp: com.google.firebase.auth.FirebaseAuth is not linked. Skipping initialization.
  </code></pre>
  
  <p>All good, I didn't include the auth module. I don't need it for my app. When I call <code>FirebaseAnalytics.getInstance(adblockSettingsTextView.getContext()).getFirebaseInstanceId()</code> it returns a String value, so I assume the initialization was successful.</p>
  
  <p>Now every time I want to log an event like this</p>
  
  <pre><code>Bundle bundle = new Bundle();
  bundle.putString(FirebaseAnalytics.Param.CONTENT_TYPE, "Dashboard");
  FirebaseAnalytics.getInstance(this).logEvent(FirebaseAnalytics.Event.SELECT_CONTENT, bundle);
  </code></pre>
  
  <p>I see the an error in my log saying <code>Missing google_app_id. Firebase Analytics disabled. See https://firebase.google.com/docs/android/setup.</code> On top of that, I don't see any active users in the Firebase Analytics dashboard. </p>
  
  <p>I read all documents I could find and tried my best to find the cause for this problem. But right now I have no more ideas what I can check or change to make it work. Help would be highly appreciated. Thanks!</p>