I am a beginner in Android. I'm trying to learn Push notification using Google Coud Messaging
this is the print screen for this error
Gradle DSL method not found
Possible causes:The project 'Save' may be using a version of Gradle that does not contain the method.
Open Gradle wrapper fileThe build file may be missing a Gradle plugin.
Apply Gradle plugin
in photo 5
can anyone help me
Update your android studio to latest version to latest version.
Related
I recently updated Android studio to version 3.4 and with it came a gradle update (com.android.tools.build:gradle:3.4.0) and with that came gradle 5.1.1-all.zip.
When attempting to sync gradle with the project, the result is:
ERROR: Unable to find method
'org.gradle.api.tasks.SourceSetOutput.getClassesDir()Ljava/io/File;'
This traces back to the gradle plugin:
'com.google.cloud.tools.endpoints-framework-server'
which is required in order to use the google cloud endpoints framework.
I was curious if anyone else has experienced this and if they have found a solution or if this is out of my control and a bug report needs to be filed.
Thanks
In case anyone comes across this, the solution was to update the endpoint framework gradle plugin to v2.0.1
"com.google.cloud.tools:endpoints-framework-gradle-plugin:2.0.1"
on both the app and backend gradle files.
😁
I'm trying to build FirebaseUI for Android sample app. Using latest Android studio (2.2.3) and Gradle plugin (2.2.3).
While trying to do Gradle sync I'm receiving following error:
Error:Could not find method baseline() for arguments [/pathToMyProject/FirebaseUI-Android/library/quality/lint-baseline.xml] on object of type com.android.build.gradle.internal.dsl.LintOptions.
Tried the usual stuff (Clean, Invalidate Cashes/Restart) but no luck. Any idea what is wrong here?
Apparently sample code provided by Google doesn't work with latest stable release of Android Studio. This example compiles without problems on latest beta version of AS.
I'm trying to install Firebase to my Android app, but it's seems like I'm doing something wrong. I have done exactly the same what I saw in this tutorial.
But when I put this compile 'com.google.firebase:firebase-core:9.6.1' into my project, I'm getting this error message:
Could not fint support-annotations.jar.....
The tutorial says something about this error:
Getting a "Could not find" error? Make sure you have the latest Google Repository in the Android SDK manager˛
The problem with this is that I have the latest version of Google Repository. And I cannot update it because there is no update available in SDK Manager.
Do you have you any idea what can I do to solve this?
In the Extras section of the Android SDK Manager, make sure the Android Support Library (v23.2.1) and Android Repository (v38) are installed and up to date.
The Support Annotation Library is described here.
The tutorial tip referring to the Google Repository applies when the "Could not find" error is for one of the Firebase libraries.
I had to update android studio and gradle plugins. After that everything works fine.
I have a Crashlytics-enabled app (which is now part of Twitter's Fabric) and I need to add some JNI functionality using the Android NDK.
I've switched to experimental gradle as Android Studio prompted me that way:
http://tools.android.com/tech-docs/new-build-system/gradle-experimental
When I've applied the necessary changes and tried to sync, I've got the error:
Crashlytics was applied to a project without an Android plugin. Please make sure the Crashlytics plugin is applied after the appropriate Android plugin for your project.
I've googled the error and found out that it's a problem between Fabric and experimental gradle, and Fabric team doesn't really seem to care about fixing it any time soon: https://twittercommunity.com/t/gradle-experiental-support/53441.
I've stumbled upon Issue with experimental gradle: The android plugin must be applied to the project but I have no idea what to do there, and I'm not sure if it's the right way to go?
How can I use Android NDK and Fabric in my project?
So gradle-experimental and Fabric don't mix.
Solution:
1) update to latest Android Studio 2.3.1
2) follow this tutorial to drop gradle experimental: https://developer.android.com/studio/projects/add-native-code.html
What I did was create a new temporary project with C++ support enabled and added a blank activity.
Then I opened my current project and the temporary project and copied the necessary changes into my own project.
After I was done (about 1 hour of work) I was able to build my C code into a library, load the library into my project, and make the JNI calls.
I am trying to generate a cloud backend using the "google cloud tool" in android studio, however it gives the following errors:
Failed to execute goal com.google.appengine:appengine-maven-plugin:1.8.0:endpoints_get_discovery_doc (default) on project MyApplication-AppEngine: Execution default of goal com.google.appengine:appengine-maven-plugin:1.8.0:endpoints_get_discovery_doc failed: A required class was missing while executing com.google.appengine:appengine-maven-plugin:1.8.0:endpoints_get_discovery_doc: Lorg/sonatype/aether/RepositorySystem;
I have installed maven 3.1.1 and android studio is version 0.3.1 (both of which is the newest version as of october 24th)
I seems that the error has been fixed in the appengine-maven-plugin version 1.8.3, but i simply cannot seem to force android studio to use that version.
How do I setup maven/android studio/google app engine, so that it can autogenerate the backend?
Thanks in advance!
PS: i have google this for 2 days now, and have gotten nowhere
So the templates in the cloud tools plugin use 1.8.0, these are not changeable. The problem as you have noticed is an incompatibility with Maven 3.1.1. If it is possible, you might try using maven 3.0.4/3.0.5 instead of 3.1.1 which are known to work with the plugin. The template is undergoing changes right now to address a couple of things (including the issue you are having), it will be updated in the future.