Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-24438] Android: Update bundled Android libraries to 23.4.0

GitHub Issuen/a
TypeImprovement
PriorityNone
StatusClosed
ResolutionFixed
Resolution Date2017-05-11T23:11:23.000+0000
Affected Version/sRelease 6.0.2
Fix Version/sRelease 6.1.0
ComponentsAndroid
Labelsmerge-6.1.0
ReporterJan Vennemann
AssigneeJan Vennemann
Created2017-02-28T17:39:56.000+0000
Updated2017-05-15T20:52:38.000+0000

Description

Our current SDK release targets API level 23. Some bundled libraries like the Android Support Library were not updated to also target API23.

Attachments

FileDateSize
Screen Shot 2017-05-04 at 2.41.28 PM.png2017-05-04T21:44:08.000+0000144543

Comments

  1. Jan Vennemann 2017-03-03

    PR: https://github.com/appcelerator/titanium_mobile/pull/8858
  2. Lokesh Choudhary 2017-05-02

    [~jvennemann], Can you please give us a test case to do an FR.
  3. Jan Vennemann 2017-05-03

    [~lchoudhary], the easiest way to test this would be to use one of new features added in 23.4.0, like the [AppLaunchChecker](https://developer.android.com/reference/android/support/v4/app/AppLaunchChecker.html). *Steps for FR* 1. Create a new Titanium module 2. Add the following import to your <ModuleName>Module.java: import android.support.v4.app.AppLaunchChecker; 3. Add this line inside the onAppCreate method: Log.d(LCAT, String.format("hasStartedFromLauncher: %b", AppLaunchChecker.hasStartedFromLauncher(app))); 4. Build the module 5. Copy the module into an app, add it to tiapp.xml and run it, check the log for the above debug message containing hasStartedFromLauncher right after it started. *Additional tests* Run the kitchen sink app to verify compatibility with existing apps.
  4. Lokesh Choudhary 2017-05-03

    [~jvennemann], I get the below error when I try to build the module:
       [ERROR] :  Failed to compile Java source files:
       [ERROR] :  
       [ERROR] :  warning: [options] bootstrap class path not set in conjunction with -source 1.6
       [ERROR] :  Note: [KrollBindingGen] Running Kroll binding generator.
       [ERROR] :  Note: [KrollBindingGen] No binding data found, creating new data file: org.appcelerator.titanium.bindings/testmodule.json
       [ERROR] :  Note: [KrollBindingGen] Found binding for proxy Example
       [ERROR] :  Note: [KrollBindingGen] Found binding for module Testmodule
       [ERROR] :  /Users/lchoudhary/Desktop/workspaces/workspace_2016/testmodule/android/src/com/app/testmodule/TestmoduleModule.java:16: error: cannot find symbol
       [ERROR] :  import android.support.v4.app.AppLaunchChecker;
       [ERROR] :                               ^
       [ERROR] :    symbol:   class AppLaunchChecker
       [ERROR] :    location: package android.support.v4.app
       [ERROR] :  Note: [KrollBindingGen] Generating JSON: file:/Users/lchoudhary/Desktop/workspaces/workspace_2016/testmodule/android/build/generated/json/org/appcelerator/titanium/bindings/testmodule.json
       [ERROR] :  1 error
       
    its not able to resolve android.support in import android.support.v4.app.AppLaunchChecker;
  5. Jan Vennemann 2017-05-04

    [~lchoudhary], are you sure you were building with the correct SDK built from PR [#8858](https://github.com/appcelerator/titanium_mobile/pull/8858). Note that that PR is for master so it's 6.2.0. [~gmathews], backport for 6_1_X branch: https://github.com/appcelerator/titanium_mobile/pull/9016
  6. Lokesh Choudhary 2017-05-04

    [~jvennemann], Yes I am building with the correct PR. !Screen Shot 2017-05-04 at 2.41.28 PM.png|thumbnail! I have attached my SDK folder structure. It shows I have the correct jar files from the PR. Also, When I add import android.support.v4.app.AppLaunchChecker; I get The import android.support cannot be resolved. Tried it for both master & 6.1.0 PR.
  7. Jan Vennemann 2017-05-04

    [~lchoudhary], ok thanks for double checking. Can you please do a module build where you are encountering the error and send me the complete log with the log level set to trace? Maybe there is something different between our environments. As for the unresolved import warning, that is most likely a Studio issue. You need to import the support libraries via Project properties > Java Build Path > Libraries > Add external JARs, so Studio knows about them.
  8. Lokesh Choudhary 2017-05-09

    FR passed with both master & backport PR.
  9. Lokesh Choudhary 2017-05-09

    Verified the fix using the steps above. Closing. Studio Ver: 4.9.0.201704240654 SDK Ver: 6.1.0.v20170509114242 OS Ver: 10.12.3 Xcode Ver: Xcode 8.3.2 Appc NPM: 4.2.9 Appc CLI: 6.2.0 Ti CLI Ver: 5.0.12 Alloy Ver: 1.9.11 Node Ver: 6.10.1 Java Ver: 1.8.0_101 Devices: > google Nexus 6 --- Android 6.0.1
  10. Jan Vennemann 2017-05-11

    Re-opening issue due to a crash when running on devices with Android <= 5.1.
        [ERROR] TiApplication: Caused by: java.lang.ClassNotFoundException: Didn't find class "android.support.graphics.drawable.VectorDrawableCompat" on path: DexPathList[[zip file "/data/app/com.appc.toolbartest-1/base.apk"],nativeLibraryDirectories=[/data/app/com.appc.toolbartest-1/lib/x86
        
    Google introduced support libraries for vector drawables on those devices with Support Libraries version 23.2.0. To resolve this the new support libraries animated-vector-drawable and support-vector-drawable need to be added as well.
  11. Jan Vennemann 2017-05-11

    PR (6_1_X): https://github.com/appcelerator/titanium_mobile/pull/9053 I just did a fix for 6_1_X because we have [#9027](https://github.com/appcelerator/titanium_mobile/pull/9027) open on master which updates the libraries to 25.3.1 and that PR already includes the vector drawable libraries.
  12. Lokesh Choudhary 2017-05-11

    FR passed for https://github.com/appcelerator/titanium_mobile/pull/9053
  13. Lokesh Choudhary 2017-05-15

    Verified the fix. Followed the test steps above & tests passed. Closing. Studio Ver: 4.9.0.201705110256 SDK Ver: 6.1.0.v20170514022959 OS Ver: 10.12.3 Xcode Ver: Xcode 8.3.2 Appc NPM: 4.2.9 Appc CLI: 6.2.1 Ti CLI Ver: 5.0.13 Alloy Ver: 1.9.11 Node Ver: 6.10.1 Java Ver: 1.8.0_101 Devices: ⇨ google Nexus 6 --- Android 6.0.1 ⇨ google Nexus 6P --- Android 7.1.1

JSON Source