Android Studio 3 debug on kitkat device Logcat not showing source reference - android

When debugging on an older Samsung GT-P5210 Android 4.4.2 Tablet the logcat
when app crash is showen in Logcat but, it´s like it´s missing information.
In the Log there´s usually some link directly to offending source file
but not in this log.
I look in the Tablet developer option setting but cant see anything controlling this, I think this is some settings in Android Studio 3 for older apis, How to fix this?
03-25 16:49:43.108 29697-30049/com.game.android.debug E/UncaughtException:
java.lang.AssertionError: java.lang.NoSuchFieldException: ROUTE
at com.google.gson.internal.bind.i$a.<init>(SourceFile:791)
at com.google.gson.internal.bind.TypeAdapters$30.a(SourceFile:817)
at com.google.gson.f.a(SourceFile:423)
at com.google.gson.internal.bind.CollectionTypeAdapterFactory.a(SourceFile:53)
at com.google.gson.f.a(SourceFile:423)
at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory.a(SourceFile:115)
at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory.a(SourceFile:164)
at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory.a(SourceFile:100)
at com.google.gson.f.a(SourceFile:423)
at com.google.gson.internal.bind.CollectionTypeAdapterFactory.a(SourceFile:53)
at com.google.gson.f.a(SourceFile:423)
at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory.a(SourceFile:115)
at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory.a(SourceFile:164)
at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory.a(SourceFile:100)
at com.google.gson.f.a(SourceFile:423)
at com.google.gson.f.a(SourceFile:886)
at com.google.gson.f.a(SourceFile:825)
at com.game.android.PlacesProvider.a.c.b.a(SourceFile:55)
at com.game.android.PlacesProvider.a.e.a$1.a(SourceFile:51)
at com.game.android.PlacesProvider.a.e.a$1.b(SourceFile:47)
at com.game.android.PlacesProvider.a.e.c.a(SourceFile:60)
at com.game.android.PlacesProvider.a.e.a.a(SourceFile:47)
at com.game.android.PlacesProvider.a.c.a(SourceFile:229)
at com.game.android.PlacesProvider.a.e.performFiltering(SourceFile:104)
at android.widget.Filter$RequestHandler.handleMessage(Filter.java:234)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:146)
at android.os.HandlerThread.run(HandlerThread.java:61)
Caused by: java.lang.NoSuchFieldException: ROUTE
at java.lang.Class.getField(Class.java:724)
at com.google.gson.internal.bind.i$a.<init>(SourceFile:780)
at com.google.gson.internal.bind.TypeAdapters$30.a(SourceFile:817) 
at com.google.gson.f.a(SourceFile:423) 
at com.google.gson.internal.bind.CollectionTypeAdapterFactory.a(SourceFile:53) 
at com.google.gson.f.a(SourceFile:423) 
at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory.a(SourceFile:115) 
at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory.a(SourceFile:164) 
at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory.a(SourceFile:100) 
at com.google.gson.f.a(SourceFile:423) 
at com.google.gson.internal.bind.CollectionTypeAdapterFactory.a(SourceFile:53) 
at com.google.gson.f.a(SourceFile:423) 
at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory.a(SourceFile:115) 
at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory.a(SourceFile:164) 
at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory.a(SourceFile:100) 
at com.google.gson.f.a(SourceFile:423) 
at com.google.gson.f.a(SourceFile:886) 
at com.google.gson.f.a(SourceFile:825) 
at com.game.android.PlacesProvider.a.c.b.a(SourceFile:55) 
at com.game.android.PlacesProvider.a.e.a$1.a(SourceFile:51) 
at com.game.android.PlacesProvider.a.e.a$1.b(SourceFile:47) 
at com.game.android.PlacesProvider.a.e.c.a(SourceFile:60) 
at com.game.android.PlacesProvider.a.e.a.a(SourceFile:47) 
at com.game.android.PlacesProvider.a.c.a(SourceFile:229) 
at com.game.android.PlacesProvider.a.e.performFiltering(SourceFile:104) 
at android.widget.Filter$RequestHandler.handleMessage(Filter.java:234) 
at android.os.Handler.dispatchMessage(Handler.java:102) 
at android.os.Looper.loop(Looper.java:146) 
at android.os.HandlerThread.run(HandlerThread.java:61) 
03-25 16:49:43.678 29697-29697/com.game.android.debug E/UncaughtException: java.lang.NullPointerException
at com.game.android.PlacesProvider.a.e.publishResults(SourceFile:140)
at android.widget.Filter$ResultsHandler.handleMessage(Filter.java:282)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:146)
at android.app.ActivityThread.main(ActivityThread.java:5653)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:515)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1291)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1107)
at dalvik.system.NativeStart.main(Native Method)
03-25 16:49:43.978 29697-30049/com.game.android.debug E/AndroidRuntime: FATAL EXCEPTION: Filter
Process: com.game.android.debug, PID: 29697
java.lang.AssertionError: java.lang.NoSuchFieldException: ROUTE
at com.google.gson.internal.bind.i$a.<init>(SourceFile:791)
at com.google.gson.internal.bind.TypeAdapters$30.a(SourceFile:817)
at com.google.gson.f.a(SourceFile:423)
at com.google.gson.internal.bind.CollectionTypeAdapterFactory.a(SourceFile:53)
at com.google.gson.f.a(SourceFile:423)
at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory.a(SourceFile:115)
at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory.a(SourceFile:164)
at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory.a(SourceFile:100)
at com.google.gson.f.a(SourceFile:423)
at com.google.gson.internal.bind.CollectionTypeAdapterFactory.a(SourceFile:53)
at com.google.gson.f.a(SourceFile:423)
at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory.a(SourceFile:115)
at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory.a(SourceFile:164)
at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory.a(SourceFile:100)
at com.google.gson.f.a(SourceFile:423)
at com.google.gson.f.a(SourceFile:886)
at com.google.gson.f.a(SourceFile:825)
at com.game.android.PlacesProvider.a.c.b.a(SourceFile:55)
at com.game.android.PlacesProvider.a.e.a$1.a(SourceFile:51)
at com.game.android.PlacesProvider.a.e.a$1.b(SourceFile:47)
at com.game.android.PlacesProvider.a.e.c.a(SourceFile:60)
at com.game.android.PlacesProvider.a.e.a.a(SourceFile:47)
at com.game.android.PlacesProvider.a.c.a(SourceFile:229)
at com.game.android.PlacesProvider.a.e.performFiltering(SourceFile:104)
at android.widget.Filter$RequestHandler.handleMessage(Filter.java:234)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:146)
at android.os.HandlerThread.run(HandlerThread.java:61)
Caused by: java.lang.NoSuchFieldException: ROUTE
at java.lang.Class.getField(Class.java:724)
at com.google.gson.internal.bind.i$a.<init>(SourceFile:780)
at com.google.gson.internal.bind.TypeAdapters$30.a(SourceFile:817) 
at com.google.gson.f.a(SourceFile:423) 
at com.google.gson.internal.bind.CollectionTypeAdapterFactory.a(SourceFile:53) 
at com.google.gson.f.a(SourceFile:423) 
at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory.a(SourceFile:115) 
at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory.a(SourceFile:164) 
at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory.a(SourceFile:100) 
at com.google.gson.f.a(SourceFile:423) 
at com.google.gson.internal.bind.CollectionTypeAdapterFactory.a(SourceFile:53) 
at com.google.gson.f.a(SourceFile:423) 
at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory.a(SourceFile:115) 
at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory.a(SourceFile:164) 
at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory.a(SourceFile:100) 
at com.google.gson.f.a(SourceFile:423) 
at com.google.gson.f.a(SourceFile:886) 
at com.google.gson.f.a(SourceFile:825) 
at com.game.android.PlacesProvider.a.c.b.a(SourceFile:55) 
at com.game.android.PlacesProvider.a.e.a$1.a(SourceFile:51) 
at com.game.android.PlacesProvider.a.e.a$1.b(SourceFile:47) 
at com.game.android.PlacesProvider.a.e.c.a(SourceFile:60) 
at com.game.android.PlacesProvider.a.e.a.a(SourceFile:47) 
at com.game.android.PlacesProvider.a.c.a(SourceFile:229) 
at com.game.android.PlacesProvider.a.e.performFiltering(SourceFile:104) 
at android.widget.Filter$RequestHandler.handleMessage(Filter.java:234) 
at android.os.Handler.dispatchMessage(Handler.java:102) 
at android.os.Looper.loop(Looper.java:146) 
at android.os.HandlerThread.run(HandlerThread.java:61) 

