1. 程式人生 > >android -- Error:Cause: com/android/build/gradle/internal/model/DefaultAndroidProject : Unsupported

android -- Error:Cause: com/android/build/gradle/internal/model/DefaultAndroidProject : Unsupported

Android studio: gradle XXX project refresh failed
Error:Cause: com/android/build/gradle/internal/model/DefaultAndroidProject : Unsupported major.minor version 52.0

自己不是android的,但是時常打包android Apk,今天使用android studio 遇到了這個問題就記錄一下。

上面這個問題解決方案:
version 52.0對應的JDK版本是1.8的,開啟你的android studio,路徑:Android Studio.app -> Contents -> Info.plist,找到一下內容:

<key>JVMVersion</key>
<string>1.6*,1.6+</string>

根據上圖的配置Android Studio啟動時會將jdk的版本預設設定為1.6和1.7,改成以下內容即可。

<key>JVMVersion</key>
<string>1.7*,1.8+</string>

好的,問題解決。

相關推薦

android -- Error:Cause: com/android/build/gradle/internal/model/DefaultAndroidProject : Unsupported

Android studio: gradle XXX project refresh failed Error:Cause: com/android/build/gradle/internal/model/DefaultAndroidProject : Uns

打包錯誤Error converting bytecode to dex: Cause: com.android.dex.DexException: Multiple dex files define

昨天準備釋出一個版本,算好了時間,在解決完其他問題後預留兩個小時來上傳。在打包時遇見了問題,害的我加班三個小時。現記錄下問題,並整理下解決問題的思路。 打包出現問題時的截圖 圖片可能看不太清楚,錯誤如下: Error:Error converting bytecode to

Android開發專案中的build.gradle檔案介紹

在開發android專案中,我們通常會遇到兩個build.gradle檔案。如下圖所示: 一個用於整個專案,另一個用於app應用模組。應用於整個專案的內容很少,沒啥好解釋的,內容保持預設不變就行了。我們要了解和經常編輯的是app/build.grad

Android studio 修改 app的 build.gradle實現同一APP不同版本同時存在(同一APP安裝N次)

//執行lint檢查,有任何的錯誤或者警告提示,都會終止構建,我們可以將其關掉。 lintOptions { abortOnError false checkReleaseBuilds false // 防止在釋出的時候出現因MissingTranslat

Android Studio中Module的build.gradle詳解

Gradle版本 我們在進行採用AS進行安卓專案的開發時,就必須接觸gradle,它是目前最新潮的一個構建專案的一個系統,而google也與時俱進,用著最新的東西,順便說下,eclipse之前是用Ant來構建專案的,還有一個用的比較多的就是maven。而AS的

android studio編譯錯誤 之 Cause: com/android/builder/profile/Recorder$Property

Cause: com/android/builder/profile/Recorder$Property * 解決方法: 專案根目錄中: com.android.tools.build:gradle

Android開發者必看:build.gradle 配置指南

二、通用配置 在我們新建專案時,Android Studio 會自動為我們生成兩個build.gradle檔案,一個位於根目錄,一個位於app資料夾下,下面是gradle檔案的構成圖: MyApp ├── build.gradle └── app └── build.gradle 三、

Android dependency 'com.android.support:recyclerview-v7' has different version for the compile

Error:Execution failed for task ':app:preDebugBuild'. > Android dependency 'com.android.support:recyclerview-v7' has different version for the co

Android編譯出現com.android.dex.DexIndexOverflowException: method ID not in [0, 0xffff]: 65536錯誤解決辦法

踩過的坑, 以下操作,必須在app module中進行。 ========================================== ** Android編譯出現com.android.dex.DexIndexOverflowException: method ID not i

Android Error inflating class android.webkit.WebView

遇到的一個小坑,記錄一下1、問題原因,直接看下圖網上有資料說在manifest的Application下面新增<meta-data android:name="android.webkit.WebView.EnableSafeBrowsing" android:valu

com.android.build.gradle.tasks.ResourceException:Error: java.util.concurrent.ExecutionException:com.

事情的起因是,改版後,設計改了一個圖示,我放上去再打包就出現這個錯誤了,網上搜了好多,嘗試過修改 gradle.properties,新增 android.enableAapt2=false,但是無效。嘗試過修改 gradble 快取路徑(File -> Setting

解決:Error:Unable to find method 'com.android.build.gradle.api.BaseVariant.getOutputs()Ljava/util/List

解決新增Butterknife8.8.1依賴後出錯的問題 1.在根目錄下的build.gradle中的dependencies新增如下: 這裡注意是8.4.0的版本!! classpath 'com.jakewharton:butterknife-gradle-pl

Error:Could not download artifact 'com.android.tools.build:gradle:0.13.2:gradle.jar

這個錯誤是由於我們目前比較新的studio版本都把jcenter倉庫作為預設的library倉庫,但是呢標題這個異常表示的jar檔案不在我們的jcenter中,在另一個mavencenter倉庫中,所以

Android Studio Error:Could not find com.android.tools.build:gradle

一、今天更新Android Studio後開啟Project,報如下錯誤: Error: Could not find com.android.tools.build:gradle:2.2.1. Searched in the following

Android gradle error com.android.build.api.transform.transformexception java.lang.runtimeexception

com.android.build.api.transform.transformexception java.lang.runtimeexceptionslove:add:dexOptions {

整合butterknife出現 Error:Unable to find method 'com.android.build.gradle.api.BaseVariant.getOutputs()

錯誤為: Error:Unable to find method 'com.android.build.gradle.api.BaseVariant.getOutputs()Ljava/util/List;'. Possible causes for this unexpected erro

android studio 配置Kotlin報錯Error:Cause: org.gradle.api.internal.file.DefaultSourceDirectorySet.

Unable to find method 'org.gradle.api.internal.file.DefaultSourceDirectorySet。 Error:Cause: org.gradle.api.internal.file.DefaultSourceDirectorySet。

Android Studio下“Error:Could not find com.android.tools.build:gradle:2.2.1”的解決方法

今天更新Android Studio後開啟Project,報如下錯誤: Error:Could not find com.android.tools.build:gradle:2.2.1. Searched in the following locations:    fi

【AndroidStudio】Error:Could not find com.android.tools.build:gradle:2.3.3

Error:Could not find com.android.tools.build:gradle:2.3.3. Searched in the following locations: file:/D:/Software/AS3.0/gradle/m2repository/com/android/too