Android SDK can't fetch XML and ArrayIndexOutOfBounds Exception in Project Run - android

I have two problems with android SDK.The first is that after installing sdk manager I can not install new plateform,tools,sysimage etc online it gives following error:
Fetching
Validate XML
XML verification failed for .
Line -१:-१, Error: org.xml.sax.SAXParseException: schema_reference.4: Failed to read schema document 'null', because 1) could not find the document; 2) the document could not be read; 3) the root element of the document is not <>.
Fetched Add-ons List successfully
Fetching URL:
Validate XML:
XML verification failed for .
Line -१:-१, Error: org.xml.sax.SAXParseException: schema_reference.4: Failed to read schema document 'null', because 1) could not find the document; 2) the document could not be read; 3) the root element of the document is not <>.
Fetching URL:
Validate XML:
Failed to fetch URL , reason: addon.xml
Done loading packages.
I tried force https.
http in place of https.
I am using DSL for internet and not using any proxy to connect to internet.
For the sake of removing this problem I also tried proxy server but all in vain.
So I installed all the updates offline APD v2 helped me with downloading.
I used both Eclipse and Netbeans for dev.Everything worked fine,until I tried to run a new project and even sample project.
On Eclipse it gave me following error:
Same problem was with netbeans:
Creating redLight-debug-unaligned.apk and signing it with a debug key...
D:\Android\android-sdk\tools\ant\build.: The following error occurred while executing this line:
D:\Android\android-sdk\tools\ant\build.: The following error occurred while executing this line:
D:\Android\android-sdk\tools\ant\build.:
com.android.sdklib.build.ApkCreationException: java.lang.ArrayIndexOutOfBoundsException: 13
I am new in android app development and trying to rebuild my Java Application for android platform,but I am stuck in first step.
Please help me here.

Solution for your first problem is simple : Line -१:-१, it shows u r language for windows os is set to hindi (IN_HI).
Goto Control panel region & language option change language to English for all formats.
Restart machine & fetch xml.
I am also facing second problem solution to that is not yet found
check this: https://groups.google.com/forum/?fromgroups#!topic/android-developers/BvO5g6RMamo
Also I have updated bug in Android issues :
http://code.google.com/p/android/issues/detail?id=28824

Related

Android SDK Manager - Failed to fetch

Error 1:
Failed to fetch URL http://dl-ssl.google.com/android/repository/addons_list-2.xml, reason: Unknown Host www.google.de
Error 2:
Failed to fetch URL http://dl-ssl.google.com/android/repository/repository-10.xml, reason: IO Unknown Host www.google.de
Can I download and insert this xml files manually?
Are then this problems solved?
There are some people who has posted about downloading SDK tools without SDK manager.
Like in this site.
But you should check your internet connection. I have same problem but after that i came to know that it was because of bad internet connection.
I have retried it and it was downloaded successfully.
I encountered the same problem and here is what I did to solve the problem.
Since I use proxy server for accessing internet i have edited the file
"C:\Users\.AndroidStudio\config\options\other.xml" as
Notice the PROXY_HOST value there is no "http://" part, this is important. In my case when I insert that it did not work I did not know why.
2. I have edited the file
"C:\Users\\AppData\Local\Android\sdk\tools\android.bat"
I have changed the line at the end of android.bat file from
call "%java_exe% %REMOTE_DEBUG%" ....
to
call "%java_exe% **-Djava.net.preferIPv4Stack=true** %REMOTE_DEBUG%"...
Notice the value in bold

Error in Generating client library(Android) From Google app Engine(in Maven)

I am in the process of learning to create google-app-engine as well as to generate Endpoint client library(for Android) from my app-engine application.
So far I have done the following things
Step 1 : Create Endpoint API : Complete
I have followed the instructions given here(using Maven) and have successfully deployed the app-engine application
https://developers.google.com/appengine/docs/java/endpoints/getstarted/backend/
Step 2 : Generate Client Library(for Android) : Getting ERROR here
I have followed the instruction here
https://developers.google.com/appengine/docs/java/endpoints/gen_clients
I gave the following command from the root directory of my app-engine application
endpoints.sh get-client-lib Greetings
But getting the following error
Dec 16, 2013 5:47:43 PM com.google.apphosting.utils.config.AppEngineWebXmlReader readAppEngineWebXml
SEVERE: Received exception processing ./war/WEB-INF/appengine-web.xml
com.google.apphosting.utils.config.AppEngineConfigException: Could not locate /Users/raj/Documents/workspace-maven/helloendpoints/./war/WEB-INF/appengine-web.xml
Give below are my questions,
Is this command execution right?
endpoints.sh get-client-lib Greetings
In the documentation in google ; the second argument is
specified as 'get-client-lib' I have given the same name while
executing the command ; is this right?
As you can see in the error ; it describes ; file -
helloendpoints/./war/WEB-INF/appengine-web.xml could not be located.
The file is indeed available in my application, but is located in a
different directory(indeed in 3 locations) ; What should I do here?
./src/main/webapp/WEB-INF/appengine-web.xml
./target/generated-sources/appengine-endpoints/WEB-INF/appengine-web.xml
./target/helloendpoints-1.0-SNAPSHOT/WEB-INF/appengine-web.xml
The documentation suggest me to edit 'web.xml' file. But the file is
available in 3 location and am not sure which one I have to edit(I
have edited the file in 3rd location)
./src/main/webapp/WEB-INF/web.xml
./target/generated-sources/appengine-endpoints/WEB-INF/web.xml
./target/helloendpoints-1.0-SNAPSHOT/WEB-INF/web.xml
I am finding it quite difficult to resolve this issue ; as there is no other documentation (or) examples available in web other than the Google official documentation.
Would appreciate if some-one can help me to resolve this. Thank you.
you just need to make sure that, you directory exist and that you have the required files into the directories. I can also use the maven goal to make the generation, I read a complete article on the issue here. http://thenavigatorme.blogspot.com/2014/05/how-to-resolve-google-cloud-endpoints.html
Hope this helps.