The stack trace shows the information present in the APK that caused the Exception. If it misses the source file name, this means that these information had been removed from the APK, e.g. by a code obfuscator.
If you have the source code of the app you should create a debug build or a release build without obfuscation.
If you don't have the source code of the app there is nothing you can do on your own. You can only contact the app author and describe the problem.

Related

Android NoClassDefFoundError on android 4.4.2

When I try to run my app on Android 4.4.2 it is giving me this error:
E/AndroidRuntime: FATAL EXCEPTION: main
Process: my.package, PID: 24775
java.lang.NoClassDefFoundError: my/package/models/Transaction
at java.lang.Class.getDeclaredFields(Native Method)
at java.lang.Class.getDeclaredFields(Class.java:610)
at com.activeandroid.util.ReflectionUtils.getDeclaredColumnFields(ReflectionUtils.java:73)
at com.activeandroid.TableInfo.<init>(TableInfo.java:66)
at com.activeandroid.ModelInfo.loadModelFromMetaData(ModelInfo.java:101)
at com.activeandroid.ModelInfo.<init>(ModelInfo.java:61)
at com.activeandroid.Cache.initialize(Cache.java:66)
at com.activeandroid.ActiveAndroid.initialize(ActiveAndroid.java:44)
at com.activeandroid.ActiveAndroid.initialize(ActiveAndroid.java:34)
at com.activeandroid.content.ContentProvider.onCreate(ContentProvider.java:39)
at android.content.ContentProvider.attachInfo(ContentProvider.java:1591)
at android.content.ContentProvider.attachInfo(ContentProvider.java:1562)
at android.app.ActivityThread.installProvider(ActivityThread.java:5233)
at android.app.ActivityThread.installContentProviders(ActivityThread.java:4827)
at android.app.ActivityThread.handleBindApplication(ActivityThread.java:4710)
at android.app.ActivityThread.access$1600(ActivityThread.java:174)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1367)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:146)
at android.app.ActivityThread.main(ActivityThread.java:5593)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:515)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1283)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1099)
at dalvik.system.NativeStart.main(Native Method)
Caused by: java.lang.ClassNotFoundException: Didn't find class "my.package.models.Transaction" on path: DexPathList[[zip file "/data/app/my.package-1.apk"],nativeLibraryDirectories=[/data/app-lib/my.package-1, /vendor/lib, /system/lib]]
at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:67)
at java.lang.ClassLoader.loadClass(ClassLoader.java:497)
at java.lang.ClassLoader.loadClass(ClassLoader.java:457)
However, for Android 5.0 and above it is working without any errors.
What is the reason and how can I fix it?
Note: there is a similar question on StackOverflow but it does not have any answers.
You can find the answer for this question here:
NoClassDefFoundError with Android Studio on Android 4
https://developer.android.com/studio/build/multidex
Try this
Just go to disable Instant Run Go to
File -> Settings -> Build,Execution, Deployment -> Instant Run ->
Uncheck the checkbox for instant run
Run your app once.

