Home > Mobile >  The Program type already present: android. Support. The v4. App. BackStackRecord $Op
The Program type already present: android. Support. The v4. App. BackStackRecord $Op

Time:10-24

Run the code, the problems, build error
 Program type already present: android support. The v4. App. BackStackRecord $Op 
Message {kind=ERROR, the text=Program type already present: android. Support the v4. App. BackStackRecord $Op, sources=[Unknown source file], tool name=Optional) of (D8)}

Although I don't know the specific meaning, feeling is the v4 packet conflict, but I can't find where the conflict
Crazy search solution on the net, no one work
For years, with my build. Gradle
 apply plugin: 'com. Android. Application' 

Android {
CompileSdkVersion 27
DefaultConfig {
ApplicationId "com. Example. The asus. Bs_im"
MinSdkVersion 16
TargetSdkVersion 27
VersionCode 1
VersionName "1.0"
TestInstrumentationRunner "android. Support. The test. The runner. AndroidJUnitRunner"
//use legacy for android 6.0
UseLibrary 'org. Apache. HTTP. Legacy'
}
BuildTypes {
Release {
MinifyEnabled false
ProguardFiles getDefaultProguardFile (' proguard - android. TXT), 'proguard - rules. Pro'

}
}
}

Dependencies {
API fileTree (include: [' *. Jar '], dir: 'libs')
API 'com. Android. Support. The constraint, the constraint - layout: 1.0.2'
Implementation 'com. Android. Support: appcompat - v7:27.1.1'
Implementation 'com. Android. Support: support - v4:27.1.1'
Implementation 'com. Squareup. Okhttp3: okhttp: 3.8.1'
Implementation 'com. Google. Code. Gson: gson: 2.8.1'
TestImplementation 'junit: junit: 4.12'
AndroidTestImplementation 'com. Android. Support. Test: runner: 1.0.1'
AndroidTestImplementation 'com. Android. Support. Test. Espresso: espresso - core: 3.0.1'
API project (' : easeui ')
Configurations {all *. Exclude group: 'com. Android. The support, the module:' support - v13}

}

The two or three hours, all sorts of ways are tried, hope to have the bosses to save me the spicy chicken

CodePudding user response:

Other places also added the v4 lib underneath, for example, if there are any try to delete

CodePudding user response:

Using gradle dependencies to see what other lib also rely on the v4, then in excludev4 below it

CodePudding user response:

reference 1/f, Unicode Escapes response:
elsewhere also added the v4 lib underneath, for example, if there are any try to delete


refer to the second floor jzp12 response:
using gradle dependencies to see what other lib also rely on the v4, then below it excludev4


So make no use, there is the problem, alas, heart good tired,

CodePudding user response:

I really freaked out, gradle dependencies later found if there is no dependence v4 app package, suit

CodePudding user response:

Solved the building Lord, you need to take screenshots of the project the v4 easeui inside the jar package deleted, although there is no reference in the project gradle, but seems still loaded into dependency,

CodePudding user response:

If you have repeated the jar will see in the libraries, and then use the dichotomy: annotation look half guide package and then sync if repeat
  • Related