no clean option in android studio - android-studio

I found no option for clean project in build in android studio. what is reason for that? or is there different way to clean the project in android studio

Make sure you are looking a the correct directory. I also thought clean was missing when I looked under the root directory. Turns out it see example is located under the :app directory.
Open the Gradle side panel on the right. Select app->Tasks->build->clean

This problem can occur when you import the root directory rather than the project file. If you imported the file, make sure you select the correct file:

Related

Gradle Error: Path is not a readable directory for an Android Project saved in OneDrive

I tried to use a OneDrive folder to store my Flutter project [Windows 10, Android Studio]. I then made edits to it on another machine [same configurations]. The project compiled fine on the first machine initially and on the second one after the changes. Running it on the first machine again after the changes I get the below error:
Execution failed for task ':app:processDebugResources'.
Path "build/[package]/intermediaries/compiled_local_resources" is not a readable directory.
I've tried a number of solutions mentioned in similar, though not equivalent issues:
Updating Android Studio
Running Android Studio as Administrator
Removing the [package] from my dependencies (this resulted in a
different package being identified in the error message).
Pressing File -> Invalidate Caches / Restart...
Commenting out
"org.gradle.jvmargs=-Xmx1536M" in gradle.properties
Doing:
cd android
gradlew clean
None of this worked.
I had the same problem today:
Path "build/[package]/intermediaries/compiled_local_resources/debug/out" is not a readable directory.
I was able to fix this issue by deleting the .gradle and rebuilding the project.
All I did was create the (empty) directory that it was looking for and it built fine afterward.
mkdir -p compiled_local_resources/debug/out
I had the same issue, came out of no where and it really shouldn't make the build fail... but all I did was create the (empty) directory that it was looking for and it built fine afterwards.
In the end the only thing that worked for me was pushing the project up to a Git remote and cloning it from there into another (local) directory.
[not sure this counts as a solution but nothing else worked for me after a long agonising search so hopefully it helps someone]
I know the OP had Windows, but if it helps anyone else in the future:
On Mac OS I discovered (the hard way) that Android Studio and Flutter do not play nice with being stored in iCloud! I noticed that some files weren't available locally and that's what was causing the problem for me. I moved my project out of iCloud (forcing it to download the missing files forever) and then it was fine.
Deleting the android/.gradle folder worked for me.
+1 also to the #1 answer (Vadow). As I do not have 50 points yet was not able to add this as a comment, so will have to post separately.
Like the OP, I have two machines - and got into trouble (Synology Drive). Vadow's solution worked for me, but I also had to do:
Flutter Clean
Flutter Pub Get
on the terminal and from within the project directory to get things follow back up and running.
Thank you Stackoverflow, and thank you Vadow!

Specify .gradle taskArtifacts directory

Using Android Studio:
To keep my source directories small, for google drive backup etc, I found how to specify a global gradle build directory outside my project directories here:
Gradle global build directory
Is it possible also to put the rather large .gradle/.../taskArtifacts directory outside the project directory.
Set --gradle-cache-dir when invoking gradle from the command line.

FBX Converter - Gear VR

This is a x-post from my question listed at https://answers.oculus.com/questions/583/fbx-converter-gear-vr.html
I'm attempting to use the Oculus FBX converter tool which came bundled with the Oculus Mobile SDK for Samsung Note 4 download.
Unfortunately, FBX Converter appears to be a Windows only tool :(, so I'm attempting to run this via Parallels Desktop.
There's a readme file in the tools dir which contains some instructions for downloading the AutoDesk FBX SDK and moving to an appropriate directory. I've followed them.
Inside the tools dir I see a makefile. Windows does make? Cool, so I attempt to make:
makefile(3) : fatal error U1033: syntax error : '=' unexpected Stop.
Huh... luckily there's a Visual Studio solution here. So I open the .sln and build. Dang, looks like I have to change the Platform Toolset to v110 because I have VS2012. Try again... Ahhh man, bunch of syntax errors about unexpected identifiers in std::max. I guess I'll try and fix it - std::max - expected an identifier
Cool, build is starting and..... ugh. cannot open file libfbxsdk.lib. Wait a second, I bet it's an issue with how the .sln is pulling in it's dependencies. Yup, wrong pathing. Add an extra ../ and here we go.... nope, no dice. cannot open include file fbxsdk.h.
So that's where I am right now. All I really want to do is convert an fbx file to a .ovrscene. Is that so much to ask? Is there a better way to do this? I hope so.
oh.... looks like there's a bin dir with the FBXConvert .exe included in the download. You'll have to add a .dll, to your System32 directory. That was awesome.

Android Studio: Failure [INSTALL_FAILED_INVALID_APK]

I have the following problem when running my app:
Waiting for device.
Target device: samsung-gt
Uploading file
local path: C:\Users\kwmaster\AndroidStudioProjects\Count500\app\build\outputs\apk\app-debug.apk
remote path: /data/local/tmp/xxxxx
Installing xxxxx
DEVICE SHELL COMMAND: pm install -r "/data/local/tmp/xxxxx"
pkg: /data/local/tmp/xxxxx
Failure [INSTALL_FAILED_INVALID_APK]
Why did it not let me install the apk???
In my case (I have a rooted device) and when I rooted, something happened with my permission of /data/local/tmp and they have been changed, so adb can't get access temp file.
How I solved it:
Install RootExplorer
Create new tmp folder on SD card
Long press on tmp folder, and select "Link to this folder" (last option in menu)
Go to /data/local/ and tap button "Create link" from bottom
For those that will encounter this problem in the future just go in build.gradle and put at applicationId just put a name with a point betwen 2 words.Example: First.Test
As AndroidGuy thought there was a problem in build.gradle - the gradle version ws wrong.
I also have changed in the settings to use the default gradle wrapper and not the local stuff!!!
I was also having this problem because of changing package name. So do check your package and sub packages names and also in manifest file where activities defined with package name.
when I cd /data/local/tmp, I found my project name in the folder.
So I solved the problem as follows:
adb shell
cd /data/local/tmp
rm -r your project name. For example: rm com.example.pc002.intenttest1
I was facing a similar issue. I fixed it by first closing the Android Studio project and then deleting the .gradle folder within the project.This, forced Android Studio to rebuild it when I opened it again, and then it fixed the issue.

How do you force regeneration of *.designer.cs files in a command-line Xamarin build?

I'm building an iOS Xamarin app from the command line. The *designer.cs files have been removed.
What command do I run to regenerate the *.designer.cs files?
Encountered in Xamarin Studio 6
Based on this forum thread the fairly awkward sequence that worked for me was
rename the ViewController specified in the storyboard
save and close the solution
remove bin and obj directories
rebuild
There are actually 3 questions in this topic:
If you want to build from command line is explained in this topic: How do you do a command line build of a Xamarin.iOS project?
To ignore *.designer.cs you can add a pattern to your .git file called git ignore: http://git-scm.com/docs/gitignore
To regenerate the designer files you can simply rebuild your solution.
For Xamarin Studio 5.8, if you edit the file that originated the designer.cs, save again and rebuild the project it will regenerate the designer.cs

Resources