1. Download our Official Android App: Forums for Android!

Apps Upgrade from Android Studio 1.5.1 to 2.1.1 FAILED repeatedly!

Discussion in 'Android Development' started by ac4android, May 19, 2016.

  1. ac4android

    ac4android Well-Known Member
    Thread Starter
    Rank:
    None
    Points:
    53
    Posts:
    198
    Joined:
    Nov 3, 2015

    Nov 3, 2015
    198
    29
    53
    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 (Text):
    1.  
    2. apply plugin: 'com.android.application'
    3.  
    4. android {
    5.     compileSdkVersion 23
    6.     buildToolsVersion "23.0.2"
    7.     defaultConfig {
    8.         applicationId "com.hfad.beeradviser"
    9.         minSdkVersion 17
    10.         targetSdkVersion 23
    11.         versionCode 1
    12.         versionName "1.0"
    13.     }
    14.     buildTypes {
    15.         release {
    16.             minifyEnabled false
    17.             proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
    18.         }
    19.     }
    20.     productFlavors {
    21.     }
    22. }
    23.  
    24. dependencies {
    25.     compile fileTree(dir: 'libs', include: ['*.jar'])
    26.     testCompile 'junit:junit:4.12'
    27.     compile 'com.android.support:appcompat-v7:23.1.1'
    28.     compile 'com.android.support:design:23.1.1'
    29. }
    30.  
    I am deleting 2.1.1 and dropping back to 1.5.1, at least I know everything works well the old version.
     

    Advertisement

  2. ac4android

    ac4android Well-Known Member
    Thread Starter
    Rank:
    None
    Points:
    53
    Posts:
    198
    Joined:
    Nov 3, 2015

    Nov 3, 2015
    198
    29
    53
    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"
     
    scary alien likes this.
  3. scary alien

    scary alien not really so scary
    Moderator
    Rank:
     #8
    Points:
    2,138
    Posts:
    22,298
    Joined:
    Mar 5, 2010

    Mar 5, 2010
    22,298
    23,695
    2,138
    Male
    space alien ;)
    Indy
    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!
     
  4. LV426

    LV426 I say we take off and nuke this place from orbit
    Moderator
    Rank:
     #11
    Points:
    1,988
    Posts:
    7,889
    Joined:
    Oct 16, 2015

    Oct 16, 2015
    7,889
    11,554
    1,988
    Male
    Software developer
    South West of England
    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?
     
  5. ac4android

    ac4android Well-Known Member
    Thread Starter
    Rank:
    None
    Points:
    53
    Posts:
    198
    Joined:
    Nov 3, 2015

    Nov 3, 2015
    198
    29
    53
    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.
     

Share This Page

Loading...