我一直在使用Android studio 2.1.3开发一个Android应用程序。最近我将Android Studio更新为2.2.3。现在我的应用程序给app:compilieDebugJavaWithJavac错误。 这是截图 我的jdk位置 我找到的唯一区别是在旧版本中我使用了默认的jdk。现在使用推荐的。如何解决此编译器错误。 我试过清理和其他东西。但没用 整个日志
My Log OutPut
Configuration on demand is an incubating feature.
Incremental java compilation is an incubating feature.
:app:clean
:app:buildInfoDebugLoader
:app:preBuild UP-TO-DATE
:app:preDebugBuild UP-TO-DATE
:app:checkDebugManifest
:app:prepareComAndroidSupportAppcompatV72311Library
:app:prepareComAndroidSupportCardviewV72330Library
:app:prepareComAndroidSupportDesign2311Library
:app:prepareComAndroidSupportPaletteV72501Library
:app:prepareComAndroidSupportRecyclerviewV72501Library
:app:prepareComAndroidSupportSupportCompat2501Library
:app:prepareComAndroidSupportSupportCoreUi2501Library
:app:prepareComAndroidSupportSupportCoreUtils2501Library
:app:prepareComAndroidSupportSupportV42311Library
:app:prepareComMcxiaokeVolleyLibraryAar100Library
:app:prepareComPaypalSdkPaypalAndroidSdk2131Library
:app:prepareIoCardAndroidSdk530Library
:app:prepareDebugDependencies
:app:compileDebugAidl
:app:compileDebugRenderscript
:app:generateDebugBuildConfig
:app:generateDebugResValues
:app:generateDebugResources
:app:mergeDebugResources
:app:processDebugManifest
:app:processDebugResources
:app:generateDebugSources
:app:mockableAndroidJar UP-TO-DATE
:app:preDebugUnitTestBuild UP-TO-DATE
:app:prepareDebugUnitTestDependencies
:app:preDebugAndroidTestBuild UP-TO-DATE
:app:prepareDebugAndroidTestDependencies
:app:compileDebugAndroidTestAidl
:app:processDebugAndroidTestManifest
:app:compileDebugAndroidTestRenderscript
:app:generateDebugAndroidTestBuildConfig
:app:generateDebugAndroidTestResValues
:app:generateDebugAndroidTestResources
:app:mergeDebugAndroidTestResources
:app:processDebugAndroidTestResources
:app:generateDebugAndroidTestSources
:app:incrementalDebugJavaCompilationSafeguard
:app:compileDebugJavaWithJavac
:app:compileDebugJavaWithJavac - is not incremental (e.g. outputs have changed, no previous execution, etc.).
\Services\MusicService.java:454: error: cannot find symbol
musicPlayerNotificationbuilder.setCustomBigContentView(remoteViews);
^
symbol: method setCustomBigContentView(RemoteViews)
location: variable musicPlayerNotificationbuilder of type Builder
\Services\MusicService.java:472: error: cannot find symbol
musicPlayerNotificationbuilder.setCustomBigContentView(remoteViews);
^
symbol: method setCustomBigContentView(RemoteViews)
location: variable musicPlayerNotificationbuilder of type Builder
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Note: Some input files use unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
2 errors
:app:compileDebugJavaWithJavac FAILED
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':app:compileDebugJavaWithJavac'.
> Compilation failed; see the compiler error output for details.
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
BUILD FAILED
Total time: 5.754 secs
build.gradle文件
apply plugin: 'com.android.application'
android {
compileSdkVersion 23
buildToolsVersion "23.0.2"
useLibrary 'org.apache.http.legacy'
defaultConfig {
minSdkVersion 14
targetSdkVersion 23
versionCode 17
versionName "2.0.5"
signingConfig signingConfigs.config
ndk {
moduleName = "moduleName"
}
}
sourceSets {
main {
jniLibs.srcDir 'jniLibs'
}
}
productFlavors {
}
}
dependencies {
compile fileTree(include: ['*.jar'], dir: 'libs')
compile 'com.android.support:recyclerview-v7:+'
compile 'com.android.support:palette-v7:+'
compile 'com.parse.bolts:bolts-android:1.+'
compile 'com.parse:parse-android:1.+'
compile 'com.android.support:appcompat-v7:23.1.1'
compile 'com.android.support:design:23.1.1'
compile 'com.android.support:cardview-v7:23.1.1'
compile 'com.mcxiaoke.volley:library-aar:1.0.0'
compile 'com.paypal.sdk:paypal-android-sdk:2.13.1'
// CardView
compile 'com.android.support:cardview-v7:23.3.+'
// RecyclerView
compile 'com.android.support:recyclerview-v7:23.3.+'
}
答案 0 :(得分:1)
我的意思是,您可以尝试将以下代码放在
下的build.gradle中android {
compileSdkVersion 24
buildToolsVersion "23.0.3"
所以看起来应该是这样的:
android {
compileSdkVersion 24
buildToolsVersion "23.0.3"
至少这对我有用,不确定它是否会对你有所帮助。我自己就是这方面的先发制人。
答案 1 :(得分:0)
我刚将build.gradle文件中的所有内容更改为最新的构建工具。它对我有用
apply plugin: 'com.android.application'
android {
compileSdkVersion 25
buildToolsVersion "25.0.1"
useLibrary 'org.apache.http.legacy'
defaultConfig {
minSdkVersion 14
targetSdkVersion 25
versionCode 17
versionName "2.0.5"
signingConfig signingConfigs.config
ndk {
moduleName = "moduleName"
}
}
buildTypes {
}
sourceSets {
main {
jniLibs.srcDir 'jniLibs'
}
}
productFlavors {
}
}
dependencies {
compile fileTree(include: ['*.jar'], dir: 'libs')
//pallette
compile 'com.android.support:palette-v7:25.0.1'
//parse
compile 'com.parse.bolts:bolts-android:1.+'
compile 'com.parse:parse-android:1.+'
//appcompat
compile 'com.android.support:appcompat-v7:25.0.1'
//design
compile 'com.android.support:design:25.0.1'
//volley
compile 'com.mcxiaoke.volley:library-aar:1.0.0'
//paypal
compile 'com.paypal.sdk:paypal-android-sdk:2.13.1'
// CardView
compile 'com.android.support:cardview-v7:25.0.1'
// RecyclerView
compile 'com.android.support:recyclerview-v7:25.0.1'
}