Crash on Android 4.2.2: java.lang.RuntimeException: Failed to finish input event. status=-11

I got a crash on Android 4.2.2.
Exception stack trace:
java.lang.RuntimeException: Failed to finish input event. status=-11
at android.view.InputEventReceiver.nativeFinishInputEvent(Native Method)
at android.view.InputEventReceiver.finishInputEvent(InputEventReceiver.java:152)
at android.view.ViewRootImpl.finishInputEvent(ViewRootImpl.java:5002)
at android.view.ViewRootImpl.deliverPointerEvent(ViewRootImpl.java:3787)
at android.view.ViewRootImpl.deliverInputEvent(ViewRootImpl.java:3654)
at android.view.ViewRootImpl.doProcessInputEvents(ViewRootImpl.java:4966)
at android.view.ViewRootImpl.enqueueInputEvent(ViewRootImpl.java:4926)
at android.view.ViewRootImpl$WindowInputEventReceiver.onInputEvent(ViewRootImpl.java:5085)
at android.view.InputEventReceiver.dispatchInputEvent(InputEventReceiver.java:190)
at android.os.MessageQueue.nativePollOnce(Native Method)
at android.os.MessageQueue.next(MessageQueue.java:128)
at android.os.Looper.loop(Looper.java:151)
at android.app.ActivityThread.main(ActivityThread.java:5468)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:525)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:936)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:703)
at dalvik.system.NativeStart.main(Native Method)
How can I solve this problem?
This is a known bug, see here in the google issue tracker :
https://code.google.com/p/android/issues/detail?id=108859

