所以,自从我在AndroidManifest文件中添加了一个服务块后,我一直收到一个错误,请查看我的清单。
错误显示:
“失败[INSTALL_PARSE_FAILED_MANIFEST_MALFORMED:在安装PackageLI:/data/app/vmdl1643630122.tmp/base.apk(位于二进制XML文件行#42):com.example.shoutout.MainActivity:Targeting S(版本31及以上)要求在存在意图筛选器时定义android:exported的显式值]”
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.example.shoutout">
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.CAMERA" />
<uses-permission android:name="android.permission.RECORD_AUDIO" />
<uses-permission android:name="android.permission.BLUETOOTH"/>
<uses-permission android:name="android.permission.MODIFY_AUDIO_SETTINGS"/>
<application
android:label="shoutout"
android:icon="@mipmap/ic_launcher">
<service android:name="com.example.shoutout.backgroundService"
android:exported="false">
<intent-filter>
<action android:name="com.example.app.START_BACKGROUND" />
</intent-filter>
</service>
<activity
android:name=".MainActivity"
android:launchMode="singleTop"
android:theme="@style/LaunchTheme"
android:configChanges="orientation|keyboardHidden|keyboard|screenSize|smallestScreenSize|locale|layoutDirection|fontScale|screenLayout|density|uiMode"
android:hardwareAccelerated="true"
android:windowSoftInputMode="adjustResize">
<!-- Specifies an Android theme to apply to this Activity as soon as
the Android process has started. This theme is visible to the user
while the Flutter UI initializes. After that, this theme continues
to determine the Window background behind the Flutter UI. -->
<meta-data
android:name="io.flutter.embedding.android.NormalTheme"
android:resource="@style/NormalTheme"
/>
<!-- Displays an Android View that continues showing the launch screen
Drawable until Flutter paints its first frame, then this splash
screen fades out. A splash screen is useful to avoid any visual
gap between the end of Android's launch screen and the painting of
Flutter's first frame. -->
<meta-data
android:name="io.flutter.embedding.android.SplashScreenDrawable"
android:resource="@drawable/launch_background"
/>
<intent-filter>
<action android:name="android.intent.action.MAIN"/>
<category android:name="android.intent.category.LAUNCHER"/>
</intent-filter>
</activity>
<!-- Don't delete the meta-data below.
This is used by the Flutter tool to generate GeneratedPluginRegistrant.java -->
<meta-data
android:name="flutterEmbedding"
android:value="2" />
</application>
</manifest>
错误显示您需要将android:exported=“true”
添加到您的活动中,因为您有意向过滤器
试试这个:
<activity
android:name=".MainActivity"
android:launchMode="singleTop"
android:theme="@style/LaunchTheme"
android:configChanges="orientation|keyboardHidden|keyboard|screenSize|smallestScreenSize|locale|layoutDirection|fontScale|screenLayout|density|uiMode"
android:hardwareAccelerated="true"
android:windowSoftInputMode="adjustResize"
android:exported="true"> // add android:exported here
首先我复制并放置 我的“src/main/libs/”文件夹中的google-play-services.jar 我的“src/main/libs/”文件夹中的Android-support-v4.jar 于是我两人都这样做了: null 我的%project%/build.gradle文件如下所示: 我的%project%/%module%/build.gradle文件如下所示:
上面的代码是我的provider_paths.xml 然后我把这个加到我的舱单上 然后,当我尝试运行应用程序时,它的giving me error Manifest合并失败,出现多个错误,请参阅日志
我实现了到我的应用gradle,然后我得到了以下错误试图建立我的项目: 清单合并失败:属性application@appComponentFactory值=(android.support.v4.app.CoreComponentFactory)来自[com.android.support:support compat:28.0.0]AndroidManifest。xml:22:18-91也出现在
我错过了什么依赖吗?
我正在尝试用discord4j构建一个discordbot。我将这行代码添加到build.gradle文件中。 然而,在我尝试构建应用程序后,构建在task < code >:app:checkdebugduplicateclass 处失败。 我注意到模块不和不中有一个重复的类。搜索解决方案后,我找到了这个答案: 有时,重复类异常意味着某个依赖项隐式使用了项目中使用的某个库的较旧或较新版本, 但是
明显合并失败,存在多个错误。查看日志: 错误:任务“:app:processDebugManifest”的执行失败。