Problems when build Skia for Android - android

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~

Related

flutter Failed to find Platform SDK with path: platforms;android-

I am trying to run a flutter app on Android studio. It throws error
flutter Failed to find Platform SDK with path: platforms;android-R
My app build.gradle is
buildscript {
...
lintOptions {
disable 'InvalidPackage'
}
defaultConfig {
applicationId "com.inspireui.fluxstore"
minSdkVersion 23
targetSdkVersion 30
versionCode flutterVersionCode.toInteger()
versionName flutterVersionName
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
multiDexEnabled true
resConfigs "en"
}
afterEvaluate {project ->
if (project.hasProperty("android") && project.property("android").compileSdkVersion.equals("android-R")) {
android {
compileSdkVersion 30
}
}
}
}
Have tried below solution
Failed to find Platform SDK with path: platforms;android-P

I am trying to import ImageprocessingLibrary and add its dependency to my project, but I am getting "Could not get unknown property 'sdk'"

Could not get unknown property 'sdk' for project ':ImageProcessingLibrary' of type org.gradle.api.Project.
Error comes in this portion of gradle
defaultConfig {
targetSdkVersion project.sdk
minSdkVersion project.minSdk
ndk {
moduleName "hello-jni"
abiFilters 'armeabi-v7a', 'arm64-v8a', 'x86', 'x86_64'
}
versionCode project.versionCode
versionName project.versionName
}
Just replace the codes inside of defaultConfig like below:
minSdkVersion 19
targetSdkVersion 29
versionCode 1
versionName '0.0.0.1'

Why Android Studio 3 use cmake 3.6.0 as default?

My Android studio is version 3.3.2 and i trying to link gradle to my native library, my module's build.gradle is:
android {
compileSdkVersion 28
defaultConfig {
minSdkVersion 18
targetSdkVersion 28
versionCode 1
versionName "1.0"
ndk {
moduleName "MyModule"
abiFilters 'x86', 'armeabi-v7a'
}
}
externalNativeBuild {
cmake {
version "3.10.2" // The key line
path file('CMakeLists.txt')
}
}
}
If i don't specify the cmake version to '3.10.2', I am getting the following error:
CMake '3.6.0' was not found in PATH or by cmake.dir property.
- CMake '3.10.2' found in SDK did not match requested version '3.6.0'.
- CMake '3.12.1' found in PATH did not match requested version '3.6.0'.
Install CMake 3.6.0
So I'am confused why is so! Why does it ask for the version of cmake itself to be 3.6.0.
Kindly review and give feedback.
Try to add the configuration below to your gradle:
externalNativeBuild {
cmake {
version "3.10.2" // here
}
}

More than one file was found with OS independent path 'lib/armeabi/libBugly.so'

I tried to debug my application, but an error appeared:
More than one file was found with OS independent path 'lib/armeabi/libBugly.so'
This is a part of my gradle:
android {
compileSdkVersion 26
dataBinding {
enabled = true
}
defaultConfig {
multiDexEnabled true
minSdkVersion 15
targetSdkVersion 26
versionCode 3
versionName "1.0"
ndk {
abiFilters "armeabi", "armeabi-v7a"
}
}
}
dependencies {
implementation 'com.tencent.bugly:crashreport_upgrade:latest.release'
implementation 'com.tencent.bugly:nativecrashreport:latest.release'
}
Android Studio 3.1.3, Gradle4.1 in my project.
Add something in app's build.gradle :
android {
packagingOptions {
pickFirst 'lib/armeabi/libBugly.so'
}
}
Then, it works.

React Native SDK runtime permission error

React Native running android says the new target SDK 22 doesn't support runtime permissions. The old target SDK 24 does though, so how do you fix it?
Image of Error
Uninstall old version of your app.
Change the following attributes in the file [project path]/android/app/build.gradle ,
........
.........
android {
compileSdkVersion 23
buildToolsVersion "23.0.1"
defaultConfig {
applicationId "com.kotac"
minSdkVersion 16
targetSdkVersion 23
versionCode 1
versionName "1.0"
ndk {
abiFilters "armeabi-v7a", "x86"
}
}
.................
.............
as needed

Categories

Resources