[英]Everything is breaking in Android Studio 0.8.1
I just updated Android Studio from 0.6.1 to 0.8.1 我刚刚将Android Studio从0.6.1更新为0.8.1
None of my code changed, but the new update breaks everything. 我的代码都没有改变,但新的更新破坏了一切。 It seems like the entire Android SDK is not loading properly.
似乎整个Android SDK都没有正确加载。 A given class ends up looking like this:
给定的类最终看起来像这样:
The project is question still uses the old ANT compilation system, but I have another project using Gradle and the same problem is happening. 项目问题仍然使用旧的ANT编译系统,但我有另一个使用Gradle的项目,同样的问题正在发生。 When I go back to my old install of 0.6.1 it works fine.
当我回到我原来安装的0.6.1时,它运行正常。
I checked the Project Structure to make sure the Project SDK was pointing to the right place and it is. 我检查了项目结构,以确保Project SDK指向正确的位置。
The gradle console returns no errors when syncing the project with gradle: 使用gradle同步项目时,gradle控制台不会返回错误:
Executing tasks: [:app:generateDebugSources, :wearable:generateDebugSources, :facebook:generateDebugSources]
Configuration on demand is an incubating feature.
Relying on packaging to define the extension of the main artifact has been deprecated and is scheduled to be removed in Gradle 2.0
:app:preBuild
:app:preDebugBuild
:app:checkDebugManifest
:app:preReleaseBuild
:facebook:compileLint
:facebook:copyReleaseLint UP-TO-DATE
:facebook:preBuild
:facebook:preReleaseBuild
:facebook:checkReleaseManifest
:facebook:preDebugBuild
:facebook:preDebugTestBuild
:facebook:prepareComAndroidSupportSupportV42000Library UP-TO-DATE
:facebook:prepareReleaseDependencies
:facebook:compileReleaseAidl UP-TO-DATE
:facebook:compileReleaseRenderscript UP-TO-DATE
:facebook:generateReleaseBuildConfig UP-TO-DATE
:facebook:generateReleaseAssets UP-TO-DATE
:facebook:mergeReleaseAssets UP-TO-DATE
:facebook:generateReleaseResValues UP-TO-DATE
:facebook:generateReleaseResources UP-TO-DATE
:facebook:mergeReleaseResources UP-TO-DATE
:facebook:processReleaseManifest UP-TO-DATE
:facebook:processReleaseResources UP-TO-DATE
:facebook:generateReleaseSources UP-TO-DATE
:facebook:compileReleaseJava UP-TO-DATE
:facebook:extractReleaseAnnotations UP-TO-DATE
:facebook:mergeReleaseProguardFiles UP-TO-DATE
:facebook:processReleaseJavaRes UP-TO-DATE
:facebook:packageReleaseJar UP-TO-DATE
:facebook:compileReleaseNdk UP-TO-DATE
:facebook:packageReleaseJniLibs UP-TO-DATE
:facebook:packageReleaseLocalJar UP-TO-DATE
:facebook:packageReleaseRenderscript UP-TO-DATE
:facebook:packageReleaseResources UP-TO-DATE
:facebook:bundleRelease UP-TO-DATE
:app:prepareBandsintownGimportFacebookUnspecifiedLibrary UP-TO-DATE
:app:prepareComAndroidSupportAppcompatV72000Library UP-TO-DATE
:app:prepareComAndroidSupportSupportV42000Library UP-TO-DATE
:app:prepareComGoogleAndroidGmsPlayServices5077Library UP-TO-DATE
:app:prepareComViewpagerindicatorLibrary241Library UP-TO-DATE
:app:prepareDebugDependencies
:app:compileDebugAidl UP-TO-DATE
:app:compileDebugRenderscript UP-TO-DATE
:app:generateDebugBuildConfig UP-TO-DATE
:app:generateDebugAssets UP-TO-DATE
:app:mergeDebugAssets UP-TO-DATE
:app:generateDebugResValues UP-TO-DATE
:app:generateDebugResources UP-TO-DATE
:app:mergeDebugResources UP-TO-DATE
:app:processDebugManifest UP-TO-DATE
:app:processDebugResources UP-TO-DATE
:app:generateDebugSources UP-TO-DATE
:wearable:preBuild
:wearable:preDebugBuild
:wearable:checkDebugManifest
:wearable:preReleaseBuild
:wearable:prepareComGoogleAndroidGmsPlayServices5077Library UP-TO-DATE
:wearable:prepareDebugDependencies
:wearable:compileDebugAidl UP-TO-DATE
:wearable:compileDebugRenderscript UP-TO-DATE
:wearable:generateDebugBuildConfig UP-TO-DATE
:wearable:generateDebugAssets UP-TO-DATE
:wearable:mergeDebugAssets UP-TO-DATE
:wearable:generateDebugResValues UP-TO-DATE
:wearable:generateDebugResources UP-TO-DATE
:wearable:mergeDebugResources UP-TO-DATE
:wearable:processDebugManifest UP-TO-DATE
:wearable:processDebugResources UP-TO-DATE
:wearable:generateDebugSources UP-TO-DATE
:facebook:checkDebugManifest
:facebook:prepareDebugDependencies
:facebook:compileDebugAidl UP-TO-DATE
:facebook:compileDebugRenderscript UP-TO-DATE
:facebook:generateDebugBuildConfig UP-TO-DATE
:facebook:generateDebugAssets UP-TO-DATE
:facebook:mergeDebugAssets UP-TO-DATE
:facebook:generateDebugResValues UP-TO-DATE
:facebook:generateDebugResources UP-TO-DATE
:facebook:mergeDebugResources UP-TO-DATE
:facebook:processDebugManifest UP-TO-DATE
:facebook:processDebugResources UP-TO-DATE
:facebook:generateDebugSources UP-TO-DATE
BUILD SUCCESSFUL
Total time: 4.053 secs
The Gradle classpath is com.android.tools.build:gradle:0.12.+
Gradle类路径是
com.android.tools.build:gradle:0.12.+
The build.gradle file from the project's app folder by request: 来自项目的app文件夹的build.gradle文件请求:
apply plugin: 'com.android.application'
android {
compileSdkVersion 20
buildToolsVersion '20'
defaultConfig {
applicationId 'com.bandsintown'
minSdkVersion 10
targetSdkVersion 20
versionCode 113
versionName '4.6.5'
}
buildTypes {
release {
debuggable false
runProguard false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
lintOptions {
checkReleaseBuilds false
}
}
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
compile 'com.android.support:appcompat-v7:20.+'
compile 'com.nineoldandroids:library:2.4.+'
compile 'com.viewpagerindicator:library:2.4.1@aar'
compile 'com.google.android.gms:play-services:5.+'
compile project(':facebook')
}
Actually, I noticed that the first line of this was wrong when copying this. 实际上,我注意到复制它时,第一行是错误的。 It used to be
apply plugin: 'android'
but that has been changed for this new version of Gradle to instead be what you see there with com.android.application
. 它曾经是
apply plugin: 'android'
但是已经为这个新版本的Gradle改变了,而不是你在com.android.application
看到的那个。 However, changing this line still gives me the same problem. 但是,更改此行仍然会给我带来同样的问题。
Any ideas? 有任何想法吗?
I had a similar problem when upgrading from 0.6.1 to 0.8.0 Unfortunately I'm not 100% sure how I solved it, but I think following saved me: 当我从0.6.1升级到0.8.0时,我遇到了类似的问题。不幸的是,我不是100%确定我是如何解决它的,但我认为以下保存了我:
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.ibma.ibmaapp"
android:versionCode="2"
android:versionName="1.0">
<uses-sdk
android:minSdkVersion="19"
android:targetSdkVersion="19"
android:maxSdkVersion="19" />
...
</manifest>
check again, maybe repeat step 2 再次检查,也许重复第2步
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.