react-native-blur icon indicating copy to clipboard operation
react-native-blur copied to clipboard

Crash on android

Open schlaegerz opened this issue 7 years ago • 5 comments

Whenever I load the BlurView i get this crash: Error loading RS jni library: java.lang.UnsatisfiedLinkError: dalvik.system.PathClassLoader[DexPathList[[zip file "/data/app/com...-cfw5n6ELa16p4cM8GceeOw==/base.apk"],nativeLibraryDirectories=[/data/app/com...-cfw5n6ELa16p4cM8GceeOw==/lib/x86, /system/fake-libs, /data/app/com...-cfw5n6ELa16p4cM8GceeOw==/base.apk!/lib/x86, /system/lib, /vendor/lib]]] couldn't find "librsjni.so" Support lib API: 2301 internalCreate RenderScript.java:1358 create RenderScript.java:1529 create RenderScript.java:1479 create RenderScript.java:1455 create RenderScript.java:1442 initializeRenderScript BlurringView.java:110 BlurringView.java:41 BlurringView.java:30 createViewInstance BlurViewManager.java:28 createViewInstance BlurViewManager.java:11 createView ViewManager.java:44 createView NativeViewHierarchyManager.java:224 execute UIViewOperationQueue.java:153 dispatchPendingNonBatchedOperations UIViewOperationQueue.java:1010 doFrameGuarded UIViewOperationQueue.java:981 doFrame GuardedFrameCallback.java:31 doFrame ReactChoreographer.java:136 doFrame ChoreographerCompat.java:107 run Choreographer.java:909 doCallbacks Choreographer.java:723 doFrame Choreographer.java:655 run Choreographer.java:897 handleCallback Handler.java:790 dispatchMessage Handler.java:99 loop Looper.java:164 main ActivityThread.java:6494 invoke Method.java run RuntimeInit.java:438 main ZygoteInit.java:807

schlaegerz avatar Feb 23 '18 19:02 schlaegerz

+1

ThunderBoltEngineer avatar Mar 11 '18 10:03 ThunderBoltEngineer

+1

zachkirsch avatar Apr 01 '18 01:04 zachkirsch

any update

fadighattas100 avatar Apr 07 '18 18:04 fadighattas100

Any one resolve this.

This is my build.grade ` apply plugin: "com.android.application"

import com.android.build.OutputFile

project.ext.react = [ entryFile: "index.js" ]

apply from: "../../node_modules/react-native/react.gradle"

def enableSeparateBuildPerCPUArchitecture = false

/**

  • Run Proguard to shrink the Java bytecode in release builds. */ def enableProguardInReleaseBuilds = false

android { compileSdkVersion 26 buildToolsVersion '26.0.3'

defaultConfig {
    applicationId "com.dareu"
    minSdkVersion 16
    targetSdkVersion 26
    versionCode 1
    versionName "1.0"
    multiDexEnabled true
    ndk {
        abiFilters "armeabi-v7a", "x86"
    }
}

splits {
    abi {
        reset()
        enable enableSeparateBuildPerCPUArchitecture
        universalApk false  // If true, also generate a universal APK
        include "armeabi-v7a", "x86"
    }
}
buildTypes {
    release {
        minifyEnabled enableProguardInReleaseBuilds
        proguardFiles getDefaultProguardFile("proguard-android.txt"), "proguard-rules.pro"
        signingConfig signingConfigs.release

    }
}
// applicationVariants are e.g. debug, release
applicationVariants.all { variant ->
    variant.outputs.each { output ->
        // For each separate APK per architecture, set a unique version code as described here:
        // http://tools.android.com/tech-docs/new-build-system/user-guide/apk-splits
        def versionCodes = ["armeabi-v7a":1, "x86":2]
        def abi = output.getFilter(OutputFile.ABI)
        if (abi != null) {  // null for the universal-debug, universal-release variants
            output.versionCodeOverride =
                    versionCodes.get(abi) * 1048576 + defaultConfig.versionCode
        }
    }
}

}

dependencies { compile project(':react-native-blur') implementation(project(':react-native-firebase')) { transitive = false } // Firebase dependencies implementation "com.google.android.gms:play-services-base:15.0.0" implementation "com.google.firebase:firebase-core:15.0.0" implementation "com.google.firebase:firebase-firestore:15.0.0" implementation "com.google.firebase:firebase-auth:15.0.0" implementation "com.google.firebase:firebase-messaging:15.0.0" implementation 'me.leolin:ShortcutBadger:1.1.21@aar' // <-- Add this line if you wish to use badge on Android compile 'com.google.android.gms:play-services-auth:15.0.0' // should be at least 9.0.0

compile project(':react-native-image-picker')
compile project(':react-native-svg')

// compile project(':react-native-google-signin')

compile project(':react-native-fbsdk')
compile project(':react-native-vector-icons')
compile project(':react-native-orientation')
compile fileTree(dir: "libs", include: ["*.jar"])
compile "com.android.support:appcompat-v7:23.0.1"

compile "com.android.support:design:26+"
compile "com.android.support:recyclerview-v7:26+"
compile "com.android.support:cardview-v7:26+"
compile "com.facebook.react:react-native:+"  // From node_modules
compile(project(":react-native-google-signin")){         
    exclude group: "com.google.android.gms" // very important
}

}

// Run this once to be able to run the application with BUCK // puts all compile dependencies into folder libs for BUCK to use task copyDownloadableDepsToLibs(type: Copy) { from configurations.compile into 'libs' }

apply plugin: 'com.google.gms.google-services' // <--- this should be the last line

`

tomzaku avatar Apr 21 '18 11:04 tomzaku