在第58行的AndroidManifest中的包“ android”中找不到属性“ appComponentFactory”的资源标识符

时间:2019-06-27 10:12:03

标签: android android-studio ionic-framework android-gradle

我正在尝试在android studio中构建一个离子项目。以前这个项目是在android studio中成功构建的,但是从过去3-4天开始就出现了问题。

我使用了 cordova-plugin-xapkreader 插件来创建扩展APK。

以下是我在android studio上遇到的错误-

AGPBI: {"kind":"error","text":"No resource identifier found for attribute \u0027appComponentFactory\u0027 in package \u0027android\u0027","sources":[{"file":"/Users/admin/Documents/IONIC/AndroidPro/platforms/android/build/intermediates/manifests/full/debug/AndroidManifest.xml","position":{"startLine":57}}],"original":"","tool":"AAPT"}
/Users/admin/Documents/IONIC/AndroidPro/platforms/android/build/intermediates/manifests/full/debug/AndroidManifest.xml:58: error: No resource identifier found for attribute 'appComponentFactory' in package 'android'
:processDebugResources FAILED
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':processDebugResources'.
> com.android.ide.common.process.ProcessException: Failed to execute aapt

我尝试过-

1)清洁 2)重建项目 3)制作项目

我还通过更改gradle的版本尝试了google的解决方案。 同时更新-

classpath com.android.tools.build:gradle:3.4.1

但没有一个解决问题。

这是离子项目中使用的依赖项-

dependencies {
    compile fileTree(dir: 'libs', include: '*.jar')
    // SUB-PROJECT DEPENDENCIES START
    debugCompile(project(path: "CordovaLib", configuration: "debug"))
    releaseCompile(project(path: "CordovaLib", configuration: "release"))
    debugCompile(project(path: "com.flyingsoftgames.xapkreader:downloader_library", configuration: "debug")){
        exclude module:("CordovaLib")
    }
    releaseCompile(project(path: "com.flyingsoftgames.xapkreader:downloader_library", configuration: "release")){
        exclude module:("CordovaLib")
    }
    debugCompile(project(path: "com.flyingsoftgames.xapkreader:library", configuration: "debug")){
        exclude module:("CordovaLib")
    }
    releaseCompile(project(path: "com.flyingsoftgames.xapkreader:library", configuration: "release")){
        exclude module:("CordovaLib")
    }
    compile "com.google.android.gms:play-services-base:+"
    compile "com.google.android.gms:play-services-base:11.0.4"
    compile "com.google.android.gms:play-services-ads:11.0.4"
    compile "com.android.support:customtabs:23.3.0"
    compile "com.android.support:support-v4:27.1.0"
    compile "com.facebook.android:facebook-android-sdk:4.22.1"
    compile "com.google.gms:google-services:+"
    compile "com.google.android.gms:play-services-tagmanager:+"
    compile "com.google.firebase:firebase-core:+"
    compile "com.google.firebase:firebase-messaging:+"
    compile "com.google.firebase:firebase-crash:+"
    compile "com.google.firebase:firebase-config:+"
    compile "com.google.android.gms:play-services-auth:11.8.0"
    compile "com.google.android.gms:play-services-identity:11.8.0"
    // SUB-PROJECT DEPENDENCIES END
}

我的AndroidManifest路径-/Users/admin/Documents/IONIC/AndroidPro/platforms/android/build/intermediates/manifests/full/debug/AndroidManifest.xml:58:

    <application
        android:appComponentFactory="appComponentFactory"
        android:hardwareAccelerated="true"
        android:icon="@mipmap/icon"
        android:label="@string/app_name"
        android:supportsRtl="true" >
    </application>

我在AndroidManifest内部的 android:appComponentFactory 这行上出错。

我还将Android Studio降级到3.0.0,还创建了一个新的ionic项目,在该项目中,我再次逐步添加了所有插件,然后按照以下命令构建项目-

ionic cordova build android 

但是我仍然遇到相同的错误。

我还尝试添加版本7.0.0,8.0.0,6.2.2的android平台,但错误仍然相同。

几天以来,我一直陷在这个问题中。并且仍在尝试解决此问题。如果有人遇到此错误,请帮助我。

0 个答案:

没有答案