Android SDK ping has encountered

While starting on eclipse I am getting below message:
Android SDK ping has encountered a problem,
ping usageServer failed
OnClick on details:
pingUsageServer failed
Bad version: 22.0.5
I know this question is already posted, but I didn't find any relevant solution for this. I am using windows 8.
While running the SDK:
////////////////////////////////////////////
Fetching http://dl-ssl.google.com/android/repository/addons_list-2.xml
Fetched Add-ons List successfully
Fetching URL: http://dl-ssl.google.com/android/repository/repository-8.xml
Validate XML: http://dl-ssl.google.com/android/repository/repository.xml
XML verification failed for http://dl-ssl.google.com/android/repository/repository.xml.
Line -१:-१, Error: org.xml.sax.SAXParseException; schema_reference.4: Failed to read schema document 'null', because 1) could not find the document; 2) the document could not be read; 3) the root element of the document is not .
Done loading packages.
Fetching http://dl-ssl.google.com/android/repository/addons_list-2.xml
Fetched Add-ons List successfully
Fetching URL: http://dl-ssl.google.com/android/repository/repository-8.xml
Validate XML: http://dl-ssl.google.com/android/repository/repository.xml
XML verification failed for http://dl-ssl.google.com/android/repository/repository.xml.
Line -१:-१, Error: org.xml.sax.SAXParseException; schema_reference.4: Failed to read schema document 'null', because 1) could not find the document; 2) the document could not be read; 3) the root element of the document is not .
Done loading packages.
Finally I solved the issue by updating hosts file.C:\Windows\System32\Drivers\etc, in last line I updated 74.125.237.1 dl-ssl.google.com, and second thing I change the windows language Hindi to english.
It's mainly because when you have other languages installed in parallel to English.
For correcting this issue go to: control panel > language > Advance Settings. Set Override for Windows display language to English. Do the same for Override for default input method and then restart Eclipse.

Gradle Error for Android Studio

I'm trying out Android Studio on OS X and am running into a mysterious error message. I went through the Google guide to building a simple UI, but when I finished writing the XML file and hit Run in the IDE, I get the following message ("Test2" is the name of the project):
Gradle: Execution failed for task ':Test2:validateDebugSigning'.
> Could not find matching constructor for: org.gradle.tooling.BuildException(java.lang.String)
I have never developed an android app before, so I don't know how common this is. I did a search for this error and found no one encountering the same problem.
I tried the solution from Abhan and I get a new error message:
Error: org.jetbrains.plugins.gradle.settings.GradleSettings cannot be cast to org.jetbrains.plugins.gradle.settings.GradleSettings
It warns you that android plug-in task validateDebugSigning cannot access the debug key. Check your accessibility to the debug.keystore.
On linux or OS X, the default location is ~/.android. On windows, it's in C:\Documents and Settings\.android\ or C:\Users\.android.

Android 3.0 Starter Pack - XML Verification Error

I have recently downloaded the SDK starter pack 'android-sdk_r10-windows' for Android development. I have Windows Vista OS. But now when I am starting the SDK Manager to install the Platform tools i am getting the below erorrs -
XML verification failed for https://dl-ssl.google.com/android/repository/repository.xml.
Line -१:-१, Error: org.xml.sax.SAXParseException: schema_reference.4: Failed to read schema document 'null', because 1) could not find the document; 2) the document could not be read; 3) the root element of the document is not .
XML verification failed for https://dl-ssl.google.com/android/repository/addons_list.xml.
Line -१:-१, Error: org.xml.sax.SAXParseException: schema_reference.4: Failed to read schema document 'null', because 1) could not find the document; 2) the document could not be read; 3) the root element of the document is not .
I also tried the Force settings in Settings -> Misc, but it too didn't help.
Can someone throw some pointers. I am a bit stuck as I have downloaded the Starter pack and not able to figure out what could be wrong.
Thanks in advance.
I was facing same problem in eclipse as well as android studio and i was able to solve it by changing the computer language. check your computer language and set only English language in your computer.

Categories

Resources