我剛剛更新的Android Studio從0.6.1到0.8.1一切都在Android Studio 0.8.1
我的代碼沒有改變,但新的更新打破了一切。好像整個Android SDK沒有正確加載。一個給定的類最終看起來像這樣:
該項目仍然問題使用舊ANT編譯系統,但我一直在使用搖籃和同樣的問題發生了另一個項目。當我回到0.6.1的舊版本時,它工作正常。
我檢查了項目結構,以確保項目SDK指向正確的地方,它是。
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
的搖籃類路徑是com.android.tools.build:gradle:0.12.+
從項目的應用程序文件夾中的文件的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:[email protected]'
compile 'com.google.android.gms:play-services:5.+'
compile project(':facebook')
}
與同步的gradle項目時
的gradle這個控制檯沒有返回錯誤
其實我注意到複製這個時第一行是錯誤的。它曾經是apply plugin: 'android'
,但是這個新版本的Gradle已經改變了,而不是你在com.android.application
看到的那個。但是,改變這條線仍然會給我帶來同樣的問題。
任何想法?
您能否提供更多信息?錯誤訊息?它是否構建並運行? –
試圖運行項目導致出現「包android.view/widget/etc不存在」的錯誤 由於某些原因,儘管所有配置都正確,但至少在以前的Android Studio版本中,它只是無法識別Android。 – JMRboosties
我對基於Ant的項目一無所知,但對於基於Gradle的項目,將項目同步到Gradle文件時出現的任何錯誤都會提供信息。 –