Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-18960] Android: Enable building with android M preview

GitHub Issuen/a
TypeBug
PriorityHigh
StatusClosed
ResolutionFixed
Resolution Date2015-08-21T21:18:25.000+0000
Affected Version/sn/a
Fix Version/sRelease 5.0.0
ComponentsAndroid
Labelsqe-4.0.1
ReporterLokesh Choudhary
AssigneeChris Barber
Created2015-05-29T00:41:39.000+0000
Updated2015-09-03T00:54:04.000+0000

Description

Description:

1. The android M preview SDK is now out. 2. This new SDK is also marked as API 22. 3. While building its unclear if we are building with android M or android 5.1.1 as both are API22. 4. Removing android 5.1.1 & building fails with error:
To target Android SDK 22, you first must install it using the Android SDK manager.
Alternatively, you can set the <uses-sdk> in the <android> <manifest> section of the tiapp.xml to
one of the following installed Android target SDKs: 15, 16, 17, 18, 19, 20, 21
[ERROR] :  Target Android SDK 22 is not installed
<ti:app xmlns:ti="http://ti.appcelerator.org">
    <android>
        <manifest>
            <uses-sdk android:minSdkVersion="10" android:targetSdkVersion="15" />
        </manifest>
    </android>
</ti:app>
titanium exited with exit code 1
[ERROR] Application Installer abnormal process termination. Process exit value was 1
5. From the above error we see that our tools don't consider android M as API 22 (although it will probably be API 23 once it goes GA). Please fix so that we can test android M till the time it is GA. *On further looking into it found that the folder for android M in the platforms folder inside android sdk is named "android-MNC" which might be the reason for our tools not picking it up.*

Attachments

FileDateSize
Screen Shot 2015-08-21 at 1.52.24 PM.png2015-08-21T20:57:19.000+0000516193

Comments

  1. Ashraf Abu 2015-06-05

    http://developer.android.com/preview/setup-sdk.html Based on this, it says: {quote} compileSdkVersion is set to 'android-MNC' minSdkVersion is set to 'MNC' targetSdkVersion is set to 'MNC' {quote}
  2. Ashraf Abu 2015-06-05

    I used and was able to compile. [~lchoudhary] If this works for you, I'll resolve this ticket as resolved. Also, if you are still having problems, try updating SDK Tools, Platform-tools, and Build-tools. Mine is SDK Tools 24.3.1, Platform-tools 22, and Build-tools 22.0.1 at the moment. Extra Note: I just tried it without the Android 5.1.1 SDK installed. It failed. Hmmm. Not sure if it is dependent on Android 5.1.1 being installed or "MNC" is also defaulting to Android 5.1.1. Will look at it further.
  3. Ashraf Abu 2015-06-05

    Note for development for Android M: *Apache HTTP Client is removed*. This should be a big deal to note. http://developer.android.com/preview/behavior-changes.html#behavior-apache-http-client
  4. Lokesh Choudhary 2015-06-05

    Thanks [~msamah] for the info. Yes we can not certainly determine if we are building with android M even if it builds fine. But as you were not able to build it without having API 22 I doubt we ever built with android M even if we specify "targetSdkVersion" as MNC. We had similar issue when android L preview came out.
  5. Hieu Pham 2015-07-20

    If you just change the min to "MNC", it will still use 22 as min, and builds with 22. Modifications need to be made in CLI to build it with "MNC".
  6. Chris Barber 2015-08-21

    PR: https://github.com/appcelerator/titanium_mobile/pull/7057
  7. Lokesh Choudhary 2015-08-21

    Reopening. Building with a build having this fix fails with error:
       [ERROR] :  Unable to find a suitable installed Android SDK that is >=21 and <=22
       TRACE  | titanium exited with exit code 1
       ERROR  | Error: ti run exited with error code 1
           at ChildProcess.<anonymous> (/Users/lokeshchoudhary/.appcelerator/install/5.0.0-12/package/node_modules/appc-cli-titanium/plugins/run.js:89:66)
           at ChildProcess.emit (events.js:98:17)
           at Process.ChildProcess._handle.onexit (child_process.js:820:12)
       [ERROR] Application Installer abnormal process termination. Process exit value was 1
       
    *Note* : Screenshot of my Android SDK manager is attached for reference. [~cbarber], Google just release (Android 6.0) API23 in android SDK manager Environment: Appc Studio : 4.2.0.201508062204 Ti SDK : 5.0.0.v20150821133620 Ti CLI : 4.1.5 Alloy : 1.7.5 MAC Yosemite : 10.10.4 Appc NPM : 4.2.0-1 Appc CLI : 5.0.0-12 Node: v0.10.37
  8. Chris Barber 2015-08-21

    PR 2: https://github.com/appcelerator/titanium_mobile/pull/7059
  9. Lokesh Choudhary 2015-08-24

  10. Lokesh Choudhary 2015-09-03

    Verified & closed TIMOB-19163. Closing this ticket

JSON Source