Android——基于Eclipse EE搭建Android Studio开发环境

搭建环境步骤

基于Eclipse的Android开发环境搭建

在搭建环境过程中,碰到了一些问题,如下。

打开SDK Manager时控制台报错

DDMS files not found: D:\software\sdk\tools\traceview.bat

sdk\tools目录下的traceview.bat无法找到。在网上查找资料后,都说需要下载traceview.bat文件,然后这个优快云上又需要大量积分下载。因此找到了一种不需要积分就解决的方法。

http://openstorage.gunadarma.ac.id/android/sdk/sdk_310712/tools/traceview.bat

如果你无法打开这个链接的话,复制下面的内容即可。

@echo off
rem Copyright (C) 2007 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

rem Check we have a valid Java.exe in the path.
set java_exe=
call lib\find_java.bat
if not defined java_exe goto :EOF

set jarfile=traceview.jar
set frameworkdir=

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

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

:JarFileOk

set jarpath=%frameworkdir%%jarfile%

if not defined ANDROID_SWT goto QueryArch
    set swt_path=%ANDROID_SWT%
    goto SwtDone

:QueryArch

    for /f %%a in ('%java_exe% -jar %frameworkdir%archquery.jar') do set swt_path=%frameworkdir%%%a

:SwtDone

if exist %swt_path% goto SetPath
    echo SWT folder '%swt_path%' does not exist.
    echo Please set ANDROID_SWT to point to the folder containing swt.jar for your platform.
    exit /B

:SetPath
set javaextdirs=%swt_path%;%frameworkdir%

call %java_exe% -Djava.ext.dirs=%javaextdirs% -Dcom.android.traceview.toolsdir= -jar %jarpath% %*

打开这个链接,复制全部内容存在名为traceview.bat文件中,移动到sdk下的tools目录下。 重启后也许就会成功,可以打开SDK Manager了

但是我依然没能打开,这次控制台没有任何报错,但是SDK Manager也没有反应。

参考博客:SDK manager打不开解决办法

我的JDK和JRE没有问题,所以直接去http://tools.android-studio.org/index.php/sdk下载SDK更换。

下载推荐的这个SDK:

双击安装后,Eclipse成功打开SDK Manager。

 

参考资料:

基于Eclipse的Android开发环境搭建

SDK manager打不开解决办法

 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值