android:Skipping device ‘xx‘ for ‘app:debug‘: Could not find build of variant which supports density

问题

RN 启动 android 报错:

Skipping device 'Pixel_5_API_29(AVD) - 10' for 'app:debug': Could not find build of variant which supports density 440 and an ABI in arm64-v8a

解决

android -> app -> build.gradle

splits {
    
    
    abi {
    
    
        reset()
        enable enableSeparateBuildPerCPUArchitecture
        universalApk false  // If true, also generate a universal APK
        // include "armeabi-v7a"
        // 将上面注释掉的改为这个:
        include "armeabi-v7a", "arm64-v8a"
        // include "armeabi-v7a", "x86", "arm64-v8a", "x86_64"
    }
}

然后重新 yarn android 就好了

猜你喜欢

转载自blog.csdn.net/weixin_43972437/article/details/125520547