How to install lettuce library on Android studio in Gradle files ?
https://lettuce.io
is there any solution to compile the library ?
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation 'androidx.appcompat:appcompat:1.0.0'
implementation 'androidx.constraintlayout:constraintlayout:1.1.2'
implementation 'androidx.legacy:legacy-support-v4:1.0.0'
implementation 'com.google.android.material:material:1.0.0'
testImplementation 'junit:junit:4.12'
androidTestImplementation 'androidx.test:runner:1.1.0'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.1.0’
}
In the lettuce's getting started section there is a section called For Gradle Users on how to add the library from gradle. I think just adding:
implementation 'io.lettuce:lettuce-core:5.1.3.RELEASE'
would work. You must check if you must adjust your current dependencies and/or modify your proguard rules.
Hope I helped.
Related
I want to add ads to my project but when i add the line below, it doesn't work:
implementation 'com.google.android.gms:play-services-ads:18.1.0'
these are the dependencies from the build.gradle:
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation"org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
implementation 'androidx.appcompat:appcompat:1.0.2'
implementation 'androidx.core:core-ktx:1.0.1'
implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
implementation 'androidx.gridlayout:gridlayout:1.0.0'
implementation 'com.google.android.gms:play-services-ads:18.1.0'
testImplementation 'junit:junit:4.12'
androidTestImplementation 'androidx.test:runner:1.1.1'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.1.1'
}
It is likely, that you might not have added the Google Services Gradle Plugin to the project, as well as the google-services.json file (which can be downloaded from the Firebase console) - and so your application fails to authenticate.
Adding the com.google.android.gms.ads.APPLICATION_ID into the AndroidManifest.xml has the same effect, because the Play Services plugin adds the values from google-services.json at build-time.
... when only using AdMob, the second option should be preferred.
Do you have inside top-level build.gradle file reference to the google() repo or to maven { url "https://maven.google.com" }? Do you have some specific error inside log?
Try to create a new project and copy old project files and paste in a new one. If it should help!
I want to add an Action Bar to my app. And there is a problem appearing
error: package android.support.v7.widget does not exist.
I cannot fix that problem whatever i tried. Any solution on internet does not work on me.I do not know why this is happening and i am really tired of it. I am the beginner and this problem drives me crazy.I've tried to change
android.useAndroidX=true --> to false
and
android.enableJetifier=true --> false on gradle.properties
Yeah, its work!But here is another problem appearing:
java.lang.RuntimeException: Manifest merger failed : Attribute application#appComponentFactory value=(android.support.v4.app.CoreComponentFactory) from [com.android.support:support-compat:28.0.0] AndroidManifest.xml:22:18-91
Here is my build.gradle:
compileSdkVersion 29
buildToolsVersion '29.0.1'
minSdkVersion 21
targetSdkVersion 29
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation 'androidx.appcompat:appcompat:1.1.0-rc01'
implementation 'androidx.constraintlayout:constraintlayout:2.0.0-beta2'
implementation 'com.google.android.material:material:1.1.0-alpha07'
testİmplementation 'junit:junit:4.13-beta-3'
androidTestİmplementation 'androidx.test:runner:1.3.0-alpha01'
androidTestİmplementation 'androidx.test.espresso:espresso-core:3.3.0-alpha01'
implementation 'com.android.support:appcompat-v7:28.0.0'
implementation 'com.android.support:support-v4:28.0.0'
implementation 'com.android.support:support-v13:28.0.0'
}
Could be problem on implementation methods, i do not know. May be i have a problem on SDK versions. I have tried migrate to AndroidX and not worked.
Try replacing
android.support.v7.widget
with
androidx.appcompat.widget
Welcome to stackoverflow!
You have both support library and androidx library in one project...that's your issue...
Change the support libraries to the preferred AndroidX library...
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation 'androidx.appcompat:appcompat:1.1.0-rc01'
implementation 'androidx.constraintlayout:constraintlayout:2.0.0-beta2'
implementation 'com.google.android.material:material:1.1.0-alpha07'
testİmplementation 'junit:junit:4.13-beta-3'
androidTestİmplementation 'androidx.test:runner:1.3.0-alpha01'
androidTestİmplementation 'androidx.test.espresso:espresso-core:3.3.0-alpha01'
implementation 'androidx.legacy:legacy-support-v4:1.0.0'
implementation 'androidx.legacy:legacy-support-v13:1.0.0'
}
Or you can probably Migrate to AndroidX and it can be done right in Android Studio
Simply go to Refactor > Migrate to AndroidX > Migrate
Adding an Action Bar
<androidx.appcompat.widget.Toolbar
android:id="#+id/toolbar"
android:layout_width="match_parent"
android:layout_height="?attr/actionBarSize"
android:background="#color/yourColor"/>
I hope this helps....
Please try this:
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation 'androidx.appcompat:appcompat:1.0.2'
implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
implementation 'com.google.android.material:material:1.0.0'
implementation 'androidx.vectordrawable:vectordrawable:1.0.0'
testImplementation 'junit:junit:4.12'
androidTestImplementation 'androidx.test:runner:1.1.0'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.1.0'
I'm following the tutorial https://www.youtube.com/watch?v=X5AOrAhyrkg&list=PLRRNzqzbPLd8Qldg1J3LFesfXW9hWM_t4&index=3&t=0s
But when I implement the library 'me.zhanghai.android.materialprogressbar:library:1.6.1' it causes some error.
I did take a look at Android Material and appcompat Manifest merger failed but when I try that solution on It doesn't work for me. I know that I'm using the latest version of AndroidX which is the problem. But I haven't figured it out yet.
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation 'com.android.support:appcompat-v7:28.0.0'
implementation 'com.android.support:support-v4:28.0.0'
implementation 'com.android.support:design:28.0.0'
implementation 'com.android.support:cardview-v7:28.0.0'
implementation 'com.android.support:recyclerview-v7:28.0.0'
implementation 'me.zhanghai.android.materialprogressbar:library:1.6.1'
implementation 'com.android.support.constraint:constraint-layout:1.1.3'
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'
}
So I hope to find a solution
This is what I encountered previously with third party libraries. This issue occurs when you are currently migrated to Androidx and the third party lib (in your case, 'me.zhanghai.android.materialprogressbar:library:1.6.1') is still using android support and it will clash causing the merge dex error.
I don't think if this will help, but do try adding this.
('me.zhanghai.android.materialprogressbar:library:1.6.1'){
exclude group: "com.android.support"
}
If it doesn't, you might have to post your issue on their github page and see if they can promise u an answer.
I've been trying to add the design library but everytime i do it i get this unable to merge dex error
i've tried using different versions of SDK's already and other design versions but it dosen't seem to be working
Here is an image of the error:
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation 'com.android.support:appcompat-v7:26.0.1'
implementation 'com.android.support.constraint:constraint-layout:1.1.3'
implementation 'com.android.support:support-v4:26.0.1'
compile 'com.android.support:design:26.0.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.github.clans:fab:1.6.4'
implementation 'com.github.bumptech.glide:glide:4.8.0'
implementation 'com.theartofdev.edmodo:android-image-cropper:2.6.0'
implementation 'de.hdodenhof:circleimageview:2.2.0'
implementation 'com.rengwuxian.materialedittext:library:2.1.4'
implementation 'com.android.support:recyclerview-v7:26.0.1'
implementation 'id.zelory:compressor:2.0.0'
implementation 'com.astuetz:pagerslidingtabstrip:1.0.1'
compile 'com.github.javiersantos:BottomDialogs:1.2.1'
compile 'com.github.mancj:SlideUp-Android:1.0-beta'
compile 'com.github.zcweng:switch-button:0.0.3#aar'
compile 'com.firebaseui:firebase-ui-database:0.4.1'
implementation 'com.google.firebase:firebase-database:11.8.0'
implementation 'com.google.firebase:firebase-auth:11.8.0'
implementation 'com.google.firebase:firebase-core:11.8.0'
implementation 'com.google.firebase:firebase-storage:11.8.0'
}
Sorry for such messy dependencies but i've been trying everything to get this fixed but nothing because i need the design library
I got the same issue and I found the docs that work for me.
Add some config to app/build.gradle:
android {
defaultConfig {
...
multiDexEnabled true
}
...
}
dependencies {
compile 'com.android.support:multidex:1.0.3'
}
I use Android Studio 3.x and Gradle build script.
How can I import javax.annotation.* packages?
Here is my Gradle depedencies example.
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation 'com.android.support.constraint:constraint-layout:1.1.0'
implementation 'com.android.support:support-v4:27.0.0'
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.code.findbugs:jsr305:3.0.2'
You can use the following if You olny need annotation feature
implementation "javax.annotation:jsr250-api:1.0"
But need to very careful while using this, Reason being these classes are provided by multiple libraries like
implementation 'com.google.code.findbugs:jsr305:3.0.2'
implementation 'javax.inject:javax.inject:1'
implementation 'org.jetbrains.kotlin:kotlin-reflect:$versions.kotlin'
If You are using them already either You don't include that one or use exclude with them to avoid any build errors.
implementation (org.jetbrains.kotlin:kotlin-reflect:$versions.kotlin){
exclude module: 'jsr305'
exclude module: 'jsr250'
}