problems while implementing android GCM demo - android

I put in reference this:
http://developer.android.com/guide/google/gcm/demo.html
in Using App Engine for Java number 4
I am supposed to run this on a cmd inside the samples/gcm-demo-appengine directory :ant -Dsdk.dir=/opt/google/appengine-java-sdk runserver -Dserver.host=192.168.1.10
I replace the "192.168.1.10" with "127.0.0.1" which is my locolhost.
after executing this command I got:
BUILD FAILED
C:\Program Files (x86)\Android\android-sdk\extras\google\gcm\samples\gcm-demo-ap
pengine\build.xml:27: Cannot find C:\opt\google\appengine-java-sdk\config\user\a
nt-macros.xml imported from C:\Program Files (x86)\Android\android-sdk\extras\go
ogle\gcm\samples\gcm-demo-appengine\build.xml
can you tell me what the problem?

Go to the following link:
[https://developers.google.com/appengine/downloads#Google_App_Engine_SDK_for_Java]
And download appengine-java-sdk-1.9.3.zip
So than extract it where you want and use the following path for example:
C:\programs\appengine-java-sdk-1.9.3
so you will use :
ant -Dsdk.dir=C:\programs\appengine-java-sdk-1.9.3 runserver -Dserver.host=1.1.1.1
where you have to replace 1.1.1.1 with your server's ip

Related

How to add android "SDK Update Site" via command line

I am using the android's sdkmanager commandline tool to update the SDK and I want to add an update site for addons. How can I do that only from commandline. I cannot use UX tool as I am accessing the host via ssh.
You will need to create this a file named repositories.cfg under your ~/.android/ folder.
Paste the following content into the file and modify it as needed.
### User Sources for Android Repository
#Tue Dec 12 15:45:09 PST 2017
disp02=Url1
disp01=Url2
disp00=Url3
count=3
enabled02=true
enabled01=true
enabled00=true
src02=http\://somewhere.com/some-extras-2/SomeArtifact2/some-extra-artifact.xml
src01=http\://somewhere.com/some-extras-1/SomeArtifact1/some-extra-artifact.xml
src00=http\://somewhere.com/some-extras-0/SomeArtifact0/some-extra-artifact.xml
Looks like still nothing better than writing a custom script to achieve these steps:
Download addon.xml
Parse it to get the location of a package archive[1]
Download package and extract to $ANDROID_SDK_HOME/add-ons
Convert addon.xml to package.xml and place it in addon directory in Android SDK
Here is my script to do this https://gist.github.com/CAMOBAP795/b5664b05ce2130de8192516fd4c4b9b0
Prerequisites:
- wget
- libxml2-utils
- xsltproc
[1] During development I observed that there are several XSD schemes, so my script doesn' cover all cases

Android Studio-Gradle issue-.bin file error

i see "Error:C:\Documents and Settings\Student.gradle\daemon\2.8\registry.bin (The process cannot access the file because it is being used by another process)" in android studio...how to solve it...
Test this method .
You use a proxy like freegate
Run cmd and goto to main folder project .
And run this code gradlew -Dhttps.proxyHost=127.0.0.1 -Dhttps.proxyPort=8580
proxyPort=Your used proxy

Couchbase Sync gateway on Windows

I installed sync_gateway for windows from http://www.couchbase.com/nosql-databases/downloads.
I am trying to execute command sync_gateway config.json but it gives me an error. How to execute config.json to sync data with android device.
My config.json contains
{
"interface":":4984",
"adminInterface":":4985",
"log":["REST"],
"databases":{
"sync_gateway":{
"server":"http://localhost:8091",
"bucket":"sync_gateway",
"sync":`function(doc) {channel(doc.channels);}`
}
}
}
Open the file location for the sync_gateway.exe it will be usually in the directory "C:\Program Files (x86)\Couchbase" .
You have to place your configure.json in that directory .
Now open windows command prompt and do 'cd C:\Program Files (x86)\Couchbase' and run the command 'sync_gateway.exe configure.json' . Ensure that your configure.json file is perfect and does not have any syntax errors.
refer Couchbase,Where to add config.json for windows Installation? for run config.json
refer Write config.json for sync_gateway
Please check some prerequisites:
Sync Gateway is not a product on his own. You must have an available server. (property named "server", with port 8091.
You must have bucket named "sync_gateway" in your case
you can define it with the JSON property above, "bucket"
Roi.

How to run malloDroid script?

I want to check SSL verification in my application. I downloaded on my santoku malloDroid.py and try use it (of course earlier I have read that script is an extansion of Androguard). I simply run mallo app: ./malloroid.py -f test.apk and i got import error that there is no androguard module. How to run malloDroid script to verify ssl?
In order to use MalloDroid, you need to have AndroGuard. Setting up Androguard is quite straight forward. Read more about installation here .
Once you have Androguard set up along with the proper environment variables, you can use Mallodroid as follows :
./mallodroid.py -f test.apk -x
This will most likely work!

Android Tess-two: library configuration using cygwin

i am following this tutorial here to use Tesseract libs for android. and in step(b) in the link posted, it says: b.export TESSERACT_PATH=${PWD}/external/tesseract-3.01
and in cygwin i wrote the following:
dm#me /cygdrive/e/Data/private/Fr/OCR/libs/tess-two-
master/tess-two-master/tess-two
but when i execute it i receive the belwo error:
$ export C:\Program Files (x86)\Tesseract-OCR=${PWD}\external\tesseract-3.01
-bash: syntax error near unexpected token `('
please let me know how to fix it, as i am a beginner to cygwin.
update:
i tried ezrepotein4 answer, and now it gives me "not a valid identifier". please , let me know what is "external\tesseract-3.01", i do not have these files/folders...and what is PWD. thanks
In this tutorial author uses few linux commands:
cd which changes directory - it is an equevalent of windows dir
export which sets environment variable
Before exporting any variable you should change directory to your project dir, because all $PWD strings in further commands will be replaced by your current directory.
This tutorial assumes that you compiled tesseract and leptonica and you keep them in project-dir/tess-two/external directory as tesseract-3.01 and leptonica-1.68. Source code for those libraries are in tess-two/jni directory in repository as stated in README.md https://github.com/rmtheis/tess-two/blob/master/README.md
Code which you are trying yo execute is incorrect both syntactically and semantically. It is incorrect syntactically because you all spaces are treated as separators between arguments. Semantically you are trying to set variable C:\Program Files (x86)\Tesseract-OCR to value of ${PWD}\external\tesseract-3.01. Instead you should set TESSERACT_PATH variable.
To do this try command TESSERACT_PATH=${PWD}/external/tesseract-3.01 as stated in tutorial. This means that you are setting variable TESSERACT_PATH to folder external/tesseract-3.01 in your current dir.
To further inspect a value of this variable type: echo $TESSERACT_PATH.

Categories

Resources