首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >FirebaseUI膨胀异常

FirebaseUI膨胀异常
EN

Stack Overflow用户
提问于 2019-03-15 03:28:51
回答 1查看 109关注 0票数 0

你好,我正在尝试在我的android移动应用程序中使用Firebase-UI 4.3.1,该应用程序是使用Godot引擎创建的。我已经在我的应用程序中成功地使用了Firebase-Firestore API。我正在用我的小Java模块和运行的应用程序编译整个Godot引擎。然而,当应用程序运行时,Firebase-UI 4.3.1 (我也尝试了4.3.0 )不能正常工作。我想支持facebook,gmail和电子邮件的登录方法。前两个选项工作正常,但当我点击“用电子邮件登录”按钮时,应用程序崩溃,出现以下错误:

代码语言:javascript
复制
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.*库,比如27.1.1,我已经尝试过不同版本的编译SDK,但是没有任何帮助。我虽然没有正确地将资源添加到apk中,但是在检查生成的APK resources.arsc文件和文件夹后,我可以看到错误中提到的那些。所以我不确定这里的资源是不是真的有问题。RES

下面是我正在成功构建apk的构建文件和清单:

代码语言:javascript
复制
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"

代码语言:javascript
复制
<?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>

任何可以尝试的帮助和建议都将得到真正的应用。

EN

回答 1

Stack Overflow用户

发布于 2019-03-17 07:46:09

对于任何有这个问题的人,我都能够解决它。您可以在这里找到原因以及根本原因是什么issue resolution

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/55170605

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档