Android list target error

Error: Target id is not valid. Use ‘android list targets’ to get the target ids. #19

Comments

marlncpe commented Feb 26, 2013

root@marlon-laptop:/home/marlon/devkit/projects/whack-that-mole# basil build native-android —no-compress —debug —clean
[build] Building: debug/native-android
[build-native] Writing resources for 7ba6726c608a43fd8b607d27841e2774 with target native-android
[android] [error] Submodule tealeaf-core not found
[jsio] Inferring opts from platform: native
[packager] native-android < appID: '7ba6726c608a43fd8b607d27841e2774',
version: undefined,
fullPath: ‘/home/marlon/devkit/projects/whack-that-mole’,
compress: false,
debug: true,
release: true,
servicesURL: ‘http://api.gameclosure.com’,
output: ‘/home/marlon/devkit/addons/native-android/build/whackthatmole/assets/resources’,
localBuildPath: ‘build/debug/native-android’,
isSimulated: false,
isTestApp: false,
noRedirect: false,
noPrompt: true,
packageName: »,
studio: ‘lilvarmit.com’,
metadata: null,
target: ‘native-android’,
subtarget: ‘android’ >
[jsio] Compiling Source code.
[jsio] jsio_compile «gc.native.launchClient» —cwd «/home/marlon/devkit/projects/whack-that-mole» —compressorCachePath «/home/marlon/devkit/projects/whack-that-mole/build/.cache» —printOutput —defines «<"BUILD_TARGET":"native-android","BUILD_ENV":"native","DEBUG":true,"DEV_MODE":true,"ADDON_NATIVE_ANDROID2":true,"ADDON_EXAMPLES":true,"ADDON_NATIVE_ANDROID":true>» —jsioPath «sdk/jsio» —noIE «true» —environment «native» —path «[«.»,»sdk/jsio»,»sdk/gc/api/»,»sdk/»,»sdk/timestep/»]» —includeJsio «true» —appendImport «false» —debug «4»
WARN preprocessors.compiler could not compile import from sdk/gc/native/launchClient.js: ‘import base’, <>).logging.get(‘console’
WARN preprocessors.compiler could not compile import from sdk/timestep/device.js: ‘import ui.backend.’ + (exports.useDOM ? ‘dom’ : ‘canvas’
LOG ..imports Including native runtime.
[make] ndk-build -C TeaLeaf clean
make[1]: Entering directory /home/marlon/devkit/addons/native-android/TeaLeaf’ Clean: andprof [armeabi] Clean: cpufeatures [armeabi] Clean: jansson [armeabi] Clean: jpeg [armeabi] Clean: png [armeabi] Clean: stdc++ [armeabi] Clean: tealeaf [armeabi] Clean: v8a [armeabi] Clean: zip [armeabi] Clean: andprof [armeabi-v7a] Clean: cpufeatures [armeabi-v7a] Clean: jansson [armeabi-v7a] Clean: jpeg [armeabi-v7a] Clean: png [armeabi-v7a] Clean: stdc++ [armeabi-v7a] Clean: tealeaf [armeabi-v7a] Clean: v8a [armeabi-v7a] Clean: zip [armeabi-v7a] make[1]: Leaving directory /home/marlon/devkit/addons/native-android/TeaLeaf’
ant -f TeaLeaf/build.xml clean
[make] Buildfile: /home/marlon/devkit/addons/native-android/TeaLeaf/build.xml
[android] Error: Target id is not valid. Use ‘android list targets’ to get the target ids.
(android exited with code 1)
[android] [error] build failed creating android project
[android] [error] 1

The text was updated successfully, but these errors were encountered:

Источник

Installing Appium 1.4.13 via ./reset.sh Fails for Android — Getting Error Target id is not valid. Use ‘android list targets’ to get the target ids #5710

Comments

ghost commented Oct 11, 2015

Note: I can install successfully via npm install -g appium, but not with ./reset.sh from git clone.

Читайте также:  Аналоги дискорда для андроид

I’m trying to use one type of install to get both iOS and Android to work.

If I install appium via cloning Git using ./reset.sh , I have issue with installing for Android and it gives error when running iOS Simulators, but runs fine with a real iPhone Device.

If I install appium via npm, I have issue with it not installing SafariLauncher properly for real iOS device, gets error with iOS simulators, and getting an error with running on real Android device, but it runs fine with Android Simulators.

The text was updated successfully, but these errors were encountered:

imurchie commented Oct 12, 2015

This seems like a number of different issues. Let’s deal with reset.sh first.

What is the output of android list targets ? The reset script assumes API 19 is installed. If it it now, you can do so through the android application.

ghost commented Oct 12, 2015

Thanks for helping me. If I remember correctly, my android list targets has the latest two APIs 23 and 22 then I installed API 18 and API 16 reading somewhere awhile back installing these two APIs helped someone with the target issue. I didn’t install API 19 yet. I don’t have access to my mac now, when I get home I will install API 19 and try again.

The android list targets also list the Google APIs, but I didn’t create AVDs for the Google APIs. I only created AVDs for the regular non Google APIs (23, 22, 18, 16). Do I have to create AVDs for all targets even the Google APIs if I don’t plan to use those still?

Thank you so much for helping me.

imurchie commented Oct 12, 2015

No, no need to have AVDs for any particular API level. The reset script, however, rebuilds Appium’s test case application, and does so with API 19.

ghost commented Oct 12, 2015

Let me try installing API 19 tonight and rerunning ./reset.sh. I will update you by tomorrow morning.
I was stuck for awhile on this.Thank you for your help.

ghost commented Oct 13, 2015

Yep installing API 19 allowed me to pass the target id error.
But now I’m stuck on a new error. It says mvn: command not found and Selendroid server and cordova cannot be installed.
I went ahead and installed maven, then reran $ ./reset.sh —real-safari —code-sign ‘code signing identity’ —profile ‘retrieved profile identity code’ —verbose.
But it still gives me the same error.
How should I fix this new error?
Thanks for your help.

imurchie commented Oct 13, 2015

Do you have everything installed? Try running ./bin/appium-doctor.js to see if there is anything missing that that tool catches.

You installed Maven. Did you add it to your path, so that mvn works?

Further, to bypass Selendroid building, and use a pre-built version downloaded from the internet, run reset.sh with the —selendroid-quick command line argument.

ghost commented Oct 13, 2015

I setup Maven and its path with the following instructions.
1. Go to the apache maven website and download the latest stable binary file which is Maven 3.3.3
2. Extract the zip or the tar ball and copy the entire folder to the /usr/local/apache-maven directory.
3. Please create the apache-maven folder under /usr/local directory. So, the final path will look
something like this : /usr/local/apache-maven/apache-maven-3.3.3
4. Now, open the terminal and go to the above location by typing the following command:
cd /usr/local/apache-maven/apache-maven-3.3.3
5. Now run the following commands in a sequential order:
$export M2_HOME=/usr/local/apache-maven/apache-maven-3.3.3
$export M2=$M2_HOME/bin
$export PATH=$M2:$PATH

Читайте также:  Android debug keystore android studio

I haven’t run appium-doctor yet since the install didn’t complete and stopped halfway after the error appeared. I can run appium-doctor and update you on the results.

So I should rerun the following command without uninstalling first?
$ ./reset.sh —selendroid-quick —real-safari —code-sign ‘code signing identity’ —profile ‘retrieved
profile identity code’ —verbose

ghost commented Oct 13, 2015

I see someone posted a solution for a selendroid issue using
export MAVEN_OPTS=»-Xms1024m -Xmx2048m -Xss2048k»
Do you think this will work for me?

I found it from here.
./reset.sh fails on RESETTING SELENDROID
#4096

imurchie commented Oct 13, 2015

That might work. But I’m concerned that your log says

which means that something is wrong in the path. Can you, from the command line, run mvn ?

ghost commented Oct 13, 2015

Do I type mvn or mvn –version in the terminal? How do I run maven?

imurchie commented Oct 13, 2015

mvn will be enough to tell if it is available.

ghost commented Oct 13, 2015

Ok. I will update you by tomorrow morning.
I don’t have access to my mac. When I get home, I will run mvn.
Thank you so much.

imurchie commented Oct 13, 2015

You’re welcome. Sorry for the slow start. 🙁

ghost commented Oct 13, 2015

I’m so glad you are helping me. People weren’t responding to me on the forum and I was stuck for awhile. Thank you so much for your kindness.

ghost commented Oct 14, 2015

I realized I didn’t set up the path correctly. I didn’t use bash so it didn’t save the path. So I redid it.

    Set the Maven System Variable
    Open the terminal
    Type touch

/.bash_profile
Type open

/.bash_profile The system will open the bash_profile doc
export PATH=/usr/local/apache-maven/apache-maven-3.3.3/bin:$PATH

  • Save the doc. Close and open new terminal. Type mvn —version. Type mvn. It runs.
  • ghost commented Oct 14, 2015

    But now I get a new error.

    • Clearing out any old modified server apks
    • Cloning/updating selendroid
    • Building selendroid server and supporting libraries
    • Running «buildSelendroidServer» task
    • Getting Selendroid version
    • Selendroid version is 0.15.0
    • Installing Cordova
    • Building selendroid server
    • Unable to build selendroid server. Stdout was:

    [INFO] Scanning for projects.
    Downloading: https://repo.maven.apache.org/maven2/com/simpligility/maven/plugins/android-maven-plugin/4.1.1/android-maven-plugin-4.1.1.pom
    .
    .
    [INFO] Building jar: /Users/mac/appium/submodules/selendroid/android-driver/target/android-driver-app-0.15.0.jar
    [INFO]
    [INFO] — android-maven-plugin:4.1.1:apk (default-apk) @ android-driver-app —

    [INFO] Generating debug apk.

    [INFO] /Users/mac/appium/submodules/selendroid/android-driver/res/drawable-mdpi/icon.png: libpng * warning: iCCP: Not recognizing known sRGB profile that has been edited

    [INFO] /Users/mac/appium/submodules/selendroid/android-driver/res/drawable-hdpi/icon.png: libpng * warning: iCCP: Not recognizing known sRGB profile that has been edited

    [INFO] Warning: AndroidManifest.xml already defines debuggable (in * * http://schemas.android.com/apk/res/android); using existing value in manifest.

    [INFO] Adding native libraries : [/Users/mac/appium/submodules/selendroid/androiddriver/target/ndk-libs]
    [INFO]

    [INFO] Building selendroid-server-common 0.15.0

    .
    .
    Aborted due to warnings.

    ghost commented Oct 14, 2015

    When I reran with —selendroid-quick, I get this error

    Читайте также:  Сброс андроида до заводских настроек планшет самсунг

    [INFO] — android-maven-plugin:4.1.1:manifest-update (update-manifest) @ selendroid-server —
    [INFO] Attempting to update manifest /Users/mac/appium/submodules/selendroid/selendroid-server/target/AndroidManifest.xml
    [INFO] Testing if node application is application
    [INFO] No changes found to write to manifest file
    [INFO]
    [INFO] — maven-compiler-plugin:3.2:compile (default-compile) @ selendroid-server —
    [INFO] Changes detected — recompiling the module!
    [INFO] Compiling 182 source files to /Users/mac/appium/submodules/selendroid/selendroid-server/target/classes
    [INFO] ————————————————————-
    [ERROR] COMPILATION ERROR :
    [INFO] ————————————————————-
    [ERROR] An unknown compilation problem occurred
    [INFO] 1 error
    [INFO] ————————————————————-
    [INFO] ————————————————————————
    [INFO] Reactor Summary:
    [INFO]
    [INFO] selendroid . SUCCESS [ 0.046 s]
    [INFO] android-driver-app . SUCCESS [ 2.932 s]
    [INFO] selendroid-server-common . SUCCESS [ 0.944 s]
    [INFO] selendroid-server . FAILURE [ 1.846 s]
    [INFO] selendroid-grid-plugin . SKIPPED
    [INFO] selendroid-common . SKIPPED
    [INFO] selendroid-standalone . SKIPPED
    [INFO] selendroid-client . SKIPPED
    [INFO] selendroid-test-app . SKIPPED
    [INFO] ————————————————————————
    [INFO] BUILD FAILURE
    [INFO] ————————————————————————
    [INFO] Total time: 7.663 s
    [INFO] Finished at: 2015-10-13T19:16:01-07:00
    [INFO] Final Memory: 32M/292M
    [INFO] ————————————————————————
    [ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.2:compile (default-compile) on project selendroid-server: Compilation failure
    [ERROR] An unknown compilation problem occurred
    [ERROR] -> [Help 1]
    [ERROR]
    [ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
    [ERROR] Re-run Maven using the -X switch to enable full debug logging.
    [ERROR]
    [ERROR] For more information about the errors and possible solutions, please read the following articles:
    [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException
    [ERROR]
    [ERROR] After correcting the problems, you can resume the build with the command
    [ERROR] mvn -rf :selendroid-server

    ghost commented Oct 14, 2015

    I also ran appium doctor and it passed all checks.

    ghost commented Oct 14, 2015

    Should I reclone from git to get more recent code?
    Thanks.

    vikramvi commented Feb 2, 2016

    @imurchie the problem still exists please find below error log

    I pulled latest changed from appium repo and ran below command

    ( ./bin/appium-doctor.js had passed fully )

    ./reset.sh —selendroid-quick —verbose

    • Determining platform
    • Platform is mac
      —- Resetting / Initializing Appium —-
      RESETTING NPM
    • Installing new or updated NPM modules (including devDeps)
      npm WARN deprecated socks@0.0.1: This package has been discontinued. socks-client will be taking its place.
      npm WARN deprecated lodash@1.0.2: lodash@ = 2.1.2

    vikramvi commented Feb 2, 2016

    One doubt still remains what exactly is this reset.sh and why one needs to run it ?
    Does it needs to be run after each git pull from master ?

    Thanks in advance.

    imurchie commented Feb 2, 2016

    The reset script is used to build all the apps and necessary things in order to run Appium. It is necessary for running from source on Appium 1.4. 1.5 does not need it (using npm install instead).

    vikramvi commented Feb 2, 2016

    Thanks for quick clarification , you can please close this ticket as resolved. @imurchie

    imurchie commented Feb 2, 2016

    You’re welcome. I’m happy to help.

    lock bot commented Apr 30, 2019

    This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

    You can’t perform that action at this time.

    You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.

    Источник

    Оцените статью