snipt

Ctrl+h for KB shortcuts
Sign up for : store and share your own code snippets.
#136876

Text only

sdk.dir is missing. Make sure to generate local.properties using 'android update project' or to inject it through the ANDROID_HOME environment variable.

1
2
3
4
5
Open the terminal window and enter the following:
export ANDROID_HOME=/Applications/adt-bundle/sdk (ng: write your own path to sdk)

Once you have this set, you need to add this to the PATH environment variable
export PATH=$PATH:$ANDROID_HOME/bin
https://snipt.net/embed/dcaa2e1f32999dd44f9907a19e3495bf/
https://snipt.net/raw/dcaa2e1f32999dd44f9907a19e3495bf/
dcaa2e1f32999dd44f9907a19e3495bf
text
Text only
5
2015-07-03T21:04:52
True
False
/api/public/snipt/136876/
sdkdir-is-missing-make-sure-to-generate-localproperties-using-android-update-project-or-to-inject-it-through-the-android_home-environment-variable-e54f799d
<table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><a href="#L-1">1</a> <a href="#L-2">2</a> <a href="#L-3">3</a> <a href="#L-4">4</a> <a href="#L-5">5</a></pre></div></td><td class="code"><div class="highlight"><pre><span id="L-1"><a name="L-1"></a>Open the terminal window and enter the following: </span><span id="L-2"><a name="L-2"></a>export ANDROID_HOME=/Applications/adt-bundle/sdk (ng: write your own path to sdk) </span><span id="L-3"><a name="L-3"></a> </span><span id="L-4"><a name="L-4"></a>Once you have this set, you need to add this to the PATH environment variable </span><span id="L-5"><a name="L-5"></a>export PATH=$PATH:$ANDROID_HOME/bin </span></pre></div> </td></tr></table>
android, cordova
#135973

Text only

Android/Cordova: http requests not working on jarsigned app

1
2
3
4
5
Only works on debug.
http works, https doesn't.

The problem could come from the certificate:
http://stackoverflow.com/questions/20036260/phonegap-android-app-ajax-requests-to-https-fail-with-status-0
https://snipt.net/embed/b57a79b32ec8fc0a20de53764adc8a19/
https://snipt.net/raw/b57a79b32ec8fc0a20de53764adc8a19/
b57a79b32ec8fc0a20de53764adc8a19
text
Text only
5
2015-06-29T17:37:57
True
True
Jul 29, 2014 at 11:45 AM
/api/public/snipt/135973/
androidcordova-http-requests-not-working-on-jarsigned-app-50e8fd6a
<table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><a href="#L-1">1</a> <a href="#L-2">2</a> <a href="#L-3">3</a> <a href="#L-4">4</a> <a href="#L-5">5</a></pre></div></td><td class="code"><div class="highlight"><pre><span id="L-1"><a name="L-1"></a>Only works on debug. </span><span id="L-2"><a name="L-2"></a>http works, https doesn&#39;t. </span><span id="L-3"><a name="L-3"></a> </span><span id="L-4"><a name="L-4"></a>The problem could come from the certificate: </span><span id="L-5"><a name="L-5"></a>http://stackoverflow.com/questions/20036260/phonegap-android-app-ajax-requests-to-https-fail-with-status-0 </span></pre></div> </td></tr></table>
android, certificate, http
#100267

Text only

ADB screenshot to file with date (osx)

adb shell screencap -p | perl -pe 's/\x0D\x0A/\x0A/g' > "screen_$(date +%Y_%m_%d_%H_%M_%S).png"
https://snipt.net/embed/46a7fb26235d631272c4a4f9932be56a/
https://snipt.net/raw/46a7fb26235d631272c4a4f9932be56a/
46a7fb26235d631272c4a4f9932be56a
text
Text only
1
2015-06-30T11:00:29
True
False
Dec 13, 2013 at 03:43 AM
/api/public/snipt/100267/
adb-screenshot-to-file-with-date-osx
<table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><a href="#L-1">1</a></pre></div></td><td class="code"><div class="highlight"><pre><span id="L-1"><a name="L-1"></a>adb shell screencap -p | perl -pe &#39;s/\x0D\x0A/\x0A/g&#39; &gt; &quot;screen_$(date +%Y_%m_%d_%H_%M_%S).png&quot; </span></pre></div> </td></tr></table>
adb, android, osx, screenshot
Copyrighted, illegal, or inappropriate content? Email nick@snipt.net.