Android Studio 3.0 : canary 6 : android.content.res.Resources$NotFoundException inside Launching activity

I update android-studio 3.0 from canary 5 to canary 6 and suddenly My app gives crash on KitKat(API 19) with below stacktrace.
The Main2Activity.java:10 line is the first line in my activity onCreate() method.
07-11 13:00:39.523 8913-8913/dcpl.com.myapplication E/AndroidRuntime: FATAL EXCEPTION: main
Process: dcpl.com.myapplication, PID: 8913
java.lang.RuntimeException: Unable to start activity ComponentInfo{dcpl.com.myapplication/dcpl.com.myapplication.Main2Activity}: android.content.res.Resources$NotFoundException: Resource ID #0x7f070058
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2318)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2396)
at android.app.ActivityThread.access$800(ActivityThread.java:139)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1293)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:149)
at android.app.ActivityThread.main(ActivityThread.java:5257)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:515)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:817)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:633)
at dalvik.system.NativeStart.main(Native Method)
Caused by: android.content.res.Resources$NotFoundException: Resource ID #0x7f070058
at android.content.res.Resources.getValue(Resources.java:1173)
at android.support.v7.widget.AppCompatDrawableManager.loadDrawableFromDelegates(AppCompatDrawableManager.java:332)
at android.support.v7.widget.AppCompatDrawableManager.getDrawable(AppCompatDrawableManager.java:197)
at android.support.v7.widget.AppCompatDrawableManager.getDrawable(AppCompatDrawableManager.java:190)
at android.support.v7.widget.AppCompatDrawableManager.checkVectorDrawableSetup(AppCompatDrawableManager.java:711)
at android.support.v7.widget.AppCompatDrawableManager.getDrawable(AppCompatDrawableManager.java:195)
at android.support.v7.widget.TintTypedArray.getDrawableIfKnown(TintTypedArray.java:81)
at android.support.v7.app.AppCompatDelegateImplBase.<init>(AppCompatDelegateImplBase.java:131)
at android.support.v7.app.AppCompatDelegateImplV9.<init>(AppCompatDelegateImplV9.java:155)
at android.support.v7.app.AppCompatDelegateImplV11.<init>(AppCompatDelegateImplV11.java:31)
at android.support.v7.app.AppCompatDelegateImplV14.<init>(AppCompatDelegateImplV14.java:55)
at android.support.v7.app.AppCompatDelegate.create(AppCompatDelegate.java:205)
at android.support.v7.app.AppCompatDelegate.create(AppCompatDelegate.java:185)
at android.support.v7.app.AppCompatActivity.getDelegate(AppCompatActivity.java:519)
at android.support.v7.app.AppCompatActivity.setContentView(AppCompatActivity.java:140)
at dcpl.com.myapplication.Main2Activity.onCreate(Main2Activity.java:10)
at android.app.Activity.performCreate(Activity.java:5411)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1087)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2270)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2396) 
at android.app.ActivityThread.access$800(ActivityThread.java:139) 
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1293) 
at android.os.Handler.dispatchMessage(Handler.java:102) 
at android.os.Looper.loop(Looper.java:149) 
at android.app.ActivityThread.main(ActivityThread.java:5257) 
at java.lang.reflect.Method.invokeNative(Native Method) 
at java.lang.reflect.Method.invoke(Method.java:515) 
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:817) 
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:633) 
at dalvik.system.NativeStart.main(Native Method) 
How can I solve it?
Seems like the issue is related to Aapt 2.
Put
android.enableAapt2=false
In your gradle.properties file and it fixes the issue for me.
I have the same issue.
put
android.enableAapt2=false
AAPT2. We are continuing to stabilize AAPT2 which enables incremental resource processing. If your build fails due to resource processing issue, please send us a bug report. To temporarily disable AAPT, set android.enableAapt2=false in your gradle.properties file.
Roboelectric is currently not compatible with AAPT2
follow the below link
https://androidstudio.googleblog.com/2017/06/android-studio-30-canary-5-is-now.html
I had the same problem. To solve it, just update to Android Studio 3.0 Canary 7.
Fixes:
63623801 ResourceNotFoundException running Kotlin project on API 16 AVD after upgrading to Canary 6
Release notes
add this code in my project
android.enableAapt2=false
solved one of my issues: with Android Studio 3.0 : canary 6, Gen a signed APK by default which can't parsered by "AXmlResourceParser.java"(axmlprinter2-2.0.jar)

