안드로이드 hierarchyview 없을때...

Posted by 빵빵빵
2010/11/05 15:51 전산(컴퓨터)/안드로이드



윈도우에서 작업을 하는데요...

시작하세요! 안드로이드 프로그래밍 이라는 책을 가지고 공부를 하고 있는데...

책에는 hierarchyviewer를 쓸수 있다고 합니다.

하지만... SDK의 tools 디렉토리에 가면 hierarchyviewer.bat 파일이 없더군요. 헉...

sdk 버전은

사용자 삽입 이미지

흠....

tools\lib 디렉토리에 hierachyviewer.jar 파일은 있길레

걍.. 인터넷에서 주워다 배치 파일 만들었습니다.


다음은 배치 파일 내용입니다.
=====================================================
@echo off
rem Copyright (C) 2008 The Android Open Source Project
rem
rem Licensed under the Apache License, Version 2.0 (the "License");
rem you may not use this file except in compliance with the License.
rem You may obtain a copy of the License at
rem
rem      http://www.apache.org/licenses/LICENSE-2.0
rem
rem Unless required by applicable law or agreed to in writing, software
rem distributed under the License is distributed on an "AS IS" BASIS,
rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
rem See the License for the specific language governing permissions and
rem limitations under the License.


rem don't modify the caller's environment
setlocal


rem Set up prog to be the path of this script, including following symlinks,
rem and set up progdir to be the fully-qualified pathname of its directory.
set prog=%~f0


rem Change current directory and drive to where the script is, to avoid
rem issues with directories containing whitespaces.
cd /d %~dp0


set jarfile=hierarchyviewer.jar
set frameworkdir= .\
set libdir= .\lib


if exist %frameworkdir%%jarfile% goto JarFileOk
    set frameworkdir=lib\


if exist %frameworkdir%%jarfile% goto JarFileOk
    set frameworkdir=..\framework\


:JarFileOk


set jarpath=%frameworkdir%%jarfile%


call java -Xmx512m -Djava.ext.dirs=%frameworkdir% -Dhierarchyviewer.adb= -jar %jarpath% %*


=====================================================


사용시에는

set frameworkdir= .\
set libdir= .\lib

내용을 적절히 바꿔주셔야 하는데... 제가 인터넷에서 찾을때는 둘다 아무런 값이 없었습니다. ㅡㅡ;

저는 어차피 tools 디렉토리에서 실행할꺼라 위와 같이 만들어 줬습니다.

저랑 똑같이 실행하실 분들은 그냥 될것이고... 이클립스에서 실행해주는게 있나 모르겠는데... 저도 초짜라...

그렇다면 어쩜 안될 수도 있습니다.

이건 실행한 화면입니다.





2010/11/05 15:51 2010/11/05 15:51

이 글에는 트랙백을 보낼 수 없습니다