Advanced Topics

This section covers detailed topics about the Anyline SDK Plugin on React-Native. You will not require knowledge about these advanced topics in your every day use of the SDK. However, in case you need specific information about certain topics in the Anyline SDK, it will be covered here.

Known Issues on Android

Error: Strict mode does not allow function declarations in a lexically nested statement

As of version 0.22 of React-Native, the following error might occour:

Got JS Exception: SyntaxError: Strict mode does not allow function declarations in a lexically nested statement.

This is a known issue. A workaround was posted on stack overflow:

  1. open node_modules\react-native\Libraries\Core\InitializeCore.js line 112
  2. change function handleError(e, isFatal) to var handleError = function(e, isFatal)
  3. then do npm start -- --reset-cache

Error: Duplicate files during packaging of APK

The Anyline SDK ships with its own version of the GNU STL library. This might cause a conflict with other included libraries.

To solve this issue, add the following lines to your gradle file:

android.packagingOptions {
    pickFirst('lib/*/libgnustl_shared.so')
}

Note

This does not only apply to libgnustl_shared but to any library that is detected as a duplicate

Error: Could not find io.anyline:anylinesdk

Sometimes, the project gradle overrides the plugin gradle repository entry.

To solve this issue, add the following lines to your project gradle file:

allprojects {
    repositories {
        ...
        maven { url 'https://anylinesdk.blob.core.windows.net/maven/'}
        ...
    }
}

Known Issues on iOS

Linking problems on iOS causes by react-native > 0.40.

Because react-native restructured his library on version 0.40. there can be some linking problems on iOS. If so, uncheck parallelize building described here.