I'm using command line for PhoneGap and after that I created the project I want to add platform. When I digit this: cordova platform add android, I have this error:
> npm http GET https://registry.npmjs.org/cordova-android/3.7.1
> TypeError: Request path contains unescaped characters.
> at new ClientRequest (_http_client.js:73:11)
> at TunnelingAgent.exports.request (http.js:49:10)
> at TunnelingAgent.createSocket (C:\Users\AppData\Roaming\np
> m\node_modules\cordova\node_modules\cordova-lib\node_modules\npm\node_modules\re
> quest\node_modules\tunnel-agent\index.js:117:25)
> at TunnelingAgent.createSecureSocket [as createSocket] (C:\Users\AppData\Roaming\npm\node_modules\cordova\node_modules\cordova-lib\node_mod
> ules\npm\node_modules\request\node_modules\tunnel-agent\index.js:184:41)
> at TunnelingAgent.addRequest (C:\Users\AppData\Roaming\npm\
> node_modules\cordova\node_modules\cordova-lib\node_modules\npm\node_modules\requ
> est\node_modules\tunnel-agent\index.js:80:8)
> at new ClientRequest (_http_client.js:154:16)
> at Object.exports.request (http.js:49:10)
> at Object.exports.request (https.js:136:15)
> at Request.start (C:\Users\AppData\Roaming\npm\node_modules
> \cordova\node_modules\cordova-lib\node_modules\npm\node_modules\request\index.js
> :594:30)
> at Request.end (C:\Users\AppData\Roaming\npm\node_modules\c
> ordova\node_modules\cordova-lib\node_modules\npm\node_modules\request\index.js:1
> 186:28)
Can I fix it??? I set my proxy and the version of Android is 4.4W.2 (API 20)
It's related to the proxy, in this issue of ionic-cli people say downgrading node to 0.10.29 solves it.
Also, if downgrade is not an option, you can change the tunnel agent following this steps:
Replace the content of C:\Program Files (x86)\nodejs\node_modules\npm\node_modules\request\node_modules\tunnel-agent with the content of this zip: https://github.com/mikeal/tunnel-agent
Configure the proxy settings:
npm config set proxy http://proxy:port
set PROXY=http://proxy:port
Related
I want to change the Terminal font size. But I have no idea to do it.
Who can solve it?
in window : File - > Settings - > Editor - > Color scheme -> Console Font
File > Settings (Ctrl + Alt + S) > Editor > Color Scheme > Console Font
Thanks for everyone, I have solve it. I also do this steps some days ago, but it is not effective immediately. I try to do it once again just now and then restart AndroidStudio , Everything is OK. Thanks!
In Android Studio 3.0 File > Settings > Editor > Color & Fonts > Console Font....then click Apply and Ok
If you are android studio version above 3.0 :
File > Settings > Editor(expand it) > Color scheme(Expand it) > Console Font > Tick checkbox of Use console font instead of default > Enter size of font you want use > click Apply > Click Ok
This error came up when run react-native run-android.
I have already setup environment variables.
ANDROID_HOME C:\Users\username\AppData\Local\Android\Sdk
I tried creating local.properties file in in myapp/android
with the content of this, sdk.dir = C:/Users/ivani/AppData/Local/Android/Sdk.
This error came up.
Failed to notify project evaluation listener.
Could not initialize class com.android.sdklib.repository.AndroidSdkHandler
Go to Control Panel > System and Security > System click on Advance System Setting > Environment Variable > System Variable > Edit > New
Add the path i.e C:\Users\username\AppData\Local\Android\Sdk\platform-tools and click ok.
Set the ANDROID_HOME and JAVA_HOME path go to Control Panel > System and Security > System click on Advance System Setting > Environment Variable > User Variable > New
set the SDK path click ok and set the jdk path click ok
for further reference follow the step 5 and 6 from React Native Environment Setup on Windows 10
I have installed fresh appcelerator studio and titanium CLI and also other dependancies when I am trying to run android app then it showing the following error :
[INFO] : Packaging application: ../sw/android-sdk-macosx/build-tools/24.0.2/aapt "package" "-f" "-m" "-J" "WorkData/Appcelator Projects/test/build/android/gen" "-M" "../Appcelator Projects/test/build/android/AndroidManifest.xml" "-A" "../WorkData/Appcelator Projects/test/build/android/bin/assets" "-S" "../WorkData/Appcelator Projects/test/build/android/res" "-I" "../sw/android-sdk-macosx/platforms/android-23/android.jar" "-F" "../WorkData/Appcelator Projects/test/build/android/bin/app.ap_" "--auto-add-overlay" "--extra-packages" "ti.modules.titanium.ui:android.support.v7.appcompat:android.support.v7.cardview" "-S" "/var/folders/jf/f17wzygx4nbd6fg5wsntf4840000gn/T/116820-1742-1nuy1sx.xxrqp30udi/res" "-S" "/var/folders/jf/f17wzygx4nbd6fg5wsntf4840000gn/T/116820-1742-hop1bc.t53b359udi/res" "-S" "/var/folders/jf/f17wzygx4nbd6fg5wsntf4840000gn/T/116820-1742-6n4mu0.4svn3o9a4i/res"
2016-09-20T06:14:33.921Z | ERROR | An uncaught exception was thrown!
Path must be a string. Received undefined
2016-09-20T06:14:33.922Z | ERROR | Path must be a string. Received undefined
and also I am able to run same project on iPhone.
My machine Configuration is as follows :
Operating System
Name = Mac OS X
Version = 10.11.6
Architecture = 64bit
# CPUs = 4
Memory = 8589934592
Node.js
Node.js Version = 6.5.0
npm Version = 3.10.3
Titanium CLI
CLI Version = 5.0.9
Titanium SDK
SDK Version = 5.5.0.GA
SDK Path = /Users/neosoft/Library/Application Support/Titanium/mobilesdk/osx/5.5.0.GA
Target Platform = android
Command
can anyone help me to resolve issue ...
You appear to be using Build Tools SDK 24.#. This is not yet supported by Appcelerator. You should un-install this version and install 23 (the latest supported by appcelerator).
I recommend watching the Compatibility Matrix from time to time.
After that select the minSDK and targetSDK in Tiapp.xml like this:
<android xmlns:android="http://schemas.android.com/apk/res/android">
<manifest android:versionCode="1"
android:versionName="1.0.0" package="app.my" xmlns:android="http://schemas.android.com/apk/res/android">
<uses-sdk android:minSdkVersion="16" targetSdkVersion="23"/>
</manifest>
</android>
See my Android SDK folder looks like this:
Try to look at your Android SDK folders and check if there is anything related to version 24. And also do these tasks after deleting everything related to 24 version:
Remove the uses-sdk tag from tiapp.xml and let Titanium SDK do stuffs on its own.
Delete build and Resources folders from your Titanium project root directory
Clean and run the project now.
Check your version of node.js with this command:
node -v
If your version is higher than 4.4.2 that's the problem. You can fix it with:
sudo npm cache clean -f
sudo npm install -g n
sudo n 4.4.2
I had the same issue and got resolved after changing my node version to 4.4.2. Just updating it here if that may help anyone.
Corrupt New Android Project in Eclipse on Mac OSX 10.9.4
Problem:
*) New > Project > Android Application Project > ...
*) Upon clicking 'Finish', a project is created, but is obviously corrupt/incomplete, wizard dialog does not close.
*) Project missing res/layout/ and src/ files (and perhaps others)
From ADT (bundled Eclipse):
*) Download ADT Bundle: https: //dl.google.com/android/adt/adt-bundle-mac-x86_64-20140702.zip
*) Extract/Move to /opt/adt
*) Using Eclipse (Juno) in /opt/adt/eclipse/Eclipse.app/Contents/MacOS/eclipse
From Eclipse, adding plugin:
*) Download Eclipse (Luna) eclipse-standard-luna-R-macosx-cocoa-x86_64.tar.gz
*) Extract/Move to /opt/eclipse
*) Using Eclipse (Luna) in /opt/eclipse/Eclipse.app/Contents/MacOS/eclipse
*) Help > Install New Software > Add > https: //dl-ssl.google.com/android/eclipse/ > 23.0.2.1259578
*) Eclipse Restart > point to /opt/adt/sdk
Attempted (unsuccessfully) Other Solutions:
Install Software:
*) Install All software via Android SDK Manager (tools, api, extras)
Install Updates Manually:
*) Help > Install new software > "Eclipse Project Updates" > All ...
*) https : //dl-ssl.google.com/android/eclipse/ (not http : //dl-ssl.google.com/android/eclipse/)
Uninstall and Reinstall adt/software:
*) Eclipse > About Eclipse > Installation Details > Uninstall ... > Finish > Restart
Different versions/sources manually:
(stackoverflow.com/ questions/4710107/where-can-i-find-older-versions-of-eclipse-adt)
*) Download http : //dl.google.com/android/ADT-23.0.2.zip, 22.3.0, ...
*) Help > Install new software > Add > Archive > ...zip
Different Activity Types / Combinations:
*) Blank Activity, Empty Activity, Blank with Fragment, ...
*) API 14, API 20, API 21, ...
Specific References:
Null Pointer Exception:
stackoverflow.com/ questions/23577131/creating-a-new-android-project-in-eclipse-adt-gives-a-nullpointerexception-mac
Similar via Windows Machine:
stackoverflow.com/ questions/11492585/cannot-create-a-new-android-project-using-eclipse
Similar failure, but restricted to activity creation:
stackoverflow.com/ questions/22190578/adt-will-not-allow-creation-of-android-activity
stackoverflow.com/ questions/11260619/eclipse-juno-wont-create-android-activity
Perhaps same issue:
stackoverflow.com/ questions/22232836/eclipse-android-project-not-creating-blank-activity
Issue Tracking Possibly same issue:
https : //code.google.com/p/android/issues/detail?id=66647
No clear acknowledgment of issue:
http : //tools.android.com/knownissues
Hello World:
https : //developer.android.com/training/basics/firstapp/running-app.html
I actually have a working xubuntu android environment setup using these precise same steps.
I have developed for Android on a Mac in the past, but this is a new problem for me.
Running via command line works, and so does Android Studio, so this seems Eclipse specific.
(SO won't allow screenshots, or more than 2 links)
I use Eclipse with ADT installed. And I have never really been able to import projects.
The thing is, when I do what tutorials tell me to do, which is:
My files:
> Username
> > Downloads
> > > Apps
> > > > Project1
> > > > > AndroidManifest.xml
> > > > > res
> > > > > src
Click import
Existing android application
Select root directory
I selected the folder ".../Username/Downloads/Apps"
Then select the projects you want and click next...
The problem is, the list of apps to import is empty after I select my path!
The way I do it is just selecting the folder containing th res and src subfolders, then use the option (checkbox) "Copy projects into workspace". Then finish