FirebaseUI膨胀异常

时间:2019-03-14 19:28:51

标签: android firebase firebaseui godot

您好,我试图在我使用Godot引擎创建的Android移动应用程序中使用Firebase-UI 4.3.1。我已经在我的应用程序中成功使用了Firebase-Firestore API。我正在使用小型Java模块和正在运行的应用程序来编译整个Godot引擎。但是,当应用程序运行时,Firebase-UI 4.3.1(我也尝试过4.3.0)无法正常工作。我想支持Facebook,Gmail和电子邮件的登录方法。前两个选项正常运行,但是当我单击“通过电子邮件登录”按钮时,应用程序出现以下错误:

java.lang.RuntimeException: Unable to start activity ComponentInfo{org.godotengine.bacterio/com.firebase.ui.auth.ui.email.EmailActivity}: android.view.InflateException: Binary XML file line #34: Binary XML file line #34: Error inflating class android.support.design.widget.TextInputLayout

Caused by: android.view.InflateException: Binary XML file line #34: Binary XML file line #34: Error inflating class android.support.design.widget.TextInputLayout

Caused by: android.view.InflateException: Binary XML file line #34: Error inflating class android.support.design.widget.TextInputLayout

Caused by: android.content.res.Resources$NotFoundException: Drawable org.godotengine.godot:drawable/design_password_eye with resource ID #0x7f07008f

Caused by: android.content.res.Resources$NotFoundException: File res/drawable-v21/design_password_eye.xml from drawable resource ID #0x7f07008f

我尝试了不同版本的com.android.support。* libreries,例如27.1.1,我尝试了不同的complie SDK版本,但没有任何帮助。当使用multiDex与Godot进行聚会时,虽然资源没有正确添加到apk中,但是在检查生成的APK resources.arsc文件和文件夹后,我可以看到错误提到的内容。所以我不确定资源在这里是否是真正的问题。 RES

这是我成功构建的apk的构建文件和清单:

buildscript {
	repositories {
			maven {
	url 'https://maven.google.com'
	}

		jcenter()
	}
	dependencies {
		classpath 'com.android.tools.build:gradle:2.3.3'
				classpath "com.google.gms:google-services:4.0.1"

	}
}

apply plugin: 'com.android.application'

allprojects {
    repositories {
		maven {
	url 'https://maven.google.com'
	}

    	jcenter()
	mavenCentral()
	google()
    }
}

dependencies {
	compile 'com.android.support:support-v4:28.0.0'
	compile ('com.firebaseui:firebase-ui-auth:4.3.1'){exclude group: 'com.android.support' exclude module: 'appcompat-v7' exclude module: 'support-v4'}
	compile 'com.google.android.gms:play-services-auth:16.0.0'
	compile 'com.facebook.android:facebook-android-sdk:4.33.0'
	compile 'com.twitter.sdk.android:twitter-core:3.1.1'
	compile 'com.google.firebase:firebase-core:16.0.7'
	compile 'com.google.firebase:firebase-database:16.0.6'
	compile 'com.google.firebase:firebase-firestore:17.0.1'
	compile ('com.android.support:appcompat-v7:28.0.0'){force = true}
	compile ('com.android.support:support-v4:28.0.0'){force = true}
	compile ('com.android.support.constraint:constraint-layout:1.1.3'){force = true}
	compile ('com.android.support:design:28.0.0'){force = true}
	compile 'com.android.support:multidex:1.0.3'
	
}

android {

	lintOptions {
		abortOnError false
		disable 'MissingTranslation'
	}

	compileSdkVersion 28
	buildToolsVersion "28.0.3" 
	useLibrary 'org.apache.http.legacy'

	packagingOptions {
		exclude 'META-INF/LICENSE'
		exclude 'META-INF/NOTICE'
	}
	defaultConfig {
		generatedDensities = []
		applicationId 'org.godotengine.godot'
		targetSdkVersion 27
		multiDexEnabled true
		minSdkVersion 18
		
	}
	// Both signing and zip-aligning will be done at export time
	buildTypes.all { buildType ->
		buildType.zipAlignEnabled false
		buildType.signingConfig null
	}
	sourceSets {
		main {
			manifest.srcFile 'AndroidManifest.xml'
			java.srcDirs = ['src'
				,'/home/user/godot/godot-3.0.6-stable/modules/projectx_auth/src','/home/user/godot/godot-3.0.6-stable/modules/projectx_db/src','/home/user/godot/godot-3.0.6-stable/modules/projectx_gps/src'
			]
			res.srcDirs = [
				'res'
				,'/home/user/godot/godot-3.0.6-stable/modules/projectx_auth/res'
			]
			aidl.srcDirs = [
				'aidl'
				
			]
			assets.srcDirs = [
				'assets'
				
			]
		}
		debug.jniLibs.srcDirs = [
			'libs/debug'
			
		]
		release.jniLibs.srcDirs = [
			'libs/release'
			
		]
	}
	applicationVariants.all { variant ->
		// ApplicationVariant is undocumented, but this method is widely used; may break with another version of the Android Gradle plugin
		variant.outputs.get(0).setOutputFile(new File("${projectDir}/../../../bin", "android_${variant.name}.apk"))
	}
}

apply plugin: "com.google.gms.google-services"

<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
	  package="com.godot.game"
      android:versionCode="1"
      android:versionName="1.0"
      android:installLocation="auto"
      >
<supports-screens android:smallScreens="true"
                      android:normalScreens="true"
                      android:largeScreens="true"
                      android:xlargeScreens="true"/>

    <application android:label="@string/godot_project_name_string" android:icon="@drawable/icon" android:allowBackup="false" android:name="android.support.multidex.MultiDexApplication"
 >
        <activity android:name="org.godotengine.godot.Godot"
                  android:label="@string/godot_project_name_string"
                  android:theme="@android:style/Theme.NoTitleBar.Fullscreen"
                  android:launchMode="singleTask"
                  android:screenOrientation="landscape"
                  android:configChanges="orientation|keyboardHidden|screenSize|smallestScreenSize"
                  android:resizeableActivity="false">

            <intent-filter>
                <action android:name="android.intent.action.MAIN" />
                <category android:name="android.intent.category.LAUNCHER" />
            </intent-filter>
        </activity>
	<service android:name="org.godotengine.godot.GodotDownloaderService" />






    </application>
    <uses-feature android:glEsVersion="0x00030000" android:required="true" />



<uses-sdk android:minSdkVersion="18" android:targetSdkVersion="28"/>

</manifest>

任何寻求帮助的建议都将得到真正的应用。

1 个答案:

答案 0 :(得分:0)

对于有此问题的任何人,我都可以解决。您可以在这里找到原因以及issue resolution

的根本原因是什么