z***@qq.com
z***@qq.com
  • 发布:2023-09-14 11:28
  • 更新:2023-09-14 11:50
  • 阅读:257

animation-view 在ios模拟器起上运行报错 module compiled with Swift 5.5.2 cannot be imported by the Swift 5.8.1

分类:uni-app

产品分类: uniapp/App

PC开发环境操作系统: Mac

PC开发环境操作系统版本号: macOS Ventura 13.5

HBuilderX类型: 正式

HBuilderX版本号: 3.8.12

手机系统: iOS

手机系统版本号: iOS 16

手机厂商: 模拟器

手机机型: iphone 14Plus

页面类型: nvue

vue版本: vue2

打包方式: 离线

项目创建方式: HBuilderX

操作步骤:
    <view>  
        <view class="tabbarView">  
            <animation-view class="animation" :path="path" :loop="false" :auto-play="false" :action="action">  
            </animation-view>  
            <!-- <view class="tabItem" v-for="(item,index) in listTabs" :key="index" @click="itemClick(index)">  
                <animation-view class="animation" :path="item.path" :loop="false" :auto-play="false" :action="item.action">  
                </animation-view>  
            </view> -->  
        </view>  
    </view>  

</template>  

<script>  
    export default {  
        data() {  
            return {  
                path:'../../../../static/lottie/jinggao.json',  
                listTabs:[{path:'',action:'stop'},{path:'',action:'stop'},{path:'',action:'stop'},{path:'',action:'stop'}],  
                action:'stop'  
            }  
        },  
        methods: {  
            itemClick(index){  

            }  
        },  
        onLoad(){  
            setTimeout(()=>{  
                console.log('lottie play')  
               this.action = 'play'   
            },2000)  
        }  
    }  
</script>  

<style>  
.tabbarView{  
    margin-left: 0;  
    margin-top: 500rpx;  
    width: 750rpx;  
    height: 100rpx;  
    border: 1rpx solid red;  
    display: flex;  
    flex-direction: row;  
    align-items: center;  
    justify-content: space-around;  
}  
.tabItem{  
    width: 100rpx;  
    height: 100rpx;  
    background-color: aquamarine;  
}  
.animation{  
    width: 100rpx;  
    height: 100rpx;  
}  
</style>

预期结果:

希望能在模拟器正常运行

实际结果:

在模拟器上报错

bug描述:

见附件图片

2023-09-14 11:28 负责人:无 分享
已邀请:
2***@qq.com

2***@qq.com

Swift版本问题吧

  • z***@qq.com (作者)

    问题是怎么解决呢 我去swift官网下了一个toolchain也没有用

    2023-09-15 09:30

要回复问题请先登录注册