Skip to content

Commit ec40c41

Browse files
committed
Fix NoSuchMethodException
1 parent 5f1d26f commit ec40c41

File tree

8 files changed

+18
-27
lines changed

8 files changed

+18
-27
lines changed

auth/README.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -156,8 +156,6 @@ startActivityForResult(
156156
RC_SIGN_IN);
157157
```
158158

159-
To enable all supported providers in their basic configuration, use `setProviders(AuthUI.ALL_PROVIDERS)`
160-
161159
If a terms of service URL and a custom theme are required:
162160

163161
```java

auth/build.gradle

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,13 +32,13 @@ android {
3232

3333
dependencies {
3434
testCompile 'junit:junit:4.12'
35-
testCompile 'org.mockito:mockito-core:2.2.0'
35+
testCompile 'org.mockito:mockito-core:2.2.2'
3636
testCompile 'org.robolectric:robolectric:3.1.2'
3737
// See https://github.com/robolectric/robolectric/issues/1932#issuecomment-219796474
3838
testCompile 'org.khronos:opengl-api:gl1.1-android-2.1_r1'
3939

40-
compile 'com.facebook.android:facebook-android-sdk:4.14.1'
41-
compile("com.twitter.sdk.android:twitter:2.0.0@aar") {
40+
compile 'com.facebook.android:facebook-android-sdk:4.17.0'
41+
compile("com.twitter.sdk.android:twitter:2.1.1@aar") {
4242
transitive = true;
4343
}
4444
compile "com.android.support:design:${project.ext.support_library_version}"

auth/src/main/AndroidManifest.xml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,9 @@
99
<meta-data
1010
android:name="com.google.android.gms.version"
1111
android:value="@integer/google_play_services_version" />
12+
<meta-data
13+
android:name="io.fabric.ApiKey"
14+
android:value="@string/twitter_consumer_secret"/>
1215

1316
<activity
1417
android:name="com.firebase.ui.auth.ui.email.ConfirmRecoverPasswordActivity"

auth/src/main/java/com/firebase/ui/auth/AuthUI.java

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -265,16 +265,6 @@ public class AuthUI {
265265
TWITTER_PROVIDER
266266
)));
267267

268-
/**
269-
* The list of all supported authentication providers in Firebase Auth UI in their basic
270-
* {@link IdpConfig} form.
271-
*/
272-
public static final List<IdpConfig> ALL_PROVIDERS =
273-
Arrays.asList(new AuthUI.IdpConfig.Builder(AuthUI.EMAIL_PROVIDER).build(),
274-
new AuthUI.IdpConfig.Builder(AuthUI.GOOGLE_PROVIDER).build(),
275-
new AuthUI.IdpConfig.Builder(AuthUI.FACEBOOK_PROVIDER).build(),
276-
new AuthUI.IdpConfig.Builder(AuthUI.TWITTER_PROVIDER).build());
277-
278268
private static final IdentityHashMap<FirebaseApp, AuthUI> INSTANCES = new IdentityHashMap<>();
279269

280270
private final FirebaseApp mApp;

auth/src/main/java/com/firebase/ui/auth/provider/FacebookProvider.java

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
import android.content.Intent;
2020
import android.os.Bundle;
2121
import android.util.Log;
22+
2223
import com.facebook.CallbackManager;
2324
import com.facebook.FacebookCallback;
2425
import com.facebook.FacebookException;
@@ -34,11 +35,13 @@
3435
import com.firebase.ui.auth.R;
3536
import com.google.firebase.auth.AuthCredential;
3637
import com.google.firebase.auth.FacebookAuthProvider;
37-
import java.util.ArrayList;
38-
import java.util.List;
38+
3939
import org.json.JSONException;
4040
import org.json.JSONObject;
4141

42+
import java.util.ArrayList;
43+
import java.util.List;
44+
4245
public class FacebookProvider implements IdpProvider, FacebookCallback<LoginResult> {
4346
protected static final String ERROR = "err";
4447
protected static final String ERROR_MSG = "err_msg";

auth/src/main/java/com/firebase/ui/auth/ui/idp/AuthMethodPickerActivity.java

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -89,18 +89,18 @@ private void populateIdpList(List<IdpConfig> providers) {
8989
mIdpProviders = new ArrayList<>();
9090
for (IdpConfig idpConfig : providers) {
9191
switch (idpConfig.getProviderId()) {
92-
case AuthUI.FACEBOOK_PROVIDER:
93-
mIdpProviders.add(new FacebookProvider(this, idpConfig));
94-
break;
9592
case AuthUI.GOOGLE_PROVIDER:
9693
mIdpProviders.add(new GoogleProvider(this, idpConfig));
9794
break;
98-
case AuthUI.EMAIL_PROVIDER:
99-
findViewById(R.id.email_provider).setVisibility(View.VISIBLE);
95+
case AuthUI.FACEBOOK_PROVIDER:
96+
mIdpProviders.add(new FacebookProvider(this, idpConfig));
10097
break;
10198
case AuthUI.TWITTER_PROVIDER:
10299
mIdpProviders.add(new TwitterProvider(this));
103100
break;
101+
case AuthUI.EMAIL_PROVIDER:
102+
findViewById(R.id.email_provider).setVisibility(View.VISIBLE);
103+
break;
104104
default:
105105
if (BuildConfig.DEBUG) {
106106
Log.d(TAG, "Encountered unknown IDPProvider parcel with type: "

auth/src/main/java/com/firebase/ui/auth/util/FirebaseAuthWrapperImpl.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@
1414

1515
package com.firebase.ui.auth.util;
1616

17-
import android.app.Fragment;
1817
import android.app.PendingIntent;
1918
import android.content.Context;
2019
import android.os.Bundle;
@@ -61,7 +60,7 @@ public FirebaseAuthWrapperImpl(@NonNull FirebaseAuth firebaseAuth) {
6160
if (firebaseAuth == null) {
6261
throw new IllegalArgumentException("firebaseAuth must not be null");
6362
}
64-
this.mFirebaseAuth = firebaseAuth;
63+
mFirebaseAuth = firebaseAuth;
6564
}
6665

6766
@Override

common/constants.gradle

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
project.ext.firebase_version = '9.8.0'
2-
// use caution when updating support library version, v25.0.0 caused issues
3-
// with the Facebook SDK. (NoSuchMethodError startActivity)
4-
project.ext.support_library_version = '24.2.1'
2+
project.ext.support_library_version = '25.0.0'
53

64
project.ext.submodules = ['database', 'auth', 'storage']
75
project.ext.group = 'com.firebaseui'

0 commit comments

Comments
 (0)