[TIMOB-24438] Android: Update bundled Android libraries to 23.4.0
GitHub Issue | n/a |
---|---|
Type | Improvement |
Priority | None |
Status | Closed |
Resolution | Fixed |
Resolution Date | 2017-05-11T23:11:23.000+0000 |
Affected Version/s | Release 6.0.2 |
Fix Version/s | Release 6.1.0 |
Components | Android |
Labels | merge-6.1.0 |
Reporter | Jan Vennemann |
Assignee | Jan Vennemann |
Created | 2017-02-28T17:39:56.000+0000 |
Updated | 2017-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
File | Date | Size |
---|---|---|
Screen Shot 2017-05-04 at 2.41.28 PM.png | 2017-05-04T21:44:08.000+0000 | 144543 |
PR: https://github.com/appcelerator/titanium_mobile/pull/8858
[~jvennemann], Can you please give us a test case to do an FR.
[~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 theonAppCreate
method:Log.d(LCAT, String.format("hasStartedFromLauncher: %b", AppLaunchChecker.hasStartedFromLauncher(app)));
4. Build the module 5. Copy the module into an app, add it totiapp.xml
and run it, check the log for the above debug message containinghasStartedFromLauncher
right after it started. *Additional tests* Run the kitchen sink app to verify compatibility with existing apps.[~jvennemann], I get the below error when I try to build the module:
its not able to resolve
android.support
inimport android.support.v4.app.AppLaunchChecker;
[~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
[~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 addimport android.support.v4.app.AppLaunchChecker;
I getThe import android.support cannot be resolved
. Tried it for bothmaster
&6.1.0
PR.[~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.
FR passed with both master & backport PR.
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
Re-opening issue due to a crash when running on devices with Android <= 5.1.
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
andsupport-vector-drawable
need to be added as well.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.
FR passed for https://github.com/appcelerator/titanium_mobile/pull/9053
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