Cordova/Phone Gap 2.5.0 create error - macos

I have a problem while creating a new android project for phonegap 2.5.0. I use a Mac and set the path variables correctly. But after the command
./create /pathtoProject/PhoneGap FirstPackage CatchMyPainPG
the terminal works for about a second and then i get the following error:
An unexpected error occurred: "$ANDROID_BIN" create project --target $TARGET --path "$PROJECT_PATH" --package $PACKAGE --activity $ACTIVITY >&/dev/null exited with 1
Deleting project...
What does this mean? I think i've set the correct path variables and have all the android sdk's installed.
I hope you can help me! Thanks in advance

The package name should be prefixed accordingly with 3 namespace.
Example: com.companyname.projectname
Try this:
./create /pathtoProject/PhoneGap com.YourCompanyName.FirstPackage CatchMyPainPG

make sure you can run the commands below from your terminal:
ant -version
java -version
android -h

Related

Error message:protoc-gen-go: Plugin failed with status code 1

This is not a duplicate question
First, I made sure I have the following configuration:
1 export GOPATH=/Users/chezixin/go
2 export GOBIN=/Users/chezixin/go/bin
3
4 export GO111MODULE=on
5 # 123
6 export GOPROXY=https://goproxy.cn
7
8
9 export PATH="$PATH:/Applications/Postgres.app/Contents/Versions/12/bin:/Users/chezixin/flutterSDK/flutter/bin:/usr/local/go/bin:$GOPATH:$GOBIN"
10
czxmac:~ chezixin$ echo $PATH
/usr/local/bin:/usr/bin:/bin:/usr/sbin:
/sbin:/Applications/VMwareFusion.app/Contents/Public:
/Applications/Postgres.app/Contents/Versions/latest/bin:
/Applications/Postgres.app/Contents/Versions/12/bin:
/Users/chezixin/flutterSDK/flutter/bin:/usr/local/go/bin:
/Users/chezixin/go:/Users/chezixin/go/bin':
/Users/chezixin/Go/bin:/Applications/Postgres.app/Contents/Versions/12/bin:
/Users/chezixin/flutterSDK/flutter/bin:
/usr/local/go/bin:/Users/chezixin/go:
/Users/chezixin/go/bin:/Users/chezixin/Go/bin
Already installed:
go get -u google.golang.org/grpc
look protoc:
czxmac:~ chezixin$ protoc --version
libprotoc 3.11.1
Protoc-gen-go is installed and exists in $ GOPATH/bin
go get -u github.com/golang/protobuf/protoc-gen-go
problem:
When I execute the following command
$ protoc --go_out=plugins=grpc:. *.proto
An error occurred:
protoc-gen-go: program not found or is not executable
Please specify a program using absolute path or make sure the program is available in your PATH system variable
--go_out: protoc-gen-go: Plugin failed with status code 1.
Where is the problem, please master guidance.
This issue is related with your PATH variable, please set it again.
I can see a typo of an extra trailing apostrophe(') in this line of PATH variable. /Users/chezixin/go:/Users/chezixin/go/bin':
Try updating it to
/Users/chezixin/go:/Users/chezixin/go/bin:
For anyone facing a similar issue, but it was not the case of an invalid PATH variable, I very much sympathize with you.
I realized that I had to install the compiler (again?) before it started working. I hadn't installed it before, but it appeared to already be downloaded. I guess I had to install it again or update it.
I personally was using betterproto, and I followed the instructions here to install it with the protoc plugin and try out their example.

Error while running make command using Fabric 1.0.6 after all the 15 steps

I am installing fabric in a custom path $HOME//gopath/src/github.com/hyperledger/fabric using the make command but after installing all the 15 steps, I am getting the following error
Step 15/15 : LABEL org.hyperledger.fabric.version=1.0.2 org.hyperledger.fabric.base.version=0.3.2
---> Running in ed05a67810db
Removing intermediate container ed05a67810db
---> 99b4b0b28957
Successfully built 99b4b0b28957
Successfully tagged hyperledger/fabric-javaenv:latest
docker tag hyperledger/fabric-javaenv hyperledger/fabric-javaenv:x86_64-1.0.2
build/bin/peer
CGO_CFLAGS=" " GOBIN=/root/gopath/src/github.com/hyperledger/fabric/build/bin go install -tags "" -ldflags "-X github.com/hyperledger/fabric/common/metadata.Version=1.0.2 -X github.com/hyperledger/fabric/common/metadata.BaseVersion=0.3.2 -X github.com/hyperledger/fabric/common/metadata.BaseDockerLabel=org.hyperledger.fabric -X github.com/hyperledger/fabric/common/metadata.DockerNamespace=hyperledger -X github.com/hyperledger/fabric/common/metadata.BaseDockerNamespace=hyperledger" github.com/hyperledger/fabric/peer
go build github.com/hyperledger/fabric/vendor/github.com/miekg/pkcs11: invalid flag in #cgo LDFLAGS: -Wl,--no-as-needed
Makefile:227: recipe for target 'build/bin/peer' failed
make: *** [build/bin/peer] Error 1
Docker version 17.12.0-ce, build c97c6d6
docker-compose version 1.18.0, build 8dd22a9
go version go1.9.4 linux/amd64
OS : Ubuntu 16.04
I have set the following path also
$ mkdir $HOME/gopath
$ export GOPATH=$HOME/gopath
$ export GOROOT=$HOME/go
$ export PATH=$PATH:$GOROOT/bin
Jira Link: https://jira.hyperledger.org/browse/FAB-2218 which I have already done
It is a known issue in go 1.9.4:
https://github.com/golang/go/issues/23739
While go people are fixing it, you can manually whitelist the flags before starting make:
$ export CGO_LDFLAGS_ALLOW='-Wl,--no-as-needed'
$ make
Alternatively you can just downgrade to go 1.9.3
as far as I know you don't need to build the fabric itself.
You just need to have sources in the gopath, as your chaincode will need this, when you are building your chaincode for the blockchain itself.
In addition you will probably also need to install the fabric-ca for your chaincode to build successfully, if you use the certificate-stuff.
This is sufficient to check if you installed fabric correctly:
cd $GOPATH/src/github.com/hyperledger/fabric
make unit-test
Keep going if this works.
I found this confusing at first as well ;)
I'd assume you switch to golang 1.9.4 or greater hence I belive this actually related to following issue, to solve it you need to update vendor dependencies:
govendor fetch github.com/hyperledger/fabric/vendor/github.com/miekg/pkcs11
Next continue to build binaries and run tests.

