diff --git a/.travis.yml b/.travis.yml index 60cf761a0..49312cf3e 100644 --- a/.travis.yml +++ b/.travis.yml @@ -4,7 +4,7 @@ env: - PACKAGE_VERSION=$DATE-$TRAVIS_BUILD_NUMBER - PACKAGE_NAME=tns-core-modules - NODE_VERSION=5.10.1 - - EMULATOR_API_VER=22 + - EMULATOR_API_VER=21 - RUNTIMEVERSION=next - AVD_NAME=Arm$EMULATOR_API_VER addons: @@ -33,10 +33,10 @@ before_script: - npm install -g grunt-cli - npm install - "(cd build/platform-declarations && npm install)" - - echo no | android create avd --force -n $AVD_NAME -t android-$EMULATOR_API_VER -b - armeabi-v7a -c 12M - - emulator -avd $AVD_NAME -skin WXGA720 -no-audio -no-window -memory 2048 & + - echo no | android create avd --force -n $AVD_NAME -t android-$EMULATOR_API_VER --abi default/armeabi-v7a -c 12M + - emulator -avd $AVD_NAME -no-audio -no-window & - android-wait-for-emulator + - adb shell input keyevent 82 & script: - jdk_switcher use oraclejdk8 - grunt default && diff --git a/tns-core-modules/ui/animation/animation.android.ts b/tns-core-modules/ui/animation/animation.android.ts index 58cc98df1..826621601 100644 --- a/tns-core-modules/ui/animation/animation.android.ts +++ b/tns-core-modules/ui/animation/animation.android.ts @@ -376,18 +376,20 @@ export class Animation extends common.Animation implements definition.Animation private _enableHardwareAcceleration() { for (let i = 0, length = this._propertyAnimations.length; i < length; i++) { let cache = this._propertyAnimations[i].target._nativeView; - let layerType = cache.getLayerType(); - if (layerType !== android.view.View.LAYER_TYPE_HARDWARE) { - cache.layerType = layerType; - cache.setLayerType(android.view.View.LAYER_TYPE_HARDWARE, null); - } + if (cache){ + let layerType = cache.getLayerType(); + if (layerType !== android.view.View.LAYER_TYPE_HARDWARE) { + cache.layerType = layerType; + cache.setLayerType(android.view.View.LAYER_TYPE_HARDWARE, null); + } + } } } private _disableHardwareAcceleration() { for (let i = 0, length = this._propertyAnimations.length; i < length; i++) { let cache = this._propertyAnimations[i].target._nativeView; - if (cache.layerType !== undefined) { + if (cache && cache.layerType !== undefined) { cache.setLayerType(cache.layerType, null); cache.layerType = undefined; }