初用Android studio出现的问题
来源:互联网 发布:怎样用java做网站 编辑:程序博客网 时间:2024/05/16 01:47
android studio安装后第一次打开卡在fetching Android sdk compoment information
解决办法:
找到android studio 安装目录下bin目录中(D:\Android\Android Studio\bin)的idea.properties文件
,在文件末尾处添加disable.android.first.run=true
然后再打开android studio就不会再去fetch了 ,再手动设置android sdk目录。下次打开android
studio就不会再出现了
环境变量中注意两个jdk的冲突
1. If you see a message saying 'The path ... does not refer to an Android SDK. Android
Studio will use its default SDK instead,' click OK.
2. If you see a message saying 'Failed to find Build Tools revision 21.1.2', open your
build.gradle file and replace this line with the version in Android Studio (Check your
build tools version in the SDK Manager)
buildToolsVersion "21.1.2"
3. If you see a message saying 'Failed to sync the Gradle project .... Fix plugin version
and re-import project,' simply click the link to agree.
4. If you see a warning that says 'Language level changes will take effect on project
reload. Would you like to reload project ... now?', click Yes.
//错误信息
1.Error:A problem occurred configuring project ':app'.
> Could not resolve all dependencies for configuration ':app:_debugCompile'.
> Could not find any version that matches com.android.support:appcompat-v7:22.+.
Searched in the following locations:
https://jcenter.bintray.com/com/android/support/appcompat-v7/maven-metadata.xml
https://jcenter.bintray.com/com/android/support/appcompat-v7/
file:/D:/Android/sdk/extras/android/m2repository/com/android/support/appcompat-
v7/maven-metadata.xml
file:/D:/Android/sdk/extras/google/m2repository/com/android/support/appcompat-
v7/maven-metadata.xml
file:/D:/Android/sdk/extras/google/m2repository/com/android/support/appcompat-v7/
Required by:
MyApplication:app:unspecified
2.Error:Failed to find: com.android.support:appcompat-v7:22.+
<a href="openFile">Open File</a><br><a href="open.dependency.in.project.structure">Open in
Project Structure dialog</a>
//解决方法
//app 的build.gradle里代码如下
apply plugin: 'com.android.application'
android {
compileSdkVersion 21
buildToolsVersion '21.1.2'
///要和SDK Manager里的buildToolsVersion一致
defaultConfig {
applicationId "com.example.dongzhe.zlqhapp"
minSdkVersion 15
targetSdkVersion 21
versionCode 1
versionName "1.0"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-
rules.pro'
}
}
packagingOptions {
exclude 'META-INF/LICENSE'
exclude 'META-INF/NOTICE'
exclude 'META-INF/LICENSE.txt'
exclude 'META-INF/NOTICE.txt'
}
productFlavors {
}
}
dependencies {
compile fileTree(include: ['*.jar'], dir: 'libs')
compile files('libs/commons-logging-1.1.1.jar')
compile files('libs/commons-codec-1.10.jar')
compile 'com.android.support:appcompat-v7:21.0.3'
///要和sdk/extras/android/m2repository/com/android/support/appcompat-v7中的版本一致
}
- 初用Android studio出现的问题
- Android studio出现问题
- android studio使用出现的问题
- Android studio安装出现的问题
- Android studio导入项目(出现的问题)
- android studio中出现的问题
- android studio使用出现的问题汇总
- Android Studio 打包混淆出现的问题
- Android Studio使用shape出现的问题
- 使用Android studio 出现的一些问题
- Android Studio启动模拟器出现的问题
- android studio安装过程出现的问题
- Android studio使用中出现的问题
- Android Studio安装中出现的问题
- Android Studio安装时出现的问题
- android studio安装中出现的问题
- Android Studio更换JDK出现的问题
- 设置Android studio出现的问题
- 欢迎使用CSDN-markdown编辑器
- iOS/mac开发的一些知名个人博客
- lua string.dump
- Tomcat 安全配置与性能优化 http://netkiller.github.io/journal/tomcat.html
- hive job oom问题
- 初用Android studio出现的问题
- IOS NSURL基本操作
- Android实现通过浏览器点击链接打开本地应用(APP)并拿到浏览器传递的数据
- 自用广告过滤规则,整合xwhyc大大的,很小才79K
- Movie recommendation based on collaborative filtering method
- 小金登陆游戏
- Android 中LruCache 原理与编程
- CSS 伪类、伪元素、选择器的使用
- spio从模式