任务“:app:processDebugMainManifest”执行失败

问题描述 投票:0回答:2

我想问一件事,我有一个应用程序,前几天,我的应用程序运行完美,今天不知何故,我的应用程序无法在 Android 上运行(当我启动它时),但是当我在 IOS 上运行时,它正在工作,日志显示如下:

> Task :app:processDebugMainManifest FAILED
[:react-native-google-signin_google-signin] /Users/mydocs/node_modules/@react-native-google-signin/google-signin/android/build/intermediates/merged_manifest/debug/AndroidManifest.xml Warning:
        Package name 'com.reactnativegooglesignin' used in: :react-native-google-signin_google-signin, :react-native-google-signin-google-signin.
/Users/mydocs/android/app/src/main/AndroidManifest.xml Error:
        android:exported needs to be explicitly specified for <activity>. Apps targeting Android 12 and higher are required to specify an explicit value for `android:exported` when the corresponding component has an intent filter defined. See https://developer.android.com/guide/topics/manifest/activity-element#exported for details.
/Users/mydocs/android/app/src/main/AndroidManifest.xml Error:
        android:exported needs to be explicitly specified for <activity>. Apps targeting Android 12 and higher are required to specify an explicit value for `android:exported` when the corresponding component has an intent filter defined. See https://developer.android.com/guide/topics/manifest/activity-element#exported for details.

See http://g.co/androidstudio/manifest-merger for more information about the manifest merger.


FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':app:processDebugMainManifest'.
> Manifest merger failed with multiple errors, see logs

这是我的清单:

<activity android:name=".MainActivity" android:label="@string/app_name" android:configChanges="keyboard|keyboardHidden|orientation|screenSize|uiMode" android:launchMode="singleTask" android:windowSoftInputMode="adjustResize" android:theme="@style/Theme.App.SplashScreen" android:exported="true">
      <intent-filter>
        <action android:name="android.intent.action.MAIN"/>
        <category android:name="android.intent.category.LAUNCHER"/>
      </intent-filter>
      <intent-filter>
        <action android:name="android.intent.action.VIEW"/>
        <category android:name="android.intent.category.DEFAULT"/>
        <category android:name="android.intent.category.BROWSABLE"/>
        <data android:scheme="myapp" android:host="login"/>
      </intent-filter>
    </activity>

我尝试搜索 gradlew 错误,但仍然没有弄清楚

react-native gradlew
2个回答
3
投票

对于我们来说改变:

实施 'com.facebook.android:facebook-android-sdk:latest.release'

'实现'com.facebook.android:facebook-android-sdk:14.1.1'

在 build.gradle 上似乎可以工作

https://github.com/facebook/facebook-android-sdk/issues/1114

也许它也能解决你的问题


0
投票

对我来说改变:

androidTestImplementation 'androidx.test.espresso:espresso-core:3.0.0'

androidTestImplementation 'androidx.test.espresso:espresso-core:3.5.1'

工作了

© www.soinside.com 2019 - 2024. All rights reserved.