Build error resource directory not found - android

I'v created a new android project in vs 2013 and installed Android.Support.Library.v7.AppCompat package and dependencies. But when I build the project, I got an error that says
resource directory
'[ProjectPath]\obj\Debug\resourcecache\B81A750477D10031D1844681B0F7EB17\res'
does not exist file: [ProjectPath]\AAPT
I'v cleaned the project
reopen it
rebuild it
but not help me.

I have encountered the same issue as you and have found a solution. I know this has been a long time since your post. Just put the solution here to help someone encounter similar issues.
My project can be built successfully previously, so this error must be caused by some kind of settings. A reasonable explanation and solution can be found in this link: http://smstuebe.de/2016/10/29/fix-android-app-compat/
This is caused by the incomplete Android SDK packages. The normal clean/rebuild won't help. Even if I reinstalled VS2015+Xamarin, I still have this issue.
So try the above solution if you came across similar issues.

Related

Could Not parse Array item

I was working on my android studio when this error appeared in I think gradle-values files.
here is what messages say
/home/aayush/.gradle/caches/transforms-1/files-1.1/play-services-
cast-framework-
11.8.0.aar/32e84c2c10bff7a8fd7f6321ccbff502/res/values/values.xml
Error:(5, 1) error: could not parse array item.
Error:java.util.concurrent.ExecutionException:
com.android.tools.aapt2.Aapt2Exception: AAPT2 error: check logs for
details
I tried deleting the whole build folder,.gradle folder, cleaning and rebuilding folder, invalidating caches and restarting android studio but, this error comes again and again. I am using android studio 3.1, the latest one. please help. If you need any other detail, just tell me. i am facing this problem for the first time, so, dont know what to post.
I was facing that issue too.
That may be invoked in several reasons.
In my case, I got the error because of the 'strings.xml' file has like this components
<string name="today_string">'today'</string>
this mistakes made this error, and I converted 'today' to \'today\'
And it solved my issue. Refer.

Android Parse Exception when I build

I am developing an app for my family business and I can't figure out what the source of this build time error is?
Error:com.android.dx.cf.iface.ParseException: class name (BaseHTTPServer$py) does not match path (Lib/BaseHTTPServer$py.class)
I tried cleaning the project, deleting the /app/build folder as I was told elsewhere on the internet, and I tried to reset all my changes. Any help on what maybe causing this error and/or how to fix it would be great.
Edit 1: I am trying to use the Jython Library (http://www.jython.org/)
Edit 2: After retracing my steps it is now fixed.
Thanks and have a great day!
-Fisch
Turns out to be an issue with Jython. Removing it from the libs folder and the reference solved the issue.
This answer might help you. https://stackoverflow.com/a/24663045
It might be related to you using the java 8 JDK as your JDK for compiling.
Try switching it to the java 7 JDK.

Android studio How to resolve Error in png files of library added

I have no Idea what is happening, last time when I finished my app I build its release apk and all was working just fine as expected but now today when I tried to make that pproject again and to make another apk I am getting the following error.
Error:Execution failed for task ':app:mergeDebugResources'.
Crunching Cruncher common_signin_btn_icon_pressed_light.9.png failed, see logs
I have no idea how to resolve it I have serached and found restarting Android studio and clean the project would remove it , doing this many times has no effect on this error. I have even restarted my machine but the condition of error in same.
In the logs I have seen that this png file is from the library I added , so just for testing I removed that library and tried to build then it started to give me same error with different png file name in other library. So how to fix this issue ?
My Questions are :
How can this issue be Solved ?
Have some one faced this problem too ?
Is this problem has been reported to google ?
Why in android we do not have any stable platform for development as IOS have ?
Try to remove "builds" folders and do rebuild. But soon, the whole thing in a long file name. Read this answer. By the way, you looked logs? Maybe this is not the PNG? You have not sent the log and did not specify the version Gradle.
Believe me, iOS developers have own problems.

Eclipse: what is the difference between android-support-v7-appcompat and appcompat_v7?

First off I'm soooooo frustrated trying to get android.appcompat....gridlayout to work. I've followed lots of tutorials and just keep getting that horrible "android.support.v7.widget.GridLayout failed to instantiate" message. So I'm doing some serious detective work to try and understand everything about the compat libraries.
So like the title asks, what is the difference? I'm building the libs/android-...jar files, adding them to the path, following all the directions on https://developer.android.com/tools/support-library/setup.html
Any insight? Should I just uninstall eclipse and start from scratch to try and do this? I'm working with a test project and nothing is working. I keep getting 1 instantiation errors along with an error saying "a resource already exists on disk 'C:......\android-supp..-gridlayout.settings' and '....prefs'.
Please please any insight. Have spent a long time on this. Any advice is much appreciated.
they both refer to the same "v7 appcompat library" discussed at the android developer site.
You cannot just copy the jar file, as this library has resources that are referred to by your project so it needs to be added as a library project with resources as discussed here.

Android Studio Gradle error

Everything is ok but when i try to run it gets one error
Gradle: : java.lang.NullPointerException
Please help me, because i wanna to throw all this stuff with my NTB down from the cliff, after about five hours of configuring git, android studio and copying my projects from Eclipse, still got this
I had the same problem. I solved it by going into 'Project Structure' and one of my modules had both 'Android' and 'Android - Gradle'. I deleted the 'Android - Gradle' and rebuilt the project and the error disappeared.
Edit: I had bigger problems than this and ended up creating a new project...
You need to make sure Gradle is installed and properly configured in the preferences.
I had the same problem. It was because the path to android studio contained a whitespace. Installing android studio to the recomended location solved my problem.
As easycheese underlined the problem is related to the presence of the android-gradle item below one or more modules in your project. Go to the "project structure" (from the File menu) and check which module has two sub-items, one of them must be the android-gradle, delete it and rebuild your project. It should fix the issue......as J.Romero says...Android Studio is far from being ready for professional use, but what it is really annoying is that Google, with all its resources, gives developers such "immature tools" that make rather waste time than anything else....shame
I wont re-write my whole answer, but check out the following page in which i replied to a Gradle common error with over 10 common solutions across the web including mine.
Long story short, for me it turned out to be system resources were getting low (Google Chrome was the greedy one)
If it works after a fresh reboot, but after a few minutes or hours it starts.. This would indicate this.
Gradle Error In Android Studio

Categories

Resources