Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

try the Android demo under mac pro and show this: #12

Closed
oatsuper opened this issue Apr 3, 2016 · 3 comments
Closed

try the Android demo under mac pro and show this: #12

oatsuper opened this issue Apr 3, 2016 · 3 comments

Comments

@oatsuper
Copy link

oatsuper commented Apr 3, 2016

BUILD FAILED
/Users/yanyan/Install/android-sdk-macosx/tools/ant/build.xml:538: For 'MNC' SDK Preview, attribute minSdkVersion in AndroidManifest.xml must be 'MNC' (current: )

Total time: 0 seconds

install macaca-android success
install macaca-android failed with Error: Cannot find module 'macaca-android'

responseHandler.js:56:12 [master] pid:8134 Send Error Respone to Client TypeError: Android is not a function
responseHandler.js:62:14 [master] pid:8134 TypeError: Android is not a function
at WebdriverServer.detectDevice (/usr/local/lib/node_modules/macaca-client/node_modules/webdriver-server/lib/server/index.js:56:14)
at WebdriverServer.start (/usr/local/lib/node_modules/macaca-client/node_modules/webdriver-server/lib/server/index.js:38:22)
at next (native)
at onFulfilled (/usr/local/lib/node_modules/macaca-client/node_modules/co/index.js:65:19)
at /usr/local/lib/node_modules/macaca-client/node_modules/co/index.js:54:5
at Object.co (/usr/local/lib/node_modules/macaca-client/node_modules/co/index.js:50:10)
at Object.toPromise (/usr/local/lib/node_modules/macaca-client/node_modules/co/index.js:118:63)
at next (/usr/local/lib/node_modules/macaca-client/node_modules/co/index.js:99:29)
at onFulfilled (/usr/local/lib/node_modules/macaca-client/node_modules/co/index.js:69:7)
at /usr/local/lib/node_modules/macaca-client/node_modules/co/index.js:54:5
responseHandler.js:81:14 [master] pid:8134 Unexcepted error TypeError

InternalServerError: Internal Server Error
at Object.module.exports.throw (/usr/local/lib/node_modules/macaca-client/node_modules/koa/lib/context.js:91:23)
at Object.module.exports (/usr/local/lib/node_modules/macaca-client/node_modules/webdriver-server/lib/server/responseHandler.js:82:17)
at throw (native)
at onRejected (/usr/local/lib/node_modules/macaca-client/node_modules/co/index.js:81:24)
at process._tickCallback (node.js:412:9)

  1. "before all" hook
    responseHandler.js:24:12 [master] pid:8134 Recieve HTTP Request from Client: method: DELETE url: /wd/hub/session, jsonBody: {}
    responseHandler.js:48:14 [master] pid:8134 Send HTTP Respone to Client: {"sessionId":"","status":0}

0 passing (3s)
1 failing

  1. macaca mobile sample "before all" hook:
    [init({"platformName":"Android","app":"/Users//work/testfor58/tools/macaca/testDemo/samplemacaca/app/android-app-bootstrap.zip","udid":"HEF68H794DJ7EEUC"})] The environment you requested was unavailable.
    Error: [init({"platformName":"Android","app":"app/android-app-bootstrap.zip","udid":"HEF68H794DJ7EEUC"})] The environment you requested was unavailable.
    at endReadableNT (_stream_readable.js:913:12)

Test completed!

macaca doctor is good for IOS and Android env

And the Android udid refer to what ? adb devices -- device id?

@xudafeng
Copy link
Member

xudafeng commented Apr 3, 2016

@oatsuper

try npm i macaca-android -g, and show me the logs.

During the installing, there are compling happen with your Android SDK, please use current edition.

android-19 to android-23 is is recommended.

@oatsuper
Copy link
Author

oatsuper commented Apr 4, 2016

@xudafeng Thanks for your reply~
See the below log as you want:
samplemacaca npm i macaca-android -g
npm WARN deprecated win-spawn@2.0.0: use cross-spawn or cross-spawn-async instead.

unlock-apk@0.1.11 install /usr/local/lib/node_modules/macaca-android/node_modules/unlock-apk
node ./script/build.js

JAVA_HOME is set to /Library/Java/JavaVirtualMachines/jdk1.8.0_77.jdk/Contents/Home
Buildfile: /usr/local/lib/node_modules/macaca-android/node_modules/unlock-apk/build.xml

-set-mode-check:

-set-debug-files:

-check-env:

[checkenv] Android SDK Tools Revision 24.3.3

[checkenv] Installed at /Users/yanyan/Install/android-sdk-macosx

-setup:

 [echo] Project Name: unlock_apk

[gettype] Project Type: Application

-set-debug-mode:

-debug-obfuscation-check:

-pre-build:

-build-setup:

[getbuildtools] Using latest Build Tools: 23.0.0 rc3

 [echo] Resolving Build Target for unlock_apk...

[gettarget] Project Target: Android M (Preview)

[gettarget] API level: MNC

BUILD FAILED
/Users/yanyan/Install/android-sdk-macosx/tools/ant/build.xml:538: For 'MNC' SDK Preview, attribute minSdkVersion in AndroidManifest.xml must be 'MNC' (current: )

Total time: 0 seconds

/usr/local/lib/node_modules/macaca-android/node_modules/ant-build/lib/ant-build.js:102
throw 'build failed';
^
build failed
/usr/local/lib
└── (empty)

@xudafeng
Copy link
Member

xudafeng commented Apr 5, 2016

@oatsuper remove SDK MNC, this problem can be solved.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants