2016-12-07 248 views
1

我一直在開發Android Studio 2.1.3的一個Android應用程序。最近我更新了Android Studio到2.2.3。現在我的應用程序給出的應用程序:compilieDebugJavaWithJavac錯誤。 下面是截圖 enter image description here 我的JDK位置 enter image description here 我發現的唯一的區別是在舊版本我已經使用默認的JDK。現在使用推薦的一個。如何解決此編譯器錯誤。 我試過清理,和其他的東西。但沒用。 全日誌 enter image description here編譯失敗的應用程序:compilieDebugJavaWithJavac

我的日誌輸出

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

你可以發佈整個錯誤日誌? – Raghavendra

+0

你有看到編譯器錯誤輸出嗎? –

+0

爲什麼只發布截圖?你能複製並粘貼完整的錯誤嗎? – Raghavendra

回答

1

我的意思是,你可以嘗試把在的build.gradle下面的代碼下

機器人{

compileSdkVersion 24 
    buildToolsVersion "23.0.3" 

因此,它應該是這樣的:

android { 
    compileSdkVersion 24 
    buildToolsVersion "23.0.3" 

在爲我的作品至少,不知道這是否會幫助你。我自己是這方面的先鋒。

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' 
    }