Hi! My application is crashing on authorization step.
Here is function that occur crash:
m_auth = auth::Auth::GetAuth(qFirebase->firebaseApp());
Message:
W System.err: java.lang.NoSuchMethodError: no non-static method "Lcom/google/firebase/auth/FirebaseUser;.getMetadata()Lcom/google/firebase/auth/FirebaseUserMetadata;" E firebase: method_ids[i] || method.optional F firebase: Unable to find Method com/google/firebase/auth/FirebaseUser.getMetadata (signature '()Lcom/google/firebase/auth/FirebaseUserMetadata;', instance). Please verify the AAR which contains the com/google/firebase/auth/FirebaseUser class is included in your app.
grandle.build file:
buildscript {
repositories {
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:2.2.3'
classpath 'com.google.gms:google-services:3.0.0'
}
}
allprojects {
repositories {
jcenter()
mavenCentral()
}
}
project.ext {
// Configure the Firebase C++ SDK location.
firebase_cpp_sdk_dir = System.getProperty('firebase_cpp_sdk.dir')
firebaseSdkUsed = 'system property firebase_cpp_sdk.dir'
if (firebase_cpp_sdk_dir == null || firebase_cpp_sdk_dir.isEmpty()) {
firebase_cpp_sdk_dir = System.getenv('FIREBASE_CPP_SDK_DIR')
firebaseSdkUsed = 'system env variable FIREBASE_CPP_SDK_DIR'
if (firebase_cpp_sdk_dir == null || firebase_cpp_sdk_dir.isEmpty()) {
if ((new File('firebase_cpp_sdk')).exists()) {
firebase_cpp_sdk_dir = 'firebase_cpp_sdk'
} else {
throw new StopActionException(
'firebase_cpp_sdk.dir property or the FIREBASE_CPP_SDK_DIR ' +
'environment variable must be set to reference the Firebase C++ ' +
'SDK install directory. This is used to configure static library ' +
'and C/C++ include paths for the SDK.'
)
}
}
}
if (!(new File(firebase_cpp_sdk_dir)).exists()) {
throw new StopActionException(
sprintf('Firebase C++ SDK directory %s does not exist', firebase_cpp_sdk_dir)
)
}
println 'QtFirebase using Firebase C++ SDK located in ' + firebase_cpp_sdk_dir + ' (from ' + firebaseSdkUsed + ')'
}
repositories {
flatDir {
dirs project.ext.firebase_cpp_sdk_dir + "/libs/android"
}
}
apply plugin: 'com.android.application'
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
compile 'com.facebook.android:facebook-android-sdk:3+'
compile 'com.android.support:multidex:1.+'
compile 'com.android.support:appcompat-v7:25.0.1' // Optional??
compile 'com.google.android.gms:play-services-base:11.0.4' // Mandatory - Firebase rely on Google Play services
// For AdMob support
compile 'com.google.firebase:firebase-ads:11.0.4'
// For Google Analytics support
compile 'com.google.firebase:firebase-core:11.0.4' // Recommended package
// compile 'com.google.firebase:firebase-analytics:11.0.4' // deprecated
// For RemoteConfig support
compile 'com.google.firebase:firebase-config:11.0.4'
// For Messaging support
compile 'com.google.firebase:firebase-messaging:11.0.4'
compile 'com.google.firebase.messaging.cpp:firebase_messaging_cpp@aar'
// For Auth support
compile 'com.google.firebase:firebase-auth:11.0.4'
// For Database support
compile 'com.google.firebase:firebase-database:11.0.4'
}
android {
/*******************************************************
* The following variables:
* - androidBuildToolsVersion,
* - androidCompileSdkVersion
* - qt5AndroidDir - holds the path to qt android files
* needed to build any Qt application
* on Android.
*
* are defined in gradle.properties file. This file is
* updated by QtCreator and androiddeployqt tools.
* Changing them manually might break the compilation!
*******************************************************/
compileSdkVersion androidCompileSdkVersion.toInteger()
buildToolsVersion androidBuildToolsVersion
sourceSets {
main {
manifest.srcFile 'AndroidManifest.xml'
java.srcDirs = [qt5AndroidDir + '/src', 'src', 'java']
aidl.srcDirs = [qt5AndroidDir + '/src', 'src', 'aidl']
res.srcDirs = [qt5AndroidDir + '/res', 'res']
resources.srcDirs = ['src']
renderscript.srcDirs = ['src']
assets.srcDirs = ['assets']
jniLibs.srcDirs = ['libs']
}
}
lintOptions {
abortOnError false
}
defaultConfig {
applicationId "com.lookmygame.app" // Used by Firebase auto-config (the google-services.json from Firebase console)
//minSdkVersion 14
//targetSdkVersion 25
//versionCode 1
//versionName "1.0"
//testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
vectorDrawables.useSupportLibrary = true
// Enabling multidex support.
multiDexEnabled = true
}
}
apply plugin: 'com.google.gms.google-services'
Hi! My application is crashing on authorization step. Here is function that occur crash:
m_auth = auth::Auth::GetAuth(qFirebase->firebaseApp());
Message:W System.err: java.lang.NoSuchMethodError: no non-static method "Lcom/google/firebase/auth/FirebaseUser;.getMetadata()Lcom/google/firebase/auth/FirebaseUserMetadata;" E firebase: method_ids[i] || method.optional F firebase: Unable to find Method com/google/firebase/auth/FirebaseUser.getMetadata (signature '()Lcom/google/firebase/auth/FirebaseUserMetadata;', instance). Please verify the AAR which contains the com/google/firebase/auth/FirebaseUser class is included in your app.
grandle.build file: