I'm just trying to run the first app and this is what happens:
FAILURE: Build failed with an exception.
What went wrong:
A problem was found with the configuration of task ':app:processDebugResources'.
File 'C:\Users\XXXX\Appdata\Local\Android\sdk\platforms\android-28\android.jar' specified for property 'androidJar' does not exist.
Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
Get more help at https://help.gradle.org
BUILD FAILED in 15s
Gradle task assembleDebug failed with exit code 1
Exited (sigterm)
The file is on the android-29 folder! what should I do?
This error might occur because of android.jar is in another folder
Try opening
C:\Users\XXXX\Appdata\Local\Android\sdk\platforms
and then look
for a folder named android-29 or android-27 and you should be able to find android.jar in that folder just copy that file and paste it into to android-28
Image Please update your android sdk.
You don't have install api 28.
Please open your android sdk and install android sdk 28.
Not only android.jar is missing from my android-xx folder, then copy android.jar from other folder could solve this problem but I still have another problems when combine.
So I do a workaround
First, I delete this android-xx folder from Android\sdk\platforms
Then, I create a new empty project
Next, inside app\build.gradle of new project, I set both compileSdk and targetSdk to xx
Sync and run new project
Finally, android-xx will contains all the files
I dont know if delete the old android-xx before create new project is required or not. but I deleted it to make sure their is no other problem when replacing file
For some reason, android.jar is't automatically downloaded or built when installing specific Android SDK versions. This oversight means Flutter cannot find the android.jar, since it doesn't exist.
One solution, after installing the SDK version, is to manually download the android.jar for your desired SDK version from the following GitHub repository:
https://github.com/Sable/android-platforms
Make sure to put the android.jar file in the correct location, replacing XX with your version number:
Windows
C:\Users\XXXX\Appdata\Local\Android\sdk\platforms\android-XX\android.jar
OS X
Users/<username>/Library/Android/sdk/platforms/android-XX/android.jar
Related
When I run the emulator while using vscode, I get an error like this. What can I do?
A problem occurred evaluating project ':app'.
> Failed to apply plugin [id 'com.android.application']
> Your project path contains non-ASCII characters. This will most likely cause the build to fail on Windows. Please move your project to a different directory. See http://b.android.com/95744 for details. This warning can be disabled by adding the line 'android.overridePathCheck=true' to gradle.properties file in the project directory.
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
* Get more help at https://help.gradle.org```
This error occurs because of the path of the project. Change your project path with a way which don't contain non-ASCII character.
For example ะก:\Android\PROJECT-FOLDER.
First run flutter doctor, to see if everything is okay
Then run flutter clean, to have a fresh start
If that doesn't work check the name of the path and try not to use special characters by that I mean, use English.
Or do a workaround and create a new project and copying the files to the new project, as I said before, stick to English, as a Spanish speaker I've run into the same issues before.
This issue appears after update to Unity 2018.1. On 2017.3.1 version everything worked fine.
Gradle version: 3.3
Android Plugin version: 2.3.3
Does anyone have an idea how to fix following error?
CommandInvokationFailure: Gradle build failed.
C:/Program Files/Java/jdk1.8.0_131\bin\java.exe -classpath "C:\Program Files\Unity2018\Editor
\Data\PlaybackEngines\AndroidPlayer\Tools\gradle\lib\gradle-launcher-4.0.1.jar"
org.gradle.launcher.GradleMain "-Dorg.gradle.jvmargs=-Xmx2048m" "assembleRelease"
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ': processReleaseResources'.
> Error: A library uses the same package as this project: com.unity3d.player
The problem was caused by Simple Android Notifications Free asset (https://assetstore.unity.com/packages/tools/integration/simple-android-notifications-free-68626).
AndroidManifest file in simple-android-notifications.aar contains package="com.unity3d.player"
After renaming it to "com.hippogames.simpleandroidnotifications" I now able to build APK.
The strange thing is that the same library was successfully used with Unity 2017.3.1 and plugin worked as expected.
I tried million things, but only this solved my problem:
When adding facebook sdk package to assets, it creates Facebook SDK folder, and plugins are in it. So :
1. I moved everything from inside Facebook SDK folder to Assets folder.
2. Then I go to Assets/PlayServicesResolver/AndroidResolver/Force Resolve (Don't know if this is necessary).
It appears that unity couldn't find the path to plugins for android. I lost 5 days in searching the solution.
follow these steps and rebuild the project
Goto File from unity top Menu
Select Build Settings
From Build Setting click on Player Settings
In Player Setting Inspector Menu Select Other Settings
See for Identification->Package Name
change Package Name to something unique like com.yourname.appname
and save the project and build again
My gradle build in android Studio is failing because it can't access the cache.properties file. I have tried invalidating all caches and retrying but that did not work. I also reinstalled all the SDK tools. Here is the error I'm getting
Error:java.io.FileNotFoundException: C:\Users\Siddharth\AndroidStudioProjects\IntentAssignment.gradle\2.4\taskArtifacts\cache.properties (The system cannot find the file specified)
C:\Users\Siddharth\AndroidStudioProjects\IntentAssignment.gradle\2.4\taskArtifacts\cache.properties (The system cannot find the file specified)
Blockquote
Any advice on what to do, here is the complete console output:
FAILURE: Build failed with an exception.
* What went wrong:
java.io.FileNotFoundException: C:\Users\Siddharth\AndroidStudioProjects\IntentAssignment.gradle\2.4\taskArtifacts\cache.properties (The system cannot find the file specified)
C:\Users\Siddharth\AndroidStudioProjects\IntentAssignment.gradle\2.4\taskArtifacts\cache.properties (The system cannot find the file specified)
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
BUILD FAILED
Total time: 0.747 secs
delete gradle folder, quit Android Studio and Start again fixed this problem for me
run cmd
write %temp%
then temp folder open delete all file in temp then rebuild your project
hope this will solve your problem
After Search i found this answer and worked for me
thanks to #Salam El-Banna and #Naveed Ahmad
You don't have to delete all .gradle folders and no need to reinstall Android Studio.
I have the latest version of Android Studio and I faced that problem, the only thing that worked for me is to:
1- Navigate to
C:\Users\user.gradle\caches\2.x\
2- Copy the folder scripts , scripts-remapped and paste it somewhere safe just in case anything went wrong you will place it back
3- Delete this folder scripts and scripts-remapped from the directory C:\Users\user.gradle\caches\2.x\
4- Sync Project with Gradle Files and you are done.
When you sync your project Android Studio will generate new cache files.
It worked for me I hope it will work for you.
reference:
Cache.properties (The system cannot find the file specified)
Delete your Gradle folder
Invalidate cache and Restart
Simply these steps fix your issue.
I have cloned from github both the respositories CastVideos-android and CastCompanionLibrary-android to my AndroidStudioProjects folder with the names 'CastVideos' and 'CastCompanionLibrary'. When I attempt to build CastVideos, in Android Studio I get
Gradle 'CastVideos' project refresh failed
Error:Bad pathname
When I run 'gradlew.bat build' in the CastVideos directory, I get the below:
C:\Users\Tim\AndroidStudioProjects\CastVideos>gradlew.bat build
Relying on packaging to define the extension of the main artifact has been depre
cated and is scheduled to be removed in Gradle 2.0
FAILURE: Build failed with an exception.
* What went wrong:
A problem occurred configuring root project 'CastVideos'.
> Could not normalize path for file 'C:\Users\Tim\AndroidStudioProjects\CastVide
os\build\intermediates\exploded-aar\CastVideos...\CastCompanionLibrary\unspecifi
ed\debug'.
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug
option to get more log output.
BUILD FAILED
Total time: 7.701 secs
C:\Users\Tim\AndroidStudioProjects\CastVideos>
This is my first attempt at using Android Studio after developing with Eclipse so I am a bit lost. Any suggestions?
I think I know why. It is a Windows thing. It seems that Windows does not realize that '..' mean upper directory. that is why you have this path "C:\Users\Tim\AndroidStudioProjects\CastVide os\build\intermediates\exploded-aar\CastVideos...\CastCompanionLibrary\unspecifi ed\debug" I am running on the mac which seems to be working fine
I would suggest that you copy the whole CastCompanionLibrary into your CastVideo directory and then change ..:CastCompanionLibraries to :CastCompanionLibraries
Changing relative paths from ..: to ./..: in both build.gradle and settings.gradle worked for me on Windows.
I am having trouble migrating my eclipse project to Android Studio. I followed the instcutions on this page http://developer.android.com/sdk/installing/migrate.html
When I type gradle at the command line I get this error:
Where:
Settings file 'C:\Users\Joshua\Development\workspace\settings.gradle' line: 1
What went wrong:
A problem occurred evaluating settings 'workspace'.
A path must be specified!
Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug
option to get more log output.
BUILD FAILED
Total time: 1.1 secs
What path do you think it wants? And where does it want it?
So in my case I had a multi-project environment, what I had to do to get it working was to remove the absolute paths from the settings.gradle file in the root directory (dir containing all of the projects) and then in the build.gradle i had to remove the absolute directories for the compile statments and make sure that i used :{project_name} instead of ../{poject_name}
I realise that my situation was a bit different but if you download gradle and use the --debug switch you should be able to find which files have the problems and it's most likely a path problem.
You might be missing your lop-level build.gradle file. Here is a setup explained
If this is not your issue, please provide your settings.gradle file and top-level build.gradle file.