Android instant apps feature plugin not found - android

Gradle sync failed: Plugin with id 'com.android.feature' not found.
Please help me with the solution. I have followed the google docs regarding the environment setup for Instant apps. Please check the set up guide here : Set up your environment for Instant Apps

you have to update the android gradle plugin in your build.gradle file :
dependencies{
classpath 'com.android.tools.build:gradle:3.0.0-alpha4'
}
and it will works

Try this..change to
dependencies {
classpath 'com.android.tools.build:gradle:2.3.3'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
if you are using stable android studio

Related

The Android Gradle plugin supports only Crashlytics Gradle plugin version 1.25.4 and higher

After couple of months of not working on my app I have decided to continue and before doing so I wanted to update all dependencies, libraries etc.
After 3h+ of a nightmare with googles nonsense I am at the final (probably not even close) stage.
This error of:
The Android Gradle plugin supports only Crashlytics Gradle plugin
version 1.25.4 and higher.
Is driving me nuts. I did a global search on my project of 1.25.4 and 1 result came up which was for the classpath 'io.fabric.tools:gradle:1.25.1' so I changed it to classpath 'io.fabric.tools:gradle:1.25.4' and hoped for the best.. But the same error keeps coming up every time I am trying to build the app..
Can anyone tell me what kind of magic potion should I spray this gradle so it actually starts to work?
add this to the root project's build.gradle:
buildscript {
repositories {
...
maven { url "https://maven.fabric.io/public" }
}
dependencies {
...
classpath "io.fabric.tools:gradle:1.26.1"
}
}
and this on top of the module level's build.gradle:
apply plugin: "io.fabric"

Getting an error when adding play services to build.gradle

I'm getting an error when I'm trying to add the classpath to google play services in my root build.gradle file. I'm trying to follow a firebase tutorial and it states to put classpath 'com.google.gms:play-services:11.0.4'into the root gradle file
buildscript {
repositories {
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:2.3.3'
classpath 'com.google.gms:play-services:11.0.4'
// NOTE: Do not place your application dependencies here; they
belong
// in the individual module build.gradle files
}
}
However, I'm getting the following error:
Error:Could not find com.google.gms:play-services:11.0.4.
Searched in the following locations:
file:/home/graffixnyc/android-studio/gradle/m2repository/com/google/gms/play-services/11.0.4/play-services-11.0.4.pom
file:/home/graffixnyc/android-studio/gradle/m2repository/com/google/gms/play-services/11.0.4/play-services-11.0.4.jar
https://jcenter.bintray.com/com/google/gms/play-services/11.0.4/play-services-11.0.4.pom
https://jcenter.bintray.com/com/google/gms/play-services/11.0.4/play-services-11.0.4.jar
Required by:
project :
Now what I noticed is it's looking in /home/graffixnyc/android-studio/gradle/m2repository/com/google/gms/play-services/11.0.4/play-services-11.0.4.pom
However, mine is located: /home/graffixnyc/android-sdk/extras/google/m2repository/com/google/android/gms/play-services/11.0.4
My SDK has always been in this location so I'm not sure why it's looking in /home/graffixnyc/android-studio/gradle/m2repository/com/google/gms/play-services/11.0.4
How do I get Android Studio to recognize it in the correct location?
You need to change this line of code:
classpath 'com.google.gms:play-services:11.0.4'
with
classpath 'com.google.gms:google-services:3.0.0'
Class path should be google-services not play-services:
classpath 'com.google.gms:google-services:3.1.0'
while:
compile "com.google.gms:play-services:11.0.4"
in the other gradle file.
Webpage for reference(I think firebase same logic):
https://developers.google.com/cloud-messaging/android/client
Did you "Save the changes and click Sync Project with Gradle Files in the toolbar." as per the instructions at https://developers.google.com/android/guides/setup ? This has caught me out a few times.
Failing that the official Firebase docs at official Firebase docs are quite good at clarifying which bits go in which Gradle files
If what you are looking for is add the google play services instead of all google services you should add this classpath:
apply plugin: 'com.android.application'
...
dependencies {
compile 'com.google.android.gms:play-services:11.2.0'
}
The classpath package is com.google.android.gms instead of com.google.gms.
You can found more of information here: https://developers.google.com/android/guides/setup.
Hope this helps

Android Studio 2.1 :Failed to resolve: com.android.databinding:adapters:1.1

Today I update my android studio from 2.0 to 2.1
when I rebuild my project,there are some error like this:
some error
I use data binding in my project.When I use Android studio 2.0,everything is ok.
I find that,there is no databinding1.1 in jcenter
https://jcenter.bintray.com/com/android/databinding/
the newest version is 1.0
how can i fix it
I have the same question and I updated Google Repository and Android Support library in SDK Manager,it works for me.
I know how to fix this.
there are some problem in gradle2.1
I update my Android Gradle plugin to version 2.1.0
when I set the Android Gradle version to 2.0,every thing is ok.
buildscript {
repositories {
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:2.0.0'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}

No cached version of com.android.tools.build:gradle:1.2.3 available for offline mode

I installed JetBrains IDEA 15.0.2 with android support on my computer that is disconnected from Internet.
After that the project sync give an error that gradle is not existed, so I solve the problem by downloading gradle 2.2.1 and extracting it in its corresponding position
But after that a new sync error occurs that say "No cached version of com.android.tools.build:gradle:1.2.3 available for offline mode"
How can I solve error, at the same time keeping my conputer disconnected from Internet
Try the following steps:
Un-check "Offline work" in File>Settings>Gradle>Global Gradle Settings
Re-sync the project, for example by restarting the Android Studio
Once synced, you can check the option again to work offline.
I faced similar kind of issue in android studio because its also uses the gradle so my problem was app's source code was written in old version of gradle but i have the latest android studio with latest gradle. so changed the classpath dependency to have latest gradle version
Update the Classpath under dependency in build.gradle file at project level
from
dependencies {
classpath 'com.android.tools.build:gradle:1.2.3'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
to
dependencies {
classpath 'com.android.tools.build:gradle:2.1.0'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}

Gradle dependency.. Kaltura Player & Google analytics incompatibility [Android]

So, I´ve been messing around this issue for a day, until I found what it seems to be the problem, but now I can´t figure out how to solve it..
I have a proyect that uses Kaltura player sdk for android (https://github.com/kaltura/player-sdk-native-android). I did some tests and it worked like a charm.. but then I tried to use it in my project and Gradle always fails when making the playerSDK with this error:
Error:Execution failed for task ':playerSDK:transformNative_libsWithSyncJniLibsForDebug'.
java.io.FileNotFoundException: ../video-android/player-sdk-native-android/playerSDK/build/intermediates/bundles/debug/jni/lib/armeabi/libHLSPlayerSDK.so (No such file or directory)
After a day trying to figure out why this happens just in this particular proyect.. I found the problem occurs just when I add Google Analytics (https://developers.google.com/analytics/devguides/collection/android/v4/). Adding classpath 'com.google.gms:google-services:1.5.0-beta2' to the build.gradle (project) will make kaltura to throw this error on make proccess.
I´m not a gradle expert, in fact, I´m pretty new with it.. but I would like to know if there is some way to exclude this project dependency when building the playerSDK module.
This is the structure I have now:
|
\-- build.gradle(Project:SampleApp)
\-- build.gradle(Module:App)
\..
\..
\-- build.gradle(Module:playerSDK)
the project build has this:
buildscript {
repositories {
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:1.3.0'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
classpath 'com.google.gms:google-services:1.5.0-beta2' //<<This classpath is the problem
}
}
So, I need that classpath there to make google analytics work.. but for some strange reason, it brokes the playerSDK module.. Does anybody knows if there is a way to exclude that classpath for playerSDK module?
Thanks in advance!
Kaltura developer here. This issue was fixed in our develop branch, and will be released in a few days.

Categories

Resources