SDK Platforms
SDK Tools
[![enter image description here][3]][3]
You can even update to the latest by changing the build tool in build.gradle file, but as you said you are pretty new and firstly just want to run this project by installing the build tool version 24.0.2
Please click on Show Package Detail of your second screenshot then you will start seeing all the other build tool version you can install and you will find your 24.0.2 as well like I started seeing that after selecting the Show Package Detail.
Go to Tools > SDK Manager.
Make sure Android SDK Location matches your local.properties file sdk.dir value. (Fix it in the file if required)
In the SDK Platforms tab, check an install Android 7.
In the SDK Tools tab check and install 24.0.2.
make sure you have internet connection and build the project again.
On the main menu click Build > Make Project
Related
I have a problem showed on this screenshot:
Android Resolver
JAVA_HOME environment references a directory (C:\Program
Files\Java\jdk1.8.0_212) that does not contain java which is required
to process Android libraries.
The problem has appeared when I imported GoogleMobileAds package to insert AdMob ads to my project. I tried to create 2 local variables "JAVA_HOME" and "PATH" in environment variables using this guide https://null-code.ru/solution/157-reshenie-exception-jar-not-found-windows.html , but it doesn't help me.
It is a Unity bug. To fix:
Edit->Preferences->External Tools
Uncheck Android SDK Tools Installed with Unity (recommended)
Press Browse -> It might update the filepath
Recheck Android SDK Tools Installed with Unity (recommended)
Then:
Assets->Play Services Resolver->Android Resolver->Resolve
This has been tested and works with Unity 2019, Unity 2020, and Unity 2021.
try
Assets-> Play Services Resolver-> Android Resolver-> Delete Resolved Libraries
check is your Java set true or not:
go to cmd and type JAVA -version
if this appeared means your JDK is set if not check this link: https://confluence.atlassian.com/doc/setting-the-java_home-variable-in-windows-8895.html
after these, if you have the problem again update your JDK
from https://www.oracle.com/technetwork/java/javase/downloads/index.html
i was using admob plugin in my project and this is how i resolved the issue after trying all given solutions.
reimport the admob plugin / plugins you are using in your project. (i just reimport the latest version of admob plugin and issue resolved)
For me it was similar to this answer https://stackoverflow.com/a/57361245/2149955 but just a bit different so sharing a separate answer for when you haven't installed the tools through unity hub.
In Unity:
Edit->Preferences->External Tools
See error messages "You are missing the recommended <TOOL>. Install the recommended version using Unity Hub"
In Unity Hub:
Installs -> My Unity Version -> ... -> Add Modules, Twirl open Android Build Support -> Check Android SDK & NDK Tools (I also checked OpenJDK)
Press Next -> Accept Terms
Wait for install to finish
After that finishes, back in Unity:
If you look in external tools again, the error messages will be gone
Assets->Play Services Resolver->Android Resolver->Resolve
Update to Unity 2019.4.10f
fixed it
When I wanted to make an app for Android, I got this and many more as errors. Nothing worked, including the solutions here. I tried both Unity versions 2020.3.5f1 and 2019.4.22f1, it didn't work.
I figured out that the problem was due to "Android Built Support" not being fully installed. I did the following and the problem was gone:
Unity Hub (my version 2.4.3) -> from the left menu, go Installs
Click the 3 dots in the upper right corner of the Unity version you want (I used 2019.4.22f1) -> Add Modules
From Platforms, find "Android Built Support"
Its check box was checked because I installed it before, but if you don't have it, first install it
Display its submodules with the arrow to its left; "Android SDK & NDK Tools" and "OpenJDK"
Check their check boxes, next and install
Restart Unity
When you open the project, it resolves
It gave me another warning after the resolve, so I made sure that the problem was gone by doing "Assets->External Dependency Maneger->Android Resolver->Force Resolve" in the project again.
I faced this error when I wanted to build for Android. The reason I have faced this is that I had 2 Unity versions (2019.4.9f1 and 2020.3.3f1), and my JAVA_HOME was configured to use the java folder inside 2019.4.9f1. I then uninstalled and removed 2019.4.9f1, and after that, I got this error when trying to build in 2020.3.3f1.
I changed my JAVA_HOME variable permanently, following the link below:
How to set JAVA_HOME in Mac permanently?
Restarted my Macbook.
Went to Unity -> Preferences -> External tools, unchecked NDK, JDK, etc., clicked the Browse button that appeared, and selected the folder under 2020.3.3f1 manually for JDK.
(In the end, no folder should change when you uncheck and check again)
Simple fix. I got this message about Missing the JDK. If you have one that is similar or pointing to the wrong JDK you can try this fix.
Here is the Error I was getting:
I solved this by:
In Unity goto "Edit->Preferences->External Tools"
Unchecked the box "JDK Installed with Unity (recommended)", and noticed that the Path was pointing to an Old version of Unity I had uninstalled.
Changed the Path to the current version of Unity I am usings, OpenJDK directory.
Re-checked the box "JDK Installed with Unity (recommended)"
Then was able to build my game, and build to my android phone just fine.
Note: If your having problems with the SDK or NDK you could try this solution, by unchecking, and re-checking their respective boxes.
This Worked For me:
If u had rectified
JAVA_HOME,
JDK SDK files &
every possible way and solution does not show up try
preference -> in android untick the JDK installed..,
if you see a change in directory then just re tick,
copy path of JDK and uncheck,
finally paste the path close(x) preference TRY BUILD & RUN
Next time you open Unity Editor then try to check & uncheck JDK we have to see the same directory both ways
there is no sdk if you install unity editor without hub.
it seems unity want to use the versions they want. so it's very poor support for previous historty version.
there is a workaround. you can install a version offically recommanded.
and then copy the sdk, ndk, openjdk folder from the offical version folder to the folder you are using. for windows, these folder is like this:
from:
C:\Program Files\Unity\Hub\Editor\2021.3.21f1c1\Editor\Data\PlaybackEngines\AndroidPlayer\OpenJDK
to:
C:\Program Files\Unity\Hub\Editor[your_version]\Editor\Data\PlaybackEngines\AndroidPlayer\OpenJDK
I needed to preinstall my laptop and switched to Windows 10 . Before that I made and saved my project in Android Studio 2.2.3 and I downloaded the same version of Android Studio after preinstallation, but when I choose Open Existing Project I got the following message:
Failed to sync gradle project 'ApplicationName' Error:Unable to find
method
'org.gradle.api.artifacts.Configuration.setExtendsFrom(Ljava/lang/Iterable;)Lorg/gradle/api/artifacts/Configuration;'.
Possible causes for this unexpected error include: Gradle's dependency
cache may be corrupt (this sometimes occurs after a network connection
timeout.)
The state of a Gradle build process (daemon) may be corrupt. Stopping
all Gradle daemons may solve this problem.
Your project may be using a third-party plugin which is not compatible
with the other plugins in the project or the version of Gradle
requested by the project.
Blockquote
I did all the three steps suggested by Android Studio to fix my project, but none of them worked.
Your gradle version is: 1.8 which is not working anymore so you probably have to update it:
1- Go to -> https://gradle.org/install
check out the latest verion number.
2- In your project directory navigate to \gradle\wrapper\ directory and edit:
gradle-wrapper.properties file.
change:
https://services.gradle.org/distributions/gradle-1.8-all.zip
to:
https://services.gradle.org/distributions/gradle-3.3-all.zip
3- go to Tools→Android→Sync Project with Gradle files
4- If sync doesn't do the job restart Android studio
Just go to file -> Invalidate Caches/Restart -> Invalidate and Restart
Update your gradle.
Open File > Project Structure > Project Tab
Android Studio has built in project structure menu to check and update gradle and plugin used in the current project.
Below Website gives a detailed explanation on how to update gradle and gradle plugin of Android Studio.
Update gradle plugin Android Studio
This error also occurs when Android Studio is working offline.
To check this below points:
1.Open the Preferences window by
clicking File > Settings (on Mac, Android Studio > Preferences).
2.In the left pane,
click Build, Execution, Deployment > Gradle.
3.Check the Offline work checkbox. If it is checked then Android Studio is working offline you have to unchecked it.
-
4.Click Apply or OK
.
The error is thrown because google has updated the android plugin and gradle integration.
You have to update android studio to the latest one.
Android Studio will suggest you updates and you have to update by clicking on the notification inside android studio at the bottom.
Automatically the above error will be resolved for you.
Settings > Experimental > turn off "Only sync the active variant"
First check why the build is failing, in my case it was that I had not accepted licenses for platform 29 and by default platform 30 was installed.
To fix this I went to tools >> sdk manager then installed pplatform 29 and accepted licenses [ALL GUI]. It was solved after that.
Files > Settings > Appearance & Behavior > System Settings > android SDK > SDK Platform.
From SDK Platform Select and Install Latest API Level (31) SDK.
After Successfully Installation Restart Android Studio.
i am updating android sdk 23 and i'm getting this error. I am using windows xp.
Error:
Cannot complete the install because of a conflicting dependency.
Software being installed: Android Development Tools 23.0.0.1245622 (com.android.ide.eclipse.adt.feature.feature.group 23.0.0.1245622)
Software currently installed: Android Developer Tools 22.3.0.v201310242005-887826 (com.android.ide.eclipse.adt.package.product 22.3.0.v201310242005-887826)
Only one of the following can be installed at once:
ADT Package 22.6.3.v201404151837-1123206 (com.android.ide.eclipse.adt.package 22.6.3.v201404151837-1123206)
ADT Package 23.0.0.1245622 (com.android.ide.eclipse.adt.package 23.0.0.1245622)
Cannot satisfy dependency:
From: Android Development Tools 23.0.0.1245622 (com.android.ide.eclipse.adt.feature.feature.group 23.0.0.1245622)
To: com.android.ide.eclipse.adt.package [23.0.0.1245622]
Cannot satisfy dependency:
From: Android Development Tools 22.6.3.v201404151837-1123206 (com.android.ide.eclipse.adt.feature.group 22.6.3.v201404151837-1123206)
To: com.android.ide.eclipse.adt.package [22.6.3.v201404151837-1123206]
Cannot satisfy dependency:
From: ADT Package 22.3.0.v201310242005-887826 (com.android.ide.eclipse.adt.package.feature.group 22.3.0.v201310242005-887826)
To: com.android.ide.eclipse.adt.feature.group 22.2.0
Cannot satisfy dependency:
From: Android Developer Tools 22.3.0.v201310242005-887826 (com.android.ide.eclipse.adt.package.product 22.3.0.v201310242005-887826)
To: com.android.ide.eclipse.adt.package.feature.group [22.3.0.v201310242005-887826]
I had the same problem, and was thinking of downloading a clean copy of Eclipse and then going through the installation of all the plug-in, but the sheer amount of hard work defeated my resolve.
I found another way out to update ADT 23 without any hassles on the current instance of Eclipse. :)
I was not sure if the approach will work or not, hence I did not capture the process, Please bear with me. In any case I can't post images I do not have reputation :P
Here's what I did:
Go to the Install new Software option from Help.
Open the available software sites.
Select Your Android site and remove it. Before removing copy the Location, we are going to use the same URL again.
Click OK (this will take you back to the previous screen).
paste the copied URL back into the "Work With" combo on the screen. Click Add.
It will flash a message saying it already has the options available.
Choose to uninstall the previous version and install new.
Voila, it installs ADT 23.
Hope that helps.
This seems to be a problem in the SDK tools rev. 23 update of Google. A lot of people have problems with this upgrade, see:
http://code.google.com/p/android/issues/detail?id=72584
http://code.google.com/p/android/issues/detail?id=72419
The only solution so far is to download a clean version of Eclipse.
I don't like to start with a clean copy and install all the other plugins, so I'll try to copy the SDK folders from this Clean Eclipse instance to your current one.
Edit:
I ended up with setting up a clean copy because I did not want to start more problems. I did the following:
download the Eclipse (luna) bundle you like to use: Eclipse IDE for Java Developers
install Android SDK
I could not update the SDK itself to version 23 so I had to do the following
download the Eclipse Android bundle
make a backup your current android-sdk folder
unzip and copy the sdk folder and copy it over the old android-sdk folder
(The new SDK folder only contains 4.4)
Now you should have a working eclipse and you can start installing all the other plugins you like to use again.
Hi all I want to know where on disk adt plugin is installed.I downloaded the whole package from Android Developer then i updated it to API-19 but now it has stopped working it shows an error Dependency Confliction .
Please help me out
By default adt plugin get install in your eclipse plugins directory "~/eclipse/plugins/"
For the ADT to work normally you need to set the path where the bin folder is present .
This path is to be set under the Project>Properties>Android.
If the path is configured properly then you can see all the installed packaged (Android 1.2 to the Android 4.4).
If not set then you can set by
In the "Welcome to Android Development" window that appears, select
Use existing SDKs
Browse and select the location of the Android SDK directory you
recently downloaded and unpacked.
Click Next.
Download the ADT Plugin from....
https://dl-ssl.google.com/android/eclipse/
Being new to Android developent I followed the simplest of tutorials, built a new android project, accepting all default settings (built it for kitkat). To my dismay I have an un-planned project - appcompat_v7, along with the errors:
The container 'Android Dependencies' references non existing library
'C:\Users...\workspace\appcompat_v7\bin\appcompat_v7.jar'
and twice the following
The project cannot be built until build path errors are resolved
Is there a quick way to fix these?
Is this a sign of how difficult, and bugged with unpleasant surprises learning Android is going to be?
(Hope it will not be similar to learning IOS 6 years ago...)
The appcompat_v7 library is added by default to an Android project. You will most likely need it for any demo projects you start making.
To correctly add this library, follow these steps:
For Android Studio:
1. Ensure that you have the Android Support Repository installed in your SDK Manager:
2. In your build.gradle file, include the following implementation statement
implementation 'com.android.support:appcompat-v7:+'
within the dependency bracket.
3. Perform a Gradle sync with the Sync Project button.
~LEGACY ANSWER~:
For Eclipse:
The trick is, you need to clean & build the appcompat_v7 project. Go to
Project -> select Clean -> select the project.
After doing this, if the project does not get built automatically, right click on the project in the package explorer and select Build Project. Now the .jar file will be generated in the project's bin folder. After that, clean & build all projects that reference appcompat_v7.
Now the library should be correctly referenced by all projects that need it.
Note also that:
You must have the latest versions of SDK Tools / Build Tools
/ Platform Tools. If you try this and it doesn't work, then go to
the Android SDK Manager and make sure you have the latest versions of
the required tools.
In case your project only requires API level 14 (Ice Cream Sandwich)
& above, select API level 14 for "minimum required SDK" in the
project wizard when you create a new project. Now the appcompat_v7
library will not be required for this project, and the application
will use the native ActionBar class which is present in AOSP builds
from ICS onwards.
Further References:
1. How to add Android Support v7 libraries in eclipse.
2. Android actionbar how to add supporting library v7 appcompat for Eclipse.
3. android-support-v7-appcompat library project won't work.
4. Difference between android-support-v7-appcompat and android-support-v4.
The accepted answer worked for me but only after I'd installed the latest Java JDK (which was a solution to the problem detailed here Android - "Parsing Data for android-21 failed")
Need to update your SDK manager
click ur sdk manager icon in the ecilipse then update android support Repository in the extras
then
go to File->import->existing project
abt bundle->sdk->extra->android->support->v7 to workspace
after import v7 to workspace go to lib folder choose both jar and right click and choose build to workspace then again right click v7 project go to java build path choose the checkbox and click apply and ok..
if u have updated sdk then follow this steps
step 1:
Right click ur project then go to
property->choose java build path
step 2:
click Add External jar
Step 3:
Browse to ur adt bundle go to ur workspace choose the folder
android-support-v7-appcompat -> lib -> appcompat_v7.jar
Appcompat_7 error solved!
Hi, im a complete beginner, i solved my problem by go to SDK manager update/install all the new android sdk build tools (as im not sure which is which i should update/install so i update/install all the build tools. after updated/installed all the new build tools i closed my eclipse and relaunch the eclipse again. if you see any error again? go to the top bar click PROJECT and choose CLEAN. and run your application again and i think it will work fine..
it worked for me when i changed project build tarjet to API 21 for the android_support_v7_appcompact project
I had the same problem and I tried all of mentionded above advices and much more from, but no one helped me to solve my issue. My solution was creating a progect with minimum required SDK API 14: Android 4.0 (IceCreamSandwich). Doing this way Eclipse will not create appcompat_v7 project.
Also I found another, better, solution:
Go to Android SDK Manager and install Android 5.0.1 (API 21) or newer. If you don't use the emulator you can install only SDK Platform and Google APIs;
Go to appcompat_v7 -> Properties -> Android and check Android 5.0.1 in the Project Build Target;
Then go to Java Build Path -> Order and Export and check Android 5.0.1;
Do the same procedure for your project.
Strange fix but this worked for me ( My minimum SDK for my project is 10 - can't use 14)
Right-click on the "appcompat_v7" project and go to
-> Properties -> Android.
Your target build should already be set at the latest build (in my case Android 5.0.1). Click any other android package (apart from its current target) and click "Apply". Click "Ok" to close the box.
Re-open the Properties box by the same method but this time check the latest build (in my case Android 5.0.1) as the Project Build Target. Click "Apply", then "Ok" to close the box.
Clean the appcompat_v7 project. You'll probably need to clean/build all other projects that reference this library.
This solved it for me.
I was having with same Issue and fed up but finally I got the answer . I resolved this by Copy appcompat library E:\adt-bundle-windows-x86_64-20140702\sdk\extras\android\support\v7\appcompat and paste appcompat Library in the the Project which I want to Import . I close the Eclipse and reopen. But One thing I want to consider before these stuff I updated Android Support Repository and Android Support Library as well.
I solved it by downloading the file manually somewhere on the internet (be careful) and putting it into the needed \appcompat_v7\bin\ folder before creating a new Android project. After that, also my R.java file was generated successfully.
Honestly, no other way seemed to fix it. Could not obtain the file via the SDK manager.