When I import Google`s UniversalMusicPlayer to my android studio, it crashed

I am a newcomer who want to learn android.My friend suggested me to read the code of that player,but when I imported the project and compiled it,it crashed...
12-22 20:58:07.755 4870-4870/com.example.android.uamp
E/AndroidRuntime: FATAL EXCEPTION: main Process:
com.example.android.uamp, PID: 4870 java.lang.RuntimeException: Unable
to start activity
ComponentInfo{com.example.android.uamp/com.example.android.uamp.ui.MusicPlayerActivity}:
java.lang.RuntimeException: com.google.android.gms.internal.zzsb$zza:
No acceptable module found. Local version is 0 and remote version is
0. at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2448)
at
android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2510)
at android.app.ActivityThread.access$1200(ActivityThread.java:163) at
android.app.ActivityThread$H.handleMessage(ActivityThread.java:1371)
at android.os.Handler.dispatchMessage(Handler.java:102) at
android.os.Looper.loop(Looper.java:135) at
android.app.ActivityThread.main(ActivityThread.java:5595) 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:960)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:755) Caused
by: java.lang.RuntimeException:
com.google.android.gms.internal.zzsb$zza: No acceptable module found.
Local version is 0 and remote version is 0. at
com.google.android.gms.internal.zzni.zzbg(Unknown Source) at
com.google.android.gms.internal.zzni.zza(Unknown Source) at
com.google.android.gms.cast.framework.CastContext.(Unknown
Source) at
com.google.android.gms.cast.framework.CastContext.getSharedInstance(Unknown
Source) at
com.example.android.uamp.ui.ActionBarCastActivity.onCreate(ActionBarCastActivity.java:141)
at
com.example.android.uamp.ui.BaseActivity.onCreate(BaseActivity.java:49)
at
com.example.android.uamp.ui.MusicPlayerActivity.onCreate(MusicPlayerActivity.java:57)
at android.app.Activity.performCreate(Activity.java:6100) at
android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1109)
at
android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2401)
at
android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2510)
at android.app.ActivityThread.access$1200(ActivityThread.java:163) at
android.app.ActivityThread$H.handleMessage(ActivityThread.java:1371)
at android.os.Handler.dispatchMessage(Handler.java:102) at
android.os.Looper.loop(Looper.java:135) at
android.app.ActivityThread.main(ActivityThread.java:5595) 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:960)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:755)
Caused by: com.google.android.gms.internal.zzsb$zza: No acceptable
module found. Local version is 0 and remote version is 0. at
com.google.android.gms.internal.zzsb.zza(Unknown Source) at
com.google.android.gms.internal.zzni.zzbg(Unknown Source) at
com.google.android.gms.internal.zzni.zza(Unknown Source) at
com.google.android.gms.cast.framework.CastContext.(Unknown
Source) at
com.google.android.gms.cast.framework.CastContext.getSharedInstance(Unknown
Source) at
com.example.android.uamp.ui.ActionBarCastActivity.onCreate(ActionBarCastActivity.java:141)
at
com.example.android.uamp.ui.BaseActivity.onCreate(BaseActivity.java:49)
at
com.example.android.uamp.ui.MusicPlayerActivity.onCreate(MusicPlayerActivity.java:57)
at android.app.Activity.performCreate(Activity.java:6100) at
android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1109)
at
android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2401)
at
android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2510)
at android.app.ActivityThread.access$1200(ActivityThread.java:163) at
android.app.ActivityThread$H.handleMessage(ActivityThread.java:1371)
at android.os.Handler.dispatchMessage(Handler.java:102) at
android.os.Looper.loop(Looper.java:135) at
android.app.ActivityThread.main(ActivityThread.java:5595) 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:960)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:755)
Well,when I searched for answers,the responses were not useful...
And if you have some wonderful open source project to recommend ,hope you can tell me.Thx.
Sorry for my poor english...
You need to update your google play service of device.
You can see this Bug report which already has been addressed
and possibility you will have to update your gcm dependency then appropriate modifications of code will also required mean the deprecated methods will be needed to replaced with new one in the project for e.g GoogleApiAvailability to register token etc so also make sure you are using the latest gcm dependency in your project

Cocos2d-x v3.7.1 Unfortunately, libcocos2dx has stopped

I'm compiling a new project through proj.android-studio using:
cocos compile -p android --android-studio
But when I start app on android device, it shows me a message:
Unfortunately, libcocos2dx has stopped
Can you help me? What I'm doing wrong?
Here is logcat:
09-07 12:07:47.711 23074-23074/? E/AndroidRuntime﹕ FATAL EXCEPTION: main
Process: org.cocos2dx.TestGame, PID: 23074
java.lang.UnsatisfiedLinkError: dlopen failed: cannot locate symbol "srand" referenced by "libcocos2dcpp.so"...
at java.lang.Runtime.loadLibrary(Runtime.java:371)
at java.lang.System.loadLibrary(System.java:553)
at org.cocos2dx.lib.Cocos2dxActivity.onLoadNativeLibraries(Cocos2dxActivity.java:288)
at org.cocos2dx.lib.Cocos2dxActivity.onCreate(Cocos2dxActivity.java:303)
at android.app.Activity.performCreate(Activity.java:5343)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1088)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2331)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2429)
at android.app.ActivityThread.access$800(ActivityThread.java:151)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1342)
at android.os.Handler.dispatchMessage(Handler.java:110)
at android.os.Looper.loop(Looper.java:193)
at android.app.ActivityThread.main(ActivityThread.java:5341)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:515)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:825)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:641)
at dalvik.system.NativeStart.main(Native Method)
Usually the app stops working if your code contains errors.
Are there errors in your code? What does the LogCat say?

Categories

Resources