I am really new to android dev (C/Python engineer), and I am looking to include a package from github where it says download the package using:
api 'com.otaliastudios:cameraview:2.0.0-beta04'
I have spent 2 hours looking WTF this api tool is but for the life of me, I cannot seem to figure out what it is.
My dependency block looks like so:
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation"org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
implementation 'com.android.support:appcompat-v7:28.0.0'
implementation 'com.android.support.constraint:constraint-layout:1.1.3'
implementation 'com.otaliastudios:cameraview:2.0.0-beta04'
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'
}
As you see, I have added the:
implementation 'com.otaliastudios:cameraview:2.0.0-beta04'
and synced the project with gradle files and I still get unresolved reference
According to the documentation try to add:
api 'com.otaliastudios:cameraview:2.7.2'
For more information visit, https://github.com/natario1/CameraView
Related
I am really fed up of these stupid android studio errors, the thing is I have included the implementation com.google.firebase:firebase-core:16.1.0 dependency in my build.gradle file but still am getting the error that says :::
Could not find com.google.firebase:firebase-core:16.1.0.
Also if I try to change it from 16.1.0 to 16.0.1 still error continues. How to fix this issue I have built almost 80% of my app and now when I just created new activity it is showing this error, I also deleted the activity but still issue continues. What is the fix for this? Thanks in advance!!
classpath 'com.google.gms:google-services:4.0.1'
And here is my Gradle file:
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation 'com.android.support:appcompat-v7:28.0.0'
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'
implementation 'com.github.ittianyu:BottomNavigationViewEx:2.0.2'
implementation 'me.anwarshahriar:calligrapher:1.0'
implementation 'com.firebaseui:firebase-ui-database:4.3.1'
implementation 'com.google.firebase:firebase-database:16.0.1'
implementation 'com.google.firebase:firebase-auth:16.1.0'
implementation 'com.google.firebase:firebase-core:16.1.0'
implementation 'com.squareup.picasso:picasso:2.5.2'
}
Could not find com.google.firebase:firebase-core:16.1.0"
It happens because firebase-core:16.1.0 doesn't exist (today).
You can check the latest version here. Currently it is 16.0.7
Firebase Core com.google.firebase:firebase-core:16.0.7
Change your dependency in:
implementation 'com.google.firebase:firebase-core:16.0.7'
I used the firebase tool available in android studio to sync my app with firebase database. After connecting to firebase, I had to add realtime database. Sync failed and the following error showed.:
Failed to resolve: firebase-database-15.0.0
The line:
implementation 'com.android.support:appcompat-v7:28.0.0'
Has red underline and when I hover the mouse over it, it shows all android.support libraries must have same exact version specification.
The sync is failing, although I am using the assistant to add the dependencies Why is it so?
I searched on google where it said to change :
implementation 'com.google.firebase:firebase-database:16.0.1:15.0.0'
to :
implementation 'com.google.firebase:firebase-database:16.0.1'
But doing so removes the database from the app.The dependencies are:
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation 'com.android.support:appcompat-v7:28.0.0'
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'
implementation 'com.google.firebase:firebase-database:16.0.1'
implementation 'com.google.firebase:firebase-database:16.0.1:15.0.0'
}
i had faced the same issue before .If their is the update available then update your android it will fix it.
from my experience when i use the assistant to add the dependencies then it comes like this
implementation 'com.google.firebase:firebase-database:16.0.1:15.0.0' but the it is not correct update it with this
implementation 'com.google.firebase:firebase-database:16.0.1' or
implementation 'com.google.firebase:firebase-database:15.0.0' or this
maybe this will help you
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation 'com.android.support:appcompat-v7:28.0.0'
implementation 'com.android.support.constraint:constraint-layout:1.1.3'
implementation 'com.firebase:firebase-client-android:2.5.2+'
implementation 'com.google.firebase:firebase-core:16.0.1'
implementation 'com.android.volley:volley:1.1.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.firebase:firebase-auth:16.0.1:15.0.0'
}
I don't know but the error only shows the appcompat 28.0.0 won't work.
Change
this, implementation 'com.google.firebase:firebase-auth:16.0.1:15.0.0'
to this, implementation 'com.google.firebase:firebase-auth:16.0.1'
and better, update all dependencies to the latest versions
The following dependency is put in by the Firebase Assistant to "Add Firebase Authentication to the App"
implementation 'com.google.firebase:firebase-auth:16.0.1:15.0.0'
If you remove 15.0.0, and make it
implementation 'com.google.firebase:firebase-auth:16.0.1'
that automatically removes Firebase Authentication in the Firebase Assistant, beating the whole purpose. Also if you change to the '...firebase-auth:16.0.1:15.0.0' to the latest version '...firebase-auth:16.1.0:15.0.0', nothing happens to the error, as it is due to the '15.0.0' part.
This is probably a blocker bug from Firebase or Google side, which could be only corrected by them. Hope this catches their attention soon. Otherwise all new developments using this version of Firebase Auth or Database will be stalled. Older versions may be working though.
I just got the android studio and all I did was connecting with the firebase. But I was not able to fully connect because of the appcompat error. I have attached the photo of what I'm getting.
dependencies {
implementation fileTree(dir: 'libs',include: ['*.jar'])
implementation 'com.android.support:appcompat-v7:28.0.0' <--------------getting error here
implementation 'com.android.support.constraint:constraint-layout:1.1.3'
implementation 'com.google.firebase:firebase-auth:11.6.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'
}
Error
Dependencies
I look at your error message and it felt familiar as i had received same message so many times!
Root cause is mixing version numbers in dependencies. it seems that in your dependencies you have version 28 and version 25 mixed up. go to build.gradle and put cursor on version number on each of your dependancies and then press ALT+ENTER. go with what android studio suggests and then clean->rebuild. it should work.
Hope this helps!
These are the dependencies:
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation "org.jetbrains.kotlin:kotlin-stdlib-jre7:$kotlin_version"
implementation 'com.android.support:appcompat-v7:27.1.1'
implementation 'com.android.support.constraint:constraint-layout:1.1.2'
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.android.support:cardview-v7:27.1.1'
}
When I add implementation 'com.facebook.android:facebook-android-sdk:4.0.1' then it "breaks" implementation 'com.android.support:appcompat-v7:27.1.1' with the error: All com.android.support libraries must use the exact same version specification
Some answers from All com.android.support libraries must use the exact same version specification suggest that I have to look at all the libraries but I can't see what's wrong here:
Can someone explain it? I'm complete newbie in android and I must say it's a horrendous mess
Try use implementation 'com.facebook.android:facebook-android-sdk:4.35.0'