我是android studio的初学者,我得到了运行时错误
Program type already present:
android.support.v7.util.AsyncListUtil$DataCallback
Message{kind=ERROR, text=Program type already present:
android.support.v7.util.AsyncListUtil$DataCallback, sources=[Unknown source
file], tool name=Optional.of(D8)}
我搜查了一下,找不到任何东西,我认为它可能与我的清单文件有关。这是我的清单。
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
package="com.example.dadei.cashmob">
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />
<uses-permission android:name="android.permission.CHANGE_WIFI_STATE" />
<uses-permission android:name="android.permission.READ_CALENDAR" />
<uses-permission android:name="android.permission.WRITE_CALENDAR" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.VIBRATE" />
<meta-data android:name="com.google.android.gms.version"
android:value="@integer/google_play_services_version" />
<application
android:allowBackup="true"
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:roundIcon="@mipmap/ic_launcher_round"
android:supportsRtl="true"
android:hardwareAccelerated="true"
android:theme="@style/AppTheme">
<activity
android:name=".MainActivity"
android:theme="@style/Theme.AppCompat.Light.NoActionBar">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity
android:name=".Homescreen"
android:theme="@style/Theme.AppCompat.Light.NoActionBar" />
<activity
android:name=".signup"
android:theme="@style/Theme.AppCompat.Light.NoActionBar" />
<activity android:name=".videos"></activity>
</application>
</manifest>
继承我的依赖。这个错误可能就好了。
implementation 'com.android.support:appcompat-v7:27.1.1'
implementation 'com.google.android.gms:play-services-location:15.0.0'
implementation 'com.android.support.constraint:constraint-layout:1.1.0'
implementation 'com.google.firebase:firebase-auth:15.0.0'
implementation 'com.google.firebase:firebase-database:15.0.0'
implementation 'com.google.android.gms:play-services-auth:15.0.0'
implementation 'com.android.support:support-v4:27.1.1'
testImplementation 'junit:junit:4.12'
androidTestImplementation 'com.android.support.test:runner:1.0.2'
androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'
implementation 'com.google.android.gms:play-services-ads:15.0.0'
compile 'com.google.android.gms:play-services-base:15.0.0'
compile 'com.google.android.gms:play-services-ads:15.0.0'
compile 'com.google.android.gms:play-services-location:15.0.0'
compile 'com.google.android.gms:play-services-plus:15.0.0'
implementation 'com.android.support:design:27.1.0'
compile 'com.android.support:support-v4:27.1.0'
compile 'com.android.support:recyclerview-v7:27.1.0'
compile 'com.android.support:multidex:1.0.3'
compile 'com.google.android.gms:play-services-ads:15.0.0'
compile 'com.android.support:support-annotations:27.1.1'
compile 'com.squareup.picasso:picasso:2.5.2' //for Inmobi
compile name: 'adcolony-sdk-3.2.1', ext: 'aar'
compile name: 'mmedia-6.4.0', ext: 'aar'
compile name: 'mobvista_alphab', ext: 'aar'
compile name: 'mobvista_appwall', ext: 'aar'
compile name: 'mobvista_appwallext', ext: 'aar'
compile name: 'mobvista_common', ext: 'aar'
compile name: 'mobvista_interstitial', ext: 'aar'
compile name: 'mobvista_mvdownloads', ext: 'aar'
compile name: 'mobvista_mvjscommon', ext: 'aar'
compile name: 'mobvista_mvnative', ext: 'aar'
compile name: 'mobvista_nativeex', ext: 'aar'
compile name: 'mobvista_offerwall', ext: 'aar'
compile name: 'mobvista_playercommon', ext: 'aar'
compile name: 'mobvista_reward', ext: 'aar'
compile name: 'mobvista_videocommon', ext: 'aar'
compile name: 'mobvista_videofeeds', ext: 'aar'
当我同步我的gradle时,我没有收到错误,但为了以防万一。