• After 15+ years, we've made a big change: Android Forums is now Early Bird Club. Learn more here.

Apps Upgrade from Android Studio 1.5.1 to 2.1.1 FAILED repeatedly!

ac4android

Well-Known Member
Hi.

U[grading to 2.1.1 is a pretty long-winded process. It appears to have installed successfully but when I try to import an old test, it crashed with following message:

Error(1,0) Cause: com/android/build/gradle/AppPlugin : Unsupported major.minor version 52.0

It seems to be complaining about the old build.gradle:
Code:
apply plugin: 'com.android.application'

android {
    compileSdkVersion 23
    buildToolsVersion "23.0.2"
    defaultConfig {
        applicationId "com.hfad.beeradviser"
        minSdkVersion 17
        targetSdkVersion 23
        versionCode 1
        versionName "1.0"
    }
    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }
    productFlavors {
    }
}

dependencies {
    compile fileTree(dir: 'libs', include: ['*.jar'])
    testCompile 'junit:junit:4.12'
    compile 'com.android.support:appcompat-v7:23.1.1'
    compile 'com.android.support:design:23.1.1'
}

I am deleting 2.1.1 and dropping back to 1.5.1, at least I know everything works well the old version.
 
Hi.

U[grading to 2.1.1 is a pretty long-winded process. It appears to have installed successfully but when I try to import an old test, it crashed with following message:

Error(1,0) Cause: com/android/build/gradle/AppPlugin : Unsupported major.minor version 52.0

It seems to be complaining about the old build.gradle:
Code:
apply plugin: 'com.android.application'

android {
    compileSdkVersion 23
    buildToolsVersion "23.0.2"
    defaultConfig {
        applicationId "com.hfad.beeradviser"
        minSdkVersion 17
        targetSdkVersion 23
        versionCode 1
        versionName "1.0"
    }
    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }
    productFlavors {
    }
}

dependencies {
    compile fileTree(dir: 'libs', include: ['*.jar'])
    testCompile 'junit:junit:4.12'
    compile 'com.android.support:appcompat-v7:23.1.1'
    compile 'com.android.support:design:23.1.1'
}

I am deleting 2.1.1 and dropping back to 1.5.1, at least I know everything works well the old version.

HANG ON, wait...

Apparently one has to manually toggle the project to point to the new sdk, it doesn't do that automagically.
I did the following and it works now:
  • File->Other Settings->Default Project Structure->SDKs , then point it to SDK1.8
  • Change buildToolsVersion "23.0.2" to buildToolsVersion "23.0.3"
 
Hey @ac4android :).

FYI, I updated your thread title to include "Android Studio" since I'm guessing you don't mean upgrading from 1.5.x of the Android O/S to 2.1.x which I remember doing on my HTC Droid Eris back in early 2010 ;) :p :D.

Your thread title certainly caught my attention, but it wasn't what I originally thought it was :).

Cheers!
 
I always found the Android Studio update process to be pretty smooth. It informs you there's a new version available, do you want to upgrade to it? If you do then it downloads everything and restarts.
How did you install 2.1.1?
 
I always found the Android Studio update process to be pretty smooth. It informs you there's a new version available, do you want to upgrade to it? If you do then it downloads everything and restarts.
How did you install 2.1.1?

I wanted to run 1.5.1 and 2.1.1 in parallel, also, I wanted to have the installation files in archive because I have to standardize on a version of everything just about now. So I simply downloaded the full monty and installed it alongside 1.5

That required following:
SDK1.7 -> SDK1.8 (also the JRE) ... youwould need different versions because of legacies.
Update Intel HAXM
Fiddling with Window's CLASSPATH
some other chore e.g. fiddling with directories

In the end, everything turns out fine, and I can delete 1.5, but will be keeping 1.5.2 in archive.

Yes, it's worth the effort.
 
Back
Top Bottom