0

I am using Android Studio 1.5.1 and I am using some Paint.Net images (.pdn) and also some icons in .pptx format. I saw this solution .

classpath 'com.android.tools.build:gradle:1.2.2' in gradle.properties

But on applying it I get the below error :

Error:Unknown host 'jcenter.bintray.com'. You may need to adjust the proxy settings in Gradle.
<a href="toggle.offline.mode">Enable Gradle 'offline mode' and sync project</a><br><a href="https://docs.gradle.org/current/userguide/userguide_single.html#sec:accessing_the_web_via_a_proxy">Learn about configuring HTTP proxies in Gradle</a>

I added below proxy configuration inside the gradle.properties

systemProp.http.proxyHost=proxy.host.com
systemProp.http.proxyPort=portnum
systemProp.http.proxyUser=userId
systemProp.http.proxyPassword=passWord
systemProp.http.auth.ntlm.domain=*.nonproxyrepos.com|localhost

systemProp.https.proxyHost=proxy.host.com
systemProp.https.proxyPort=portNum
systemProp.https.proxyUser=userId
systemProp.https.proxyPassword=passwoRd
systemProp.https.nonProxyHosts=*.nonproxyrepos.com|localhost

But then I get this error:

Error:Cause: peer not authenticated

and then I read this post, which says the Gradle version has to be correct in the build.gradle.

classpath 'com.android.tools.build:gradle:1.2.2'

Now I am in a deadLock! Does Android not support .pdn or .pptx in drawable?

Robert Longson
  • 118,664
  • 26
  • 252
  • 242
Raulp
  • 7,758
  • 20
  • 93
  • 155
  • see: [Android: Using SVG in res leads to error: “The file name must end with .xml or .png”](http://stackoverflow.com/questions/34984023/error-the-file-name-must-end-with-xml-or-png-when-using-an-mp3-file) – arober11 Jun 26 '16 at 16:26

2 Answers2

0

Does Android Studio 1.5.1 cant support .pdn or .pptx in drawable?

Android Studio does not support .pdn or .pptx as drawable resources.

CommonsWare
  • 986,068
  • 189
  • 2,389
  • 2,491
  • I just want to ask would they not be supported if placed in raw folder?? – Vivek Mishra Mar 14 '16 at 13:49
  • @VivekMishra: They would be fine in `res/raw/`. I said that they are not supported as drawable resources. – CommonsWare Mar 14 '16 at 13:56
  • I am just asking out of curiosity if they will be supported in raw or not. I am not asking about drawables as I know they will not work in drawables – Vivek Mishra Mar 14 '16 at 13:59
  • @VivekMishra: In general, anything can go in `res/raw/`, as Android does not attempt to infer any particular sort of content is in there. You're still subject to limitations like filenames (must be a valid Java field name). But I am not aware of anything you can't put in `res/raw/`. – CommonsWare Mar 14 '16 at 14:05
  • Android Studio is wrong though - this is reproducible with other IDEs or editors using the standard framework and SDK with Gradle. It's an Android restriction – Zoe Apr 04 '19 at 09:05
0

Android accepts only .png, .jpg, .gif and .xml files as drawable resources. For more information look here

Astgh
  • 216
  • 4
  • 14