The Google Services Plugin cannot function without it. File google-services.json is missing. - android-studio

File google-services.json is missing. The Google Services Plugin cannot function without it.
Searched Location:
C:\Users\Aman\Desktop\balcony\balcony\Module_SDK\src\nullnull\debug\google-services.json
C:\Users\Aman\Desktop\balcony\balcony\Module_SDK\src\debug\nullnull\google-services.json
C:\Users\Aman\Desktop\balcony\balcony\Module_SDK\src\nullnull\google-services.json
C:\Users\Aman\Desktop\balcony\balcony\Module_SDK\src\debug\google-services.json
C:\Users\Aman\Desktop\balcony\balcony\Module_SDK\src\nullnullDebug\google-services.json
C:\Users\Aman\Desktop\balcony\balcony\Module_SDK\google-services.json

just change in the build.gradle the line
compile fileTree (dir: 'libs', include: ['* .jar'])
to
implementation fileTree(dir: 'libs', include: ['*.jar'])
and ready, your mistake will be corrected!

Related

Using android volley showing error

When I am using android volley for inserting data into server database it is showing error cannot resolve the symbol R.
This is my dependencies in build.gradle(Module: app) where I just used a one line code
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
exclude group: 'com.android.support', module: 'support-annotations'
})
compile 'com.android.support:appcompat-v7:25.1.0'
testCompile 'junit:junit:4.12'
compile 'com.mcxiaoke.volley:library:1.0.19'}/*This line*/
and it is showing error after gradle running.
Cannot resolve the symbol R.
Include this compile 'com.android.volley:volley:1.0.0'.It should work.
try this
compile 'com.mcxiaoke.volley:library-aar:1.0.0'

what is the magic of nativeLibsToJar

The following code snippet seems to be the answer how to include native libraries with Android Studio:
task nativeLibsToJar(type: Zip, description: 'create a jar archive of the native libs') {
destinationDir file("$buildDir/native-libs")
baseName 'native-libs'
extension 'jar'
from fileTree(dir: 'libs', include: '**/*.so')
into 'lib/'
}
tasks.withType(Compile) {
compileTask -> compileTask.dependsOn(nativeLibsToJar)
}
It seems to simply pack the *.so into *.jar. But I really don't understand it: Why is it necessary to wrap it in a
*.jar? When changing something in my native libraries, I can see the changes taking effect in my Application, also the Gradle building process always outputs "...:app:nativeLibsToJar UP-TO-DATE...". So I assume this task is not re-run. But when this task wraps the *.so in *.jar than how is it possible to re-wrap them without rerunning this task??
I am thankful for every explanation :)
That's really funny - I found this as solution so many times:
task nativeLibsToJar(type: Zip, description: 'create a jar archive of the native libs') {
destinationDir file("$buildDir/native-libs")
baseName 'native-libs'
extension 'jar'
from fileTree(dir: 'libs', include: '**/*.so')
into 'lib/'
}
But it can be removed because it does nothing useful (maybe it did in older build-versions).
The real trick is done through sourceSets.main.jniLibs.srcDir 'src/main/libs/' //integrate your libs from libs instead of default dir 'jniLibs

Resources from appcompat-v7:22.2.0 giving error in Android Studio

I have added compile 'com.android.support:appcompat-v7:22.2.0' as dependency in build.gradle. But then also app giving error in accessing many resources from appcompat-v7.
Error:
Error:(25, 64) No resource found that matches the given name (at 'drawable' with value '#drawable/abc_textfield_default_mtrl_alpha').
please provide the detail error stack-trace
In Build.gradle add this in dependencies
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
compile 'com.android.support:appcompat-v7:22.0.0'
}

How to create a project in Android Studio without the support library?

I'm sorry if this is a stupid question but I'm new to Android development and for my first app, I don't have any plans to support devices running API 17 and lower so I wish to not use the support library. However, when I create a new project in Android Studio (even with no activity) I can still see
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
compile 'com.android.support:appcompat-v7:21.0.3'
}
in my Gradle file.
How can I create a project without the support library? Thanks.
You can remove the support library , removing the dependency from your build.gradle
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
//compile 'com.android.support:appcompat-v7:21.0.3'
}
To set minSdk=17 you can use:
android {
defaultConfig {
minSdkVersion 17
targetSdkVersion 22
}
}

How to Include com.questoid.sqlitemanager_1.0.0 jar file in ANDROID STUDIO?? please help on this

How to Include com.questoid.sqlitemanager_1.0.0 jar
file in ANDROID STUDIO?? please help on this
Put it in the folder libs of your app and you have to verify into the builde.gradle the dependecies:
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
}

Resources