I keep getting this error whenever I open my app in the emulator:
05-06 18:52:13.640 2861-2861/? E/AndroidRuntime﹕ FATAL EXCEPTION:
main
Process: scan.test, PID: 2861
java.lang.UnsatisfiedLinkError: dalvik.system.PathClassLoader[DexPathList[[zip file
"/data/app/scan.test-2/base.apk"],nativeLibraryDirectories=[/vendor/lib,
/system/lib]]] couldn't find "libtiny-tools.so"
at java.lang.Runtime.loadLibrary(Runtime.java:366)
at java.lang.System.loadLibrary(System.java:988)
at android.hardware.barcode.Scanner.(Scanner.java:136)
at scan.test.scan_v1activity.onStart(scan_v1activity.java:97)
at android.app.Instrumentation.callActivityOnStart(Instrumentation.java:1236)
at android.app.Activity.performStart(Activity.java:6006)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2288)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2390)
at android.app.ActivityThread.access$800(ActivityThread.java:151)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1303)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:135)
at android.app.ActivityThread.main(ActivityThread.java:5257)
at java.lang.reflect.Method.invoke(Native Method)
at java.lang.reflect.Method.invoke(Method.java:372)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:903)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:698)
I am not sure this is the exact solution but I had same issue, this is solved my issue You are missing libtiny-tools.so file in armeabi folder in libs.
if you are using android studio
add like above picture indicates.
Related
Old Unity version: 2018.1.6f1
New Unity Version : 2019 versions
I am working on an unity android project and everything is working fine. I recently generated exports from latest unity versions of 2019 but it does not work. I get ResourceNotFound Exception in android. The same export works if generated from old unity version.
I have tried upgrading android studio, but it does not seem to help. Is there any changes needs to be done in Android studio to make it work with latest unity version exports? Or is there any changes needs to be done in Unity while generating exports?
I have attached the logs below:
--------- beginning of crash
05-16 09:30:06.465 4495-4495/com.mytest.package E/AndroidRuntime: FATAL EXCEPTION: main
Process: com.mytest.package, PID: 4495
java.lang.Error: FATAL EXCEPTION [main]
Unity version : 2018.3.14f1
Device model : EPSON EMBT3C
Device fingerprint: MOVERIO/embt3c/cht_cr_rvp:5.1.1/R1.4.0/H75607131158:user/release-keys
Caused by: java.lang.RuntimeException: Unable to start activity ComponentInfo{com.mytest.package/com.mytest.package.activity.UnityPlayerActivity}: android.content.res.Resources$NotFoundException: String resource ID #0x0
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2325)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2387)
at android.app.ActivityThread.access$800(ActivityThread.java:151)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1303)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:135)
at android.app.ActivityThread.main(ActivityThread.java:5258)
at java.lang.reflect.Method.invoke(Native Method)
at java.lang.reflect.Method.invoke(Method.java:372)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:903)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:698)
Caused by: android.content.res.Resources$NotFoundException: String resource ID #0x0
at android.content.res.Resources.getText(Resources.java:299)
at android.content.res.Resources.getString(Resources.java:385)
at com.unity3d.player.UnityPlayer.a(Unknown Source)
at com.unity3d.player.UnityPlayer.<init>(Unknown Source)
at com.mytest.package.activity.UnityPlayerActivity.onCreate(UnityPlayerActivity.java:38)
at android.app.Activity.performCreate(Activity.java:5994)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1106)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2278)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2387)
at android.app.ActivityThread.access$800(ActivityThread.java:151)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1303)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:135)
at android.app.ActivityThread.main(ActivityThread.java:5258)
at java.lang.reflect.Method.invoke(Native Method)
at java.lang.reflect.Method.invoke(Method.java:372)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:903)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:698)
05-16 09:30:06.776 4495-4495/com.mytest.package I/Process: Sending signal. PID: 4495 SIG: 9
I am facing a issue in Samsung mobile, the issue is this, i open the application that i have made and minimized the app now the app is running at the background, now i go to my mobile
settings-->Display--> font style,
Then i changed the font when i come back and open the app that was running at the back ground the app crashes
I do not know where the issue is can you please give some idea on how to move about
This was the error that i was able to see in my logcat
2-12 17:58:54.883 1473-1473/com.mysmcc E/AndroidRuntime: FATAL EXCEPTION: main Process: com.mysmcc, PID: 1473 java.lang.RuntimeException: Unable to start activity ComponentInfo{com.mysmcc/com.mysmcc.activities.AppMainActivity}: java.lang.StringIndexOutOfBoundsException: length=0; index=0 at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2695) at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2769) at android.app.ActivityThread.access$900(ActivityThread.java:177) at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1430) at android.os.Handler.dispatchMessage(Handler.java:102) at android.os.Looper.loop(Looper.java:135) at android.app.ActivityThread.main(ActivityThread.java:5910) at java.lang.reflect.Method.invoke(Native Method) at java.lang.reflect.Method.invoke(Method.java:372) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1405) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1200) Caused by: java.lang.StringIndexOutOfBoundsException: length=0; index=0 at java.lang.String.indexAndLength(String.java:500) at java.lang.String.charAt(String.java:494) at android.graphics.Color.parseColor(Color.java:209) at com.mysmcc.activities.AppMainActivity.onCreate(AppMainActivity.java:213) at android.app.Activity.performCreate(Activity.java:6178) at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1118) at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2648) at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2769) at android.app.ActivityThread.access$900(ActivityThread.java:177) at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1430) at android.os.Handler.dispatchMessage(Handler.java:102) at android.os.Looper.loop(Looper.java:135) at android.app.ActivityThread.main(ActivityThread.java:5910) at java.lang.reflect.Method.invoke(Native Method) at java.lang.reflect.Method.invoke(Method.java:372) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1405) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1200)
I'm trying to run my app with Backendless for the first time. I recieve this error:
java.lang.NoClassDefFoundError: Failed resolution of: Lcom/backendless/BackendlessCollection;
at com.backendless.Persistence.<init>(Persistence.java:72)
at com.backendless.Persistence.<clinit>(Persistence.java:62)
at com.backendless.Persistence.getInstance(Persistence.java:66)
at com.backendless.Backendless.<clinit>(Backendless.java:43)
at com.asd.asd.android.AndroidLauncher.onCreate(AndroidLauncher.java:89)
at android.app.Activity.performCreate(Activity.java:6289)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1119)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2646)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2758)
at android.app.ActivityThread.access$900(ActivityThread.java:177)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1448)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:145)
at android.app.ActivityThread.main(ActivityThread.java:5942)
at java.lang.reflect.Method.invoke(Native Method)
at java.lang.reflect.Method.invoke(Method.java:372)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1400)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1195)
Caused by: java.lang.ClassNotFoundException: Didn't find class "com.backendless.BackendlessCollection" on path: DexPathList[[zip file "/data/app/com.asd.asd.android-1/base.apk"],nativeLibraryDirectories=[/data/app/com.asd.asd.android-1/lib/arm, /vendor/lib, /system/lib]]
The stacktrace gives me no clue on what may be wrong since I don't even use the BackendlessCollection class.
The error points at:
Backendless.initApp(this,app_ID,android_ID, version_id);
That is a known issue in Backendless, it has been fixed in their newer SDK. Here`s link on maven central http://mvnrepository.com/artifact/com.backendless/backendless/3.0.8.1
We have an application using the Zbar library from BarcodeScanner with gradle:
compile 'me.dm7.barcodescanner:zbar:1.8.2'
Scanning works fine in all the devices except for those with 64bit. When we launch the scanner the screen turn black and we receive an exception:
java.lang.UnsatisfiedLinkError: dalvik.system.PathClassLoader[DexPathList[[zip file "/data/app/my.package.name-2/base.apk"],nativeLibraryDirectories=[/data/app/my.package.name-2/lib/arm64, /vendor/lib64, /system/lib64]]] couldn't find "libiconv.so"
at java.lang.Runtime.loadLibrary(Runtime.java:366)
at java.lang.System.loadLibrary(System.java:989)
at me.dm7.barcodescanner.zbar.ZBarScannerView.(ZBarScannerView.java:31)
at my.package.name.activity.BarcodeActivity.onCreate(BarcodeActivity.java:19)
at android.app.Activity.performCreate(Activity.java:6374)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1119)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2767)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2879)
at android.app.ActivityThread.access$900(ActivityThread.java:182)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1475)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:145)
at android.app.ActivityThread.main(ActivityThread.java:6141)
at java.lang.reflect.Method.invoke(Native Method)
at java.lang.reflect.Method.invoke(Method.java:372)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1399)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1194)
It seems to be fixed in 1.8.4.
Try using version 1.9
compile 'me.dm7.barcodescanner:zbar:1.9'
I created a new Android project in Intellij 14, then added Scala SDK 2.11.6 to it (scope provided was the only option that worked for me). The project runs fine if I don't use any Scala class. But once I use, say, string interpolation, as soon as the code is run, the app crashes with this error:
06-20 18:36:27.277 1995-1995/com.pcn.android.games.jacks D/AndroidRuntime﹕ Shutting down VM
06-20 18:36:27.289 1995-1995/com.pcn.android.games.jacks E/AndroidRuntime﹕ FATAL EXCEPTION: main
Process: com.pcn.android.games.jacks, PID: 1995
java.lang.NoClassDefFoundError: Failed resolution of: Lscala/StringContext;
at com.pcn.android.games.jacks.MyActivity.onCreate(MyActivity.scala:16)
at android.app.Activity.performCreate(Activity.java:5990)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1106)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2278)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2390)
at android.app.ActivityThread.access$800(ActivityThread.java:151)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1303)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:135)
at android.app.ActivityThread.main(ActivityThread.java:5257)
at java.lang.reflect.Method.invoke(Native Method)
at java.lang.reflect.Method.invoke(Method.java:372)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:903)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:698)
Caused by: java.lang.ClassNotFoundException: Didn't find class "scala.StringContext" on path: DexPathList[[zip file "/data/app/com.pcn.android.games.jacks-1/base.apk"],nativeLibraryDirectories=[/vendor/lib, /system/lib]]
at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:56)
at java.lang.ClassLoader.loadClass(ClassLoader.java:511)
at java.lang.ClassLoader.loadClass(ClassLoader.java:469)
at com.pcn.android.games.jacks.MyActivity.onCreate(MyActivity.scala:16)
at android.app.Activity.performCreate(Activity.java:5990)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1106)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2278)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2390)
at android.app.ActivityThread.access$800(ActivityThread.java:151)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1303)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:135)
at android.app.ActivityThread.main(ActivityThread.java:5257)
at java.lang.reflect.Method.invoke(Native Method)
at java.lang.reflect.Method.invoke(Method.java:372)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:903)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:698)
Suppressed: java.lang.ClassNotFoundException: scala.StringContext
at java.lang.Class.classForName(Native Method)
at java.lang.BootClassLoader.findClass(ClassLoader.java:781)
at java.lang.BootClassLoader.loadClass(ClassLoader.java:841)
at java.lang.ClassLoader.loadClass(ClassLoader.java:504)
... 15 more
Caused by: java.lang.NoClassDefFoundError: Class not found using the boot class loader; no stack available
I use IntelliJ 14.1.3, Java 1.7.0_80. My proguard-project.txt file is empty, but this persists whether I turn on Proguard or not.
What have I done wrong that prevents Scala classes from being seen at runtime?
What have I done wrong that prevents Scala classes from being seen at runtime?
Hard to tell without looking into your build files and the way your app is building. I suggest you move to the Gradle build system and use one of the android-scala plugins, such as this one. I used it about 3-4 months ago in one of my apps and it worked as a charm.
Gradle-based builds will save you a lot of the time, because it's officially supported by Google and it's used by many people (thus you'll be more likely to get the help from community). It also supports some features not supported by Intellij-based build system, such as build flavors/splits and is constantly optimized by Google engineers to get the fastest build times possible.