运行Java 8,Gradle插件版本3.1.0
Error : Manifest merger failed : Attribute application@appComponentFactory value=(androidx.core.app.CoreComponentFactory) from [androidx.core:core:1.1.0-alpha03] AndroidManifest.xml:22:18-86
is also present at [com.android.support:support-compat:28.0.0] AndroidManifest.xml:22:18-91 value=(android.support.v4.app.CoreComponentFactory).
Suggestion: add 'tools:replace="android:appComponentFactory"' to <application> element at AndroidManifest.xml:15:5-70:19 to override.
AndroidManifest。xml
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="io.branch.branchster"
android:versionCode="20"
android:versionName="1.4.0" >
<uses-sdk
android:minSdkVersion="16"
android:targetSdkVersion="21" />
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
<application
android:largeHeap="true"
android:allowBackup="true"
android:name="io.branch.branchster.ApplicationMainClass"
android:icon="@drawable/ic_launcher"
android:label="@string/app_name">
<activity
android:name="io.branch.branchster.SplashActivity"
android:label="@string/app_name"
android:screenOrientation="portrait"
android:theme="@style/Theme.Transparent"
android:launchMode="singleTask" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
<!-- Branch URI scheme -->
<intent-filter>
<data android:scheme="branchster" android:host="open" />
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE" />
</intent-filter>
<!-- Branch App Links -->
<intent-filter android:autoVerify="true">
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE" />
<data android:scheme="https" android:host="pokewalk.app.link" />
</intent-filter>
</activity>
<activity
android:name="io.branch.branchster.MonsterViewerActivity"
android:theme="@style/Theme.Default"
android:launchMode="singleInstance"
android:screenOrientation="portrait">
</activity>
<activity
android:name="io.branch.branchster.MonsterCreatorActivity"
android:theme="@style/Theme.Default"
android:launchMode="singleInstance"
android:screenOrientation="portrait">
</activity>
<!-- Branch init -->
<meta-data android:name="io.branch.sdk.BranchKey" android:value="key_live_kp3tvgY7sTcQFt7qaluaonjmutgWYzkR" />
<!-- Branch testing (TestMode "true" to simulate fresh installs on dev environment) -->
<meta-data android:name="io.branch.sdk.TestMode" android:value="false" />
<meta-data android:name="com.facebook.sdk.ApplicationId" android:value="@string/facebook_app_id"/>
</application>
</manifest>
建筑gradle应用程序
apply plugin: 'com.android.application'
android {
compileSdkVersion 31
defaultConfig {
applicationId "com.eneff.branch.example.android"
minSdkVersion 16
targetSdkVersion 31
versionCode 4
versionName "1.0.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
repositories{
flatDir{
dirs 'libs'
}
}
dependencies {
implementation 'io.branch.sdk.android:library:5.+'
implementation 'com.google.firebase:firebase-appindexing:19.0.0'
implementation 'com.google.android.gms:play-services-ads-identifier:16+'
implementation fileTree(include: ['*.jar'], dir: 'libs')
implementation 'com.google.android.gms:play-services:6.5.87'
//noinspection GradleCompatible
implementation 'com.android.support:appcompat-v7:25.2.0'
//noinspection GradleCompatible
implementation 'com.android.support:design:28.0.0'
implementation 'androidx.browser:browser:1.0.0'
compile fileTree(dir: 'libs', include: ['*.jar'])
implementation 'io.branch.sdk.android:library:4.+'
implementation 'androidx.appcompat:appcompat:1.0.2'
implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
implementation 'androidx.legacy:legacy-support-v4:1.0.0'
implementation 'com.google.android.material:material:1.1.0-alpha04'
}```
我也有类似的问题。迁移到AndroidX后,问题得到解决!
Logcat错误: gradle应用de::
我对proguard有意见。错误是:找不到[com/google/android/gms/location/LocationResult]和[com/google/android/gms/location/LocationAvailability]的通用超类(有1个已知超类) proguard规则的代码。赞成的意见: 和实现是:
问题内容: 我正在尝试构建apk,但是firebase admob出现了问题,如果我在没有运行的情况下运行,那么apk可以完美运行并且构建时没有任何错误如何解决该问题? 我收到此错误: 在这种情况下,任务’:firebase_admob:verifyReleaseResources’的执行失败。 我正在使用此版本,甚至尝试了一些最新版本,但问题仍然存在。 问题答案: 我面临类似的错误。但我建议您制
(读者注意:这个问题只涉及代号1) 正如我之前在使用Codename One应用程序用于带电视遥控器的电视盒中所说,我在Play Store中发布了我的第一个适用于Android TV的Codename One应用程序。它适用于我的Android TV Box,但被拒绝了。 我收到了Google Play支持部门的以下电子邮件: 感谢您联系Android TV团队。 我发现我们在你的应用程序中发现
在Unity中生成APK时显示此错误: CommandInvokationFailure:无法合并android清单。C:/program files/java/jdk1.8.0_221\bin\java.exe-xmx4096m-dcom.android.sdkmanager.toolsdir=“C:/users/pc/appdata/local/android/android-sdk\tool