Titanium JIRA Archive
Appcelerator Community (AC)

[AC-5434] Android module auto upgrade of manifest causes module to fail loading and app to crash

GitHub Issuen/a
TypeNew Feature
Priorityn/a
StatusResolved
ResolutionDuplicate
Resolution Date2017-12-10T21:09:44.000+0000
Affected Version/sn/a
Fix Version/sn/a
ComponentsAppcelerator CLI
Labelsdefect
ReporterOphir Oren
AssigneeShak Hossain
Created2017-12-10T20:08:59.000+0000
Updated2017-12-11T07:46:34.000+0000

Description

When running appc run -p android --build-only -l trace to compile an Android module written for versions earlier than SDK 7.0.0.GA, the CLI offers to upgrade the module. When choosing "yes" to upgrade the module the CLI updates the android module manifest file. The CLI updates the manifest and setting minsdk: 7.0.0. While compilation completes successfully, when the module is put in to an app it is causing the app to crash on load with an error message that the so file of the module cannot be found: couldn't find "libti.ga.so"; Titanium 7.0.0,2017/12/05 13:30,undefined This is because the minsdk is set to an incorrect version, and should be minsdk: 7.0.0.GA. When manually changing the version, cleaning build and libs folder and recompiling the error message goes away.

Comments

  1. Hans Knöchel 2017-12-10

    The libs/ directory and build/ directory cleanup was a general issue that could happen to builds when changing api-levels. TIMOB-25592 already takes care of this :).
  2. Ophir Oren 2017-12-11

    @Hans - This is not the same bug. TIMOB-25592 is about the build directory while this one is about the minsdk version that is being wrotten by the CLI upgrade.
  3. Ophir Oren 2017-12-11

    Please re-open
  4. Hans Knöchel 2017-12-11

    Thanks for updating the initial description, but this is not an issue. Many other working modules, even core-modules like [Ti.Map](https://github.com/appcelerator-modules/ti.map/blob/master/android/manifest#L19) use "7.0.0" and the app handles it fine. The error about the "so" files are because the libs directory does not get cleaned properly without flushing the directory before. In detail, this is handled by [this 10 lines](https://github.com/appcelerator/titanium_mobile/pull/9671/files#diff-e409a7861efa1e711ec49a7ff79beee7R415) that delete the directory, recreate it and pre-create the directories needed.

JSON Source