Unable to change GO version in PhotonOS

I have deployed PhotonOS using directions from photon and VIC configuration, while running command docker run -v $(pwd):/go/src/github.com/vmware/vic \-w /go/src/github.com/vmware/vic golang:1.6 make all
an Error appears:
Please install go1.7 (found: go version go1.6.3 linux/amd64)
Makefile:152: recipe for target 'goversion' failed
make: *** [goversion] Error 1
`
to solve it I have tried to update
go1.6.3 to go1.7 using solution - changeing go version manually
after steps go version is showing go1.4.2, but the previous error still complains on go version 1.6.3.
Also, I have tried to install "gvm" using bash < <(curl -s -S -L https://raw.github.com/moovweb/gvm/master/binscripts/gvm-installer) , whenever I try to call gvm install go1.7 it brings
-bash: gvm: command not found
whenever I retry running gvm-installer it says
ERROR: Already installed!
Any help is highly appreciated!!
use :
docker run -v $(pwd):/go/src/github.com/vmware/vic \-w /go/src/github.com/vmware/vic golang:1.7 make all
command instead, that will work on PhotonOS

gradle.daemon react-native: Could not find or load main class “Dorg.gradle.daemon=true”

When I try to build the project with the command 'react-native run-android' the following error appears:
Error: Could not find or load main class “Dorg.gradle.daemon=true”
JS server already running.
Building and installing the app on the device (cd android && ./gradlew installDebug...
Error: Could not find or load main class “Dorg.gradle.daemon=true”
Could not install the app on the device, read the error above for details.
.bash_profile contains the following global variables:
export ANDROID_HOME=$HOME/Library/Android/Android-SDK
export JAVA_HOME=/Library/Java/JavaVirtualMachines/jdk1.8.0_92.jdk/Contents/Hom
export GRADLE_OPTS=“Dorg.gradle.daemon=true”
I have my emulator running and I have ran the command "source ~/.bash_profile".
All I want is to enable gradle daemon and execute the project.
Don't know if this is the reason but should be rather:
GRADLE_OPTS="-Dorg.gradle.daemon=true"
mind the dash -.

Error -60005 when install Cocos2d-iPhone v3 RC4

When I try to install Cocos2d-iphone 3.0.0 RC4, I got an error: (run without sudo)
Error -60005 occurred while executing script with privileges.
So, I try to show its package content and use terminal to do: cd ...Cocos2D Installer 3.0.0.app/Contents/MacOS
I try this command: (with sudo)
sudo ./Cocos2D\ Installer\ 3.0.0
It works but I got log with some errors:
[1m>>> Installing Cocos2D-v3.0.0 files (B[m
[1m>>> Installing Cocos2D-v3.0.0 templates (B[m
[4m[1mCocos2D Template Installer (Cocos2D-v3.0.0)(B[m
Error: [31m✖︎(B[m Script cannot be executed as root.
In order for it to work properly, please execute the script again without 'sudo'.
If you want to know more about how to use this script execute '/Users/viethung/Downloads/Cocos2D-v3.0.0/install.sh --help'.
[1m>>> Building/Installing Cocos2D-v3.0.0 documentation, this may take a minute.... (B[m
appledoc version: 2.2 (build 963)
Generation step 4/5 failed: GBDocSetInstallGenerator failed generating output, aborting!
Documentation set was installed, but couldn't reload documentation within Xcode.
Xcode got an error: No documentation set present at specified path.
[1m>>> Cocos2D-v3.0.0 installation complete! (B[m
Are there any way is better than this way?
I have same problem.
I think you installed old cocos2d-iphone and it caused this problem.
You should remove old cocos2d-iphone first. I removed:
~/Library/Developer/Xcode/cocos2d v3.x
And install again. It works for me.
Hope it works for you :)

Resources