2

I try to build Skia for Android, there is my configuration:

ndk = "/root/workspace/ndk/android-ndk-r22/"
ndk_api=22
target_os="android"
target_cpu="arm"

is_official_build=false
is_component_build=false

After building skia successfully, I get libskia.a file, But cant work on my computer, its say:

error: undefined symbol atof
referenced by pngget.c

error picture

Android gradle configuration is:

android {
    compileSdkVersion 29
    buildToolsVersion "30.0.3"

    defaultConfig {
        applicationId "com.impactjs.ejecta"
        minSdkVersion 18
        targetSdkVersion 29
        versionCode 1
        versionName "1.0"

        ndk {
            abiFilters 'armeabi-v7a'
        }
        externalNativeBuild {
            cmake {
                arguments '-DGCANVAS_WEEX=0', '-DGSTANDALONE=1'
            }
        }

    }

    ndkVersion '22.0.7026061'
}

My Cmake configuration is:

target_link_libraries(
  iwanmg

  z
  log
  jnigraphics
  gcanvas

  ${CMAKE_CURRENT_SOURCE_DIR}/v8/libs/${ANDROID_ABI}/libwee8.a
  ${CMAKE_CURRENT_SOURCE_DIR}/skia/libs/${ANDROID_ABI}/libskia.a
)

please help~

l1shu
  • 21
  • 2
  • It's very strange, can you test ```atof``` usage in your project without thirdparty stuff? Because it should work from the box. – Mykola Khyliuk Mar 17 '21 at 08:38

0 Answers0