Program Type Already Present Glide
I'm trying to load image from Firebase using Glide. I start to meet error when I trying to implement Glide. During gradle sync, everything is fine. But, when i clean and rebuild the program, it will show following error.
`Program type already present: com.bumptech.glide.gifdecoder.GifDecoder$BitmapProvider Message{kind=ERROR, text=Program type already present: com.bumptech.glide.gifdecoder.GifDecoder$BitmapProvider, sources=[Unknown source file], tool name=Optional.of(D8)}`
I'm using sdk 26 as I met runtime error during use of sdk 27. I have made sure all the dependencies are not override sdk 27.
gradle:project
buildscript {
repositories {
google()
jcenter()
maven
{
url "https://maven.google.com"
}
}
dependencies {
classpath 'com.android.tools.build:gradle:3.1.0'
classpath 'com.google.gms:google-services:4.2.0'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
allprojects {
repositories {
google()
jcenter()
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}
gradle: app
apply plugin: 'com.android.application'
android {
compileSdkVersion 26
defaultConfig {
applicationId "com.example.user.uploadimage7"
minSdkVersion 21
targetSdkVersion 26
versionCode 1
versionName "1.0"
testInstrumentationRunner
"android.support.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'),
'proguard-rules.pro'
}
}
}
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation 'com.android.support:appcompat-v7:26.1.0'
implementation 'com.google.firebase:firebase-core:16.0.1'
implementation 'com.google.firebase:firebase-storage:16.0.1'
implementation 'com.google.firebase:firebase-auth:16.0.1'
implementation 'com.firebaseui:firebase-ui-storage:3.1.0'
implementation 'com.android.support:support-fragment:26.1.0'
implementation 'com.android.support:design:26.1.0'
implementation 'com.github.bumptech.glide:glide:4.3.1'
annotationProcessor 'com.github.bumptech.glide:compiler:4.3.1'
//implementation 'jp.wasabeef:glide-transformations:3.0.0'
testImplementation 'junit:junit:4.12'
androidTestImplementation 'com.android.support.test:runner:1.0.1'
androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'
}
apply plugin: 'com.google.gms.google-services'
I have tried "exclude group: "com.android.support" but it doesn't work
android firebase android-studio android-glide glide
add a comment |
I'm trying to load image from Firebase using Glide. I start to meet error when I trying to implement Glide. During gradle sync, everything is fine. But, when i clean and rebuild the program, it will show following error.
`Program type already present: com.bumptech.glide.gifdecoder.GifDecoder$BitmapProvider Message{kind=ERROR, text=Program type already present: com.bumptech.glide.gifdecoder.GifDecoder$BitmapProvider, sources=[Unknown source file], tool name=Optional.of(D8)}`
I'm using sdk 26 as I met runtime error during use of sdk 27. I have made sure all the dependencies are not override sdk 27.
gradle:project
buildscript {
repositories {
google()
jcenter()
maven
{
url "https://maven.google.com"
}
}
dependencies {
classpath 'com.android.tools.build:gradle:3.1.0'
classpath 'com.google.gms:google-services:4.2.0'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
allprojects {
repositories {
google()
jcenter()
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}
gradle: app
apply plugin: 'com.android.application'
android {
compileSdkVersion 26
defaultConfig {
applicationId "com.example.user.uploadimage7"
minSdkVersion 21
targetSdkVersion 26
versionCode 1
versionName "1.0"
testInstrumentationRunner
"android.support.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'),
'proguard-rules.pro'
}
}
}
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation 'com.android.support:appcompat-v7:26.1.0'
implementation 'com.google.firebase:firebase-core:16.0.1'
implementation 'com.google.firebase:firebase-storage:16.0.1'
implementation 'com.google.firebase:firebase-auth:16.0.1'
implementation 'com.firebaseui:firebase-ui-storage:3.1.0'
implementation 'com.android.support:support-fragment:26.1.0'
implementation 'com.android.support:design:26.1.0'
implementation 'com.github.bumptech.glide:glide:4.3.1'
annotationProcessor 'com.github.bumptech.glide:compiler:4.3.1'
//implementation 'jp.wasabeef:glide-transformations:3.0.0'
testImplementation 'junit:junit:4.12'
androidTestImplementation 'com.android.support.test:runner:1.0.1'
androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'
}
apply plugin: 'com.google.gms.google-services'
I have tried "exclude group: "com.android.support" but it doesn't work
android firebase android-studio android-glide glide
add a comment |
I'm trying to load image from Firebase using Glide. I start to meet error when I trying to implement Glide. During gradle sync, everything is fine. But, when i clean and rebuild the program, it will show following error.
`Program type already present: com.bumptech.glide.gifdecoder.GifDecoder$BitmapProvider Message{kind=ERROR, text=Program type already present: com.bumptech.glide.gifdecoder.GifDecoder$BitmapProvider, sources=[Unknown source file], tool name=Optional.of(D8)}`
I'm using sdk 26 as I met runtime error during use of sdk 27. I have made sure all the dependencies are not override sdk 27.
gradle:project
buildscript {
repositories {
google()
jcenter()
maven
{
url "https://maven.google.com"
}
}
dependencies {
classpath 'com.android.tools.build:gradle:3.1.0'
classpath 'com.google.gms:google-services:4.2.0'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
allprojects {
repositories {
google()
jcenter()
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}
gradle: app
apply plugin: 'com.android.application'
android {
compileSdkVersion 26
defaultConfig {
applicationId "com.example.user.uploadimage7"
minSdkVersion 21
targetSdkVersion 26
versionCode 1
versionName "1.0"
testInstrumentationRunner
"android.support.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'),
'proguard-rules.pro'
}
}
}
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation 'com.android.support:appcompat-v7:26.1.0'
implementation 'com.google.firebase:firebase-core:16.0.1'
implementation 'com.google.firebase:firebase-storage:16.0.1'
implementation 'com.google.firebase:firebase-auth:16.0.1'
implementation 'com.firebaseui:firebase-ui-storage:3.1.0'
implementation 'com.android.support:support-fragment:26.1.0'
implementation 'com.android.support:design:26.1.0'
implementation 'com.github.bumptech.glide:glide:4.3.1'
annotationProcessor 'com.github.bumptech.glide:compiler:4.3.1'
//implementation 'jp.wasabeef:glide-transformations:3.0.0'
testImplementation 'junit:junit:4.12'
androidTestImplementation 'com.android.support.test:runner:1.0.1'
androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'
}
apply plugin: 'com.google.gms.google-services'
I have tried "exclude group: "com.android.support" but it doesn't work
android firebase android-studio android-glide glide
I'm trying to load image from Firebase using Glide. I start to meet error when I trying to implement Glide. During gradle sync, everything is fine. But, when i clean and rebuild the program, it will show following error.
`Program type already present: com.bumptech.glide.gifdecoder.GifDecoder$BitmapProvider Message{kind=ERROR, text=Program type already present: com.bumptech.glide.gifdecoder.GifDecoder$BitmapProvider, sources=[Unknown source file], tool name=Optional.of(D8)}`
I'm using sdk 26 as I met runtime error during use of sdk 27. I have made sure all the dependencies are not override sdk 27.
gradle:project
buildscript {
repositories {
google()
jcenter()
maven
{
url "https://maven.google.com"
}
}
dependencies {
classpath 'com.android.tools.build:gradle:3.1.0'
classpath 'com.google.gms:google-services:4.2.0'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
allprojects {
repositories {
google()
jcenter()
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}
gradle: app
apply plugin: 'com.android.application'
android {
compileSdkVersion 26
defaultConfig {
applicationId "com.example.user.uploadimage7"
minSdkVersion 21
targetSdkVersion 26
versionCode 1
versionName "1.0"
testInstrumentationRunner
"android.support.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'),
'proguard-rules.pro'
}
}
}
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation 'com.android.support:appcompat-v7:26.1.0'
implementation 'com.google.firebase:firebase-core:16.0.1'
implementation 'com.google.firebase:firebase-storage:16.0.1'
implementation 'com.google.firebase:firebase-auth:16.0.1'
implementation 'com.firebaseui:firebase-ui-storage:3.1.0'
implementation 'com.android.support:support-fragment:26.1.0'
implementation 'com.android.support:design:26.1.0'
implementation 'com.github.bumptech.glide:glide:4.3.1'
annotationProcessor 'com.github.bumptech.glide:compiler:4.3.1'
//implementation 'jp.wasabeef:glide-transformations:3.0.0'
testImplementation 'junit:junit:4.12'
androidTestImplementation 'com.android.support.test:runner:1.0.1'
androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'
}
apply plugin: 'com.google.gms.google-services'
I have tried "exclude group: "com.android.support" but it doesn't work
android firebase android-studio android-glide glide
android firebase android-studio android-glide glide
edited Nov 23 '18 at 11:34
Aniruddh Parihar
2,18911027
2,18911027
asked Nov 23 '18 at 11:33
HarukoHaruko
184
184
add a comment |
add a comment |
2 Answers
2
active
oldest
votes
I recommend you to update your SDK to version 27 and do the following changes. First, update your gradle to the latest version 3.2.1
:
classpath 'com.android.tools.build:gradle:3.2.1'
Now change the following lines of code:
implementation 'com.google.firebase:firebase-core:16.0.1'
implementation 'com.google.firebase:firebase-storage:16.0.1'
implementation 'com.google.firebase:firebase-auth:16.0.1'
implementation 'com.firebaseui:firebase-ui-storage:3.1.0'
to
implementation 'com.google.firebase:firebase-core:16.0.5'
implementation 'com.google.firebase:firebase-storage:16.0.5'
implementation 'com.google.firebase:firebase-auth:16.0.5'
implementation 'com.firebaseui:firebase-ui-storage:4.2.1'
And for Glide, please change this line:
implementation "com.github.bumptech.glide:glide:4.3.1"
to
implementation "com.github.bumptech.glide:glide:4.7.1"
Hi Haruko! Have you tried my solution above, does it work?
– Alex Mamo
Nov 24 '18 at 10:15
Hi thanks for your answer. The problem has been solved by deleting the duplicate jar. However, the update of gradle in your answer do help me to implement sdk 27 without any runtime error. Thanks
– Haruko
Nov 26 '18 at 7:32
Good to hear that it worked! In this case, please consider accepting my answer by clicking the checkmark (✔️) on the left side under the vote arrows. Should change the color in green. I'd appreciate it. Thanks!
– Alex Mamo
Nov 26 '18 at 7:33
If you think that my answer will also help future visitors, please also consider give a vote-up (👍). Thanks!
– Alex Mamo
Nov 26 '18 at 7:34
add a comment |
The error is solved by deleting the duplicate .jar in the libs folder
add a comment |
Your Answer
StackExchange.ifUsing("editor", function () {
StackExchange.using("externalEditor", function () {
StackExchange.using("snippets", function () {
StackExchange.snippets.init();
});
});
}, "code-snippets");
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "1"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53445931%2fprogram-type-already-present-glide%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
2 Answers
2
active
oldest
votes
2 Answers
2
active
oldest
votes
active
oldest
votes
active
oldest
votes
I recommend you to update your SDK to version 27 and do the following changes. First, update your gradle to the latest version 3.2.1
:
classpath 'com.android.tools.build:gradle:3.2.1'
Now change the following lines of code:
implementation 'com.google.firebase:firebase-core:16.0.1'
implementation 'com.google.firebase:firebase-storage:16.0.1'
implementation 'com.google.firebase:firebase-auth:16.0.1'
implementation 'com.firebaseui:firebase-ui-storage:3.1.0'
to
implementation 'com.google.firebase:firebase-core:16.0.5'
implementation 'com.google.firebase:firebase-storage:16.0.5'
implementation 'com.google.firebase:firebase-auth:16.0.5'
implementation 'com.firebaseui:firebase-ui-storage:4.2.1'
And for Glide, please change this line:
implementation "com.github.bumptech.glide:glide:4.3.1"
to
implementation "com.github.bumptech.glide:glide:4.7.1"
Hi Haruko! Have you tried my solution above, does it work?
– Alex Mamo
Nov 24 '18 at 10:15
Hi thanks for your answer. The problem has been solved by deleting the duplicate jar. However, the update of gradle in your answer do help me to implement sdk 27 without any runtime error. Thanks
– Haruko
Nov 26 '18 at 7:32
Good to hear that it worked! In this case, please consider accepting my answer by clicking the checkmark (✔️) on the left side under the vote arrows. Should change the color in green. I'd appreciate it. Thanks!
– Alex Mamo
Nov 26 '18 at 7:33
If you think that my answer will also help future visitors, please also consider give a vote-up (👍). Thanks!
– Alex Mamo
Nov 26 '18 at 7:34
add a comment |
I recommend you to update your SDK to version 27 and do the following changes. First, update your gradle to the latest version 3.2.1
:
classpath 'com.android.tools.build:gradle:3.2.1'
Now change the following lines of code:
implementation 'com.google.firebase:firebase-core:16.0.1'
implementation 'com.google.firebase:firebase-storage:16.0.1'
implementation 'com.google.firebase:firebase-auth:16.0.1'
implementation 'com.firebaseui:firebase-ui-storage:3.1.0'
to
implementation 'com.google.firebase:firebase-core:16.0.5'
implementation 'com.google.firebase:firebase-storage:16.0.5'
implementation 'com.google.firebase:firebase-auth:16.0.5'
implementation 'com.firebaseui:firebase-ui-storage:4.2.1'
And for Glide, please change this line:
implementation "com.github.bumptech.glide:glide:4.3.1"
to
implementation "com.github.bumptech.glide:glide:4.7.1"
Hi Haruko! Have you tried my solution above, does it work?
– Alex Mamo
Nov 24 '18 at 10:15
Hi thanks for your answer. The problem has been solved by deleting the duplicate jar. However, the update of gradle in your answer do help me to implement sdk 27 without any runtime error. Thanks
– Haruko
Nov 26 '18 at 7:32
Good to hear that it worked! In this case, please consider accepting my answer by clicking the checkmark (✔️) on the left side under the vote arrows. Should change the color in green. I'd appreciate it. Thanks!
– Alex Mamo
Nov 26 '18 at 7:33
If you think that my answer will also help future visitors, please also consider give a vote-up (👍). Thanks!
– Alex Mamo
Nov 26 '18 at 7:34
add a comment |
I recommend you to update your SDK to version 27 and do the following changes. First, update your gradle to the latest version 3.2.1
:
classpath 'com.android.tools.build:gradle:3.2.1'
Now change the following lines of code:
implementation 'com.google.firebase:firebase-core:16.0.1'
implementation 'com.google.firebase:firebase-storage:16.0.1'
implementation 'com.google.firebase:firebase-auth:16.0.1'
implementation 'com.firebaseui:firebase-ui-storage:3.1.0'
to
implementation 'com.google.firebase:firebase-core:16.0.5'
implementation 'com.google.firebase:firebase-storage:16.0.5'
implementation 'com.google.firebase:firebase-auth:16.0.5'
implementation 'com.firebaseui:firebase-ui-storage:4.2.1'
And for Glide, please change this line:
implementation "com.github.bumptech.glide:glide:4.3.1"
to
implementation "com.github.bumptech.glide:glide:4.7.1"
I recommend you to update your SDK to version 27 and do the following changes. First, update your gradle to the latest version 3.2.1
:
classpath 'com.android.tools.build:gradle:3.2.1'
Now change the following lines of code:
implementation 'com.google.firebase:firebase-core:16.0.1'
implementation 'com.google.firebase:firebase-storage:16.0.1'
implementation 'com.google.firebase:firebase-auth:16.0.1'
implementation 'com.firebaseui:firebase-ui-storage:3.1.0'
to
implementation 'com.google.firebase:firebase-core:16.0.5'
implementation 'com.google.firebase:firebase-storage:16.0.5'
implementation 'com.google.firebase:firebase-auth:16.0.5'
implementation 'com.firebaseui:firebase-ui-storage:4.2.1'
And for Glide, please change this line:
implementation "com.github.bumptech.glide:glide:4.3.1"
to
implementation "com.github.bumptech.glide:glide:4.7.1"
answered Nov 23 '18 at 11:42
Alex MamoAlex Mamo
43k82860
43k82860
Hi Haruko! Have you tried my solution above, does it work?
– Alex Mamo
Nov 24 '18 at 10:15
Hi thanks for your answer. The problem has been solved by deleting the duplicate jar. However, the update of gradle in your answer do help me to implement sdk 27 without any runtime error. Thanks
– Haruko
Nov 26 '18 at 7:32
Good to hear that it worked! In this case, please consider accepting my answer by clicking the checkmark (✔️) on the left side under the vote arrows. Should change the color in green. I'd appreciate it. Thanks!
– Alex Mamo
Nov 26 '18 at 7:33
If you think that my answer will also help future visitors, please also consider give a vote-up (👍). Thanks!
– Alex Mamo
Nov 26 '18 at 7:34
add a comment |
Hi Haruko! Have you tried my solution above, does it work?
– Alex Mamo
Nov 24 '18 at 10:15
Hi thanks for your answer. The problem has been solved by deleting the duplicate jar. However, the update of gradle in your answer do help me to implement sdk 27 without any runtime error. Thanks
– Haruko
Nov 26 '18 at 7:32
Good to hear that it worked! In this case, please consider accepting my answer by clicking the checkmark (✔️) on the left side under the vote arrows. Should change the color in green. I'd appreciate it. Thanks!
– Alex Mamo
Nov 26 '18 at 7:33
If you think that my answer will also help future visitors, please also consider give a vote-up (👍). Thanks!
– Alex Mamo
Nov 26 '18 at 7:34
Hi Haruko! Have you tried my solution above, does it work?
– Alex Mamo
Nov 24 '18 at 10:15
Hi Haruko! Have you tried my solution above, does it work?
– Alex Mamo
Nov 24 '18 at 10:15
Hi thanks for your answer. The problem has been solved by deleting the duplicate jar. However, the update of gradle in your answer do help me to implement sdk 27 without any runtime error. Thanks
– Haruko
Nov 26 '18 at 7:32
Hi thanks for your answer. The problem has been solved by deleting the duplicate jar. However, the update of gradle in your answer do help me to implement sdk 27 without any runtime error. Thanks
– Haruko
Nov 26 '18 at 7:32
Good to hear that it worked! In this case, please consider accepting my answer by clicking the checkmark (✔️) on the left side under the vote arrows. Should change the color in green. I'd appreciate it. Thanks!
– Alex Mamo
Nov 26 '18 at 7:33
Good to hear that it worked! In this case, please consider accepting my answer by clicking the checkmark (✔️) on the left side under the vote arrows. Should change the color in green. I'd appreciate it. Thanks!
– Alex Mamo
Nov 26 '18 at 7:33
If you think that my answer will also help future visitors, please also consider give a vote-up (👍). Thanks!
– Alex Mamo
Nov 26 '18 at 7:34
If you think that my answer will also help future visitors, please also consider give a vote-up (👍). Thanks!
– Alex Mamo
Nov 26 '18 at 7:34
add a comment |
The error is solved by deleting the duplicate .jar in the libs folder
add a comment |
The error is solved by deleting the duplicate .jar in the libs folder
add a comment |
The error is solved by deleting the duplicate .jar in the libs folder
The error is solved by deleting the duplicate .jar in the libs folder
answered Nov 26 '18 at 7:30
HarukoHaruko
184
184
add a comment |
add a comment |
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53445931%2fprogram-type-already-present-glide%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown