I'm trying to use a CodeLab tutorial for adding Chromecast support. I've downloaded the files and when I try to import them into Android Studio I get this error:
No toolchains found in the NDK toolchains folder for ABI with prefix: mips64el-linux-android
I'm using the latest version of Android Studio and latest tool build and Gradle. What can I try to fix this error?
I managed to figure this out. It ended up being because the Codelab application used in the tutorial was so old and outdated I needed to change a few things in the Gradle and manifest.
In the Gradle file I changed the build tools to a later version
classpath 'com.android.tools.build:gradle:3.2.1'
I updated the compiled version to 28 plus updated the support libraries. I also had to remove the unique app id and remove the target sdk from in manifest. Finally I updated the wrapper settings, and it started to work correctly.
Related
I have the issue
Error: Android Gradle plugin requires Java 11 to run. You are currently using Java 1.8. -& Failed to apply plugin 'com.android.internal.application'
Error: Android Gradle plugin requires Java 11 to run. You are currently using Java 1.8. -& Failed to apply plugin 'com.android.internal.application'
The solution requires to download JDK 11.0, then change gradle projects - the option is not available in Android studio. Do I need to upgrade android studion or change the setups?
No, you do not need to do anything that complex. First, download OpenJDK 11 from here. Extract the contents of the zip in a folder. Then, find the gradle.properties file in your android project (Create one if it's not there). Then. add this property to it:
org.gradle.java.home=path/to/jdk11
Note: Do not point towards the bin folder, just point towards the home JDK 11 directory.
I am using the latest version of Android studio V4.1 to implement my project on Windows 10.
The project also requires Java 11 and Ndk libraries.
First, I installed NDK V22 and V16 as well as Cmak from SDK tools in SKD manger as shown below:
Then, Installed Java 11 from Oracel.com, and checked using cmd as shown below:
I added the paths of SDK and NDK to the local.properties files as follows:
sdk.dir=C\:\\Users\\user_name\\AppData\\Local\\Android\\Sdk
ndk.dir=C\:\\Users\\user_name\\AppData\\Local\\Android\\Sdk\\ndk\\22.0.7026061
Also, added JAVA_HOME and ANDROID_NDK_HOME in the system environment.
The problem is that I can not locate the NDK path from the "File > project structure> Android NDK location" in the Android project to tell the Android studio where is the NDK is located. It always shows as inactive and can not browse the path as shown in the below picture:
Info:
Android Gradle Plugin Version 4.1.1
Gradle Version 6.8
Can anyone help to fix this problem?
This was moved to the build.gradle to keep builds reproducible: https://developer.android.com/studio/releases/gradle-plugin#ndk-path
It's not in the UI because you should almost never use it. You should be using android.ndkVersion in almost all cases. android.ndkPath (and ndk.dir) is just a way to make builds non-reproducible/non-portable.
The cases where android.ndkPath makes sense are if your CI service only has the NDK installed to a specific location not known to the SDK, or if you're using an unreleased NDK.
I am trying to include firebase SDK in my Android Studio Project. But it giving me an error. I am using latest JDK version (1.7.0_71) and it is asking for upgrading higher version to (1.7.0_67).
I need help for basic firebase setup SDK on android. I tried to setup it by the reference of following link: https://firebase.google.com/docs/android/setup#add_the_sdk.
I am getting following error: Please check attached screenshot
I had the same problem trying to GCM to an old android project.
The solution for me was to also add
classpath 'com.android.tools.build:gradle:2.1.2'
to the top-level build file dependencies, just before classpath 'com.google.gms:google-services:3.0.0'. For the old android project, this dependency only existed in the module-level build file.
Make sure you are using Android Studio 1.5 or above. Just saw a guy who had the same issue and he was using android studio 1.0.1
Updating the Android Studio will fix it for you. Also check other pre-requisites.
Prerequisites from official documentation are as follows:
A device running Android 2.3 (Gingerbread) or newer, and Google Play services 9.2.1 or newer
The Google Play services SDK from the Android SDK Manager
Android Studio 1.5 or higher
An Android Studio project and its package name
First of all complete all the steps mentioned in a link you had followed for Firebase
And note that it requires active internet connection so please check internet connection and add both project and app level dependencies as per suggested in link of Firebase you had used in question
Also it is best to use JDK version 1.8 and above because oracle officialy ended support for those versions. If you are working with Firebase Api which is quiet new so i would highly recommend as it is also recommended by most professionals including developers at Google.Or if you want to go with JDK 1.7 then update it to latest Jdk 7u80 or 7u79 at least because it has least issues comparing to older versions.
The best solution is use JDK version 1.8 and follow all the steps in link https://firebase.google.com/docs/android/setup#add_the_sdk
Ensure that you have the google-services.json file, with the client id: <effective package name>, in the app directory. This you download from the Firebase console when you add an app.
I am trying to update my Eclipse to Android Lollipop. I am done with downloading the required SDK and installing the same. My problem is that after doing this when I try to create a new project for Android 5.0 it does not list it in the Target SDk drop down. However, When I go to the android folder where I have downloaded the latest SDK and run it it does enlist Android 5.0 there but does not show it when I run SDK Manager from eclipse. I have done lot of troubleshooting like re-installing the whole eclipse again and followed steps given in various same kind of questions but nothing seems working for me.
You have to right click on your project in Eclipse --> Properties --> Android --> Project Build Target and then select Android 5.0.1.
Also you may need to check AndroidManifest.xml for the targetSdkVersion value and target attribute in your project.properties file.
Clean and build your project and you will be fine.
After getting a new computer and setting up eclipse again, no projects are generating the .R file. The SDK is on revision 22 which I noticed some people had issues with, but setting the Private Libraries checkbox did not resolve this.
The .R isn't generating for existing projects nor brand new empty android projects. The SDK levels between the build configurations and the manifest match.
An entire uninstall of the SDK, and redownloading the Android version of eclipse and SDK didn't work as well. Could it be something with the versions of Java installed on the machine? Or is there some other common cause of the R not generating I missed after searching?
I got the same error as yours.
note:
The SDK directory architecture of 22.0.1 version is different from before.
there is not platform-tools directory and some command file move to other directory.
but,eclipse and ADT plugin does not update according with SDK
so, linking related bin to platform-tools directory will work.
above meet my error.
Update your SDK Tools from the SDK manager and ADT in eclipse, this was fixed in the latest update (22.0.1)
Also, after you update your SDK, close and reopen the SDK and check for updates again (in case you don't see 22.0.1)
Take a look here for some similar issues Class not found error after updating ADT and Android sdk tools to latest ver 22