Hello get this error when i try to set the Mobile.Droid project to release and build, this error does not occur in debug mode.
Severity Code Description Project File Line Suppression State Error "java.exe" exited with code 1. NOOR.Sched.Mobile.Droid
30 Answer(s)
-
0
Hi @avanekar02, can you share the full error stack trace instead of Visual Studio build error?
-
0
sent as email
-
0
hi @avanekar02 you've sent the wrong logs. you sent the web logs. but we need your Xamarin logs.
Show your "Device Logs" https://medium.com/volosoft/challenges-of-developing-xamarin-application-c2bfba6bbe49
-
0
by the way don't forget to
- close your visual studio
- delete all bin & obj folders
-
0
your error says
" Could not load assembly 'NOOR.Sched.Mobile.Shared, Version=0.0.0.0, Culture=neutral, PublicKeyToken='. Perhaps it doesn't exist in the Mono for Android profile? File name: 'NOOR.Sched.Mobile.Shared.dll"
-> Close the solution -> Delete all contents of the Packages folder (all the DLL's referenced through Nuget) -> Restart the solution -> Build (this will cause Nuget to get all DLL's again based on the packages.config)
-
0
this is the droid emulator log
Time Device Name Type PID Tag Message 12-26 21:56:00.039 5" KitKat (4.4) XXHDPI Phone Debug 684 OpenGLRenderer GL error from OpenGLRenderer: 0x502 GL_INVALID_OPERATION 12-26 21:55:00.051 5" KitKat (4.4) XXHDPI Phone Debug 684 OpenGLRenderer GL error from OpenGLRenderer: 0x502 GL_INVALID_OPERATION 12-26 21:55:00.031 5" KitKat (4.4) XXHDPI Phone Debug 684 OpenGLRenderer GL error from OpenGLRenderer: 0x502 GL_INVALID_OPERATION 12-26 21:54:00.031 5" KitKat (4.4) XXHDPI Phone Debug 684 OpenGLRenderer GL error from OpenGLRenderer: 0x502 GL_INVALID_OPERATION 12-26 21:53:22.231 5" KitKat (4.4) XXHDPI Phone Error 2637 cutils-trace Error opening trace file: No such file or directory (2) 12-26 21:53:00.067 5" KitKat (4.4) XXHDPI Phone Debug 684 OpenGLRenderer GL error from OpenGLRenderer: 0x502 GL_INVALID_OPERATION 12-26 21:52:00.031 5" KitKat (4.4) XXHDPI Phone Debug 684 OpenGLRenderer GL error from OpenGLRenderer: 0x502 GL_INVALID_OPERATION 12-26 21:51:00.035 5" KitKat (4.4) XXHDPI Phone Debug 684 OpenGLRenderer GL error from OpenGLRenderer: 0x502 GL_INVALID_OPERATION 12-26 21:50:00.031 5" KitKat (4.4) XXHDPI Phone Debug 684 OpenGLRenderer GL error from OpenGLRenderer: 0x502 GL_INVALID_OPERATION 12-26 21:49:00.031 5" KitKat (4.4) XXHDPI Phone Debug 684 OpenGLRenderer GL error from OpenGLRenderer: 0x502 GL_INVALID_OPERATION 12-26 21:48:00.031 5" KitKat (4.4) XXHDPI Phone Debug 684 OpenGLRenderer GL error from OpenGLRenderer: 0x502 GL_INVALID_OPERATION 12-26 21:47:00.051 5" KitKat (4.4) XXHDPI Phone Debug 684 OpenGLRenderer GL error from OpenGLRenderer: 0x502 GL_INVALID_OPERATION 12-26 21:46:00.031 5" KitKat (4.4) XXHDPI Phone Debug 684 OpenGLRenderer GL error from OpenGLRenderer: 0x502 GL_INVALID_OPERATION 12-26 21:45:00.035 5" KitKat (4.4) XXHDPI Phone Debug 684 OpenGLRenderer GL error from OpenGLRenderer: 0x502 GL_INVALID_OPERATION 12-26 21:44:00.035 5" KitKat (4.4) XXHDPI Phone Debug 684 OpenGLRenderer GL error from OpenGLRenderer: 0x502 GL_INVALID_OPERATION 12-26 21:43:27.963 5" KitKat (4.4) XXHDPI Phone Debug 684 OpenGLRenderer GL error from OpenGLRenderer: 0x502 GL_INVALID_OPERATION 12-26 21:43:27.467 5" KitKat (4.4) XXHDPI Phone Debug 684 OpenGLRenderer GL error from OpenGLRenderer: 0x502 GL_INVALID_OPERATION 12-26 21:43:27.363 5" KitKat (4.4) XXHDPI Phone Warning 465 InputDispatcher channel 'a92de3f0 com.NOOR.Sched.Mobile/md5060ecd88fbc720cb91538ef1be49b529.MainActivity (server)' ~ Consumer closed input channel or an error occurred. events=0x9 12-26 21:43:27.363 5" KitKat (4.4) XXHDPI Phone Warning 465 InputDispatcher channel 'a95ec580 com.NOOR.Sched.Mobile/md5060ecd88fbc720cb91538ef1be49b529.MainActivity (server)' ~ Consumer closed input channel or an error occurred. events=0x9 12-26 21:43:27.363 5" KitKat (4.4) XXHDPI Phone Warning 465 InputDispatcher channel 'a9321628 com.NOOR.Sched.Mobile/md5b1fbf151df79157c2b8e8322a07616d6.SplashActivity (server)' ~ Consumer closed input channel or an error occurred. events=0x9 12-26 21:43:27.283 5" KitKat (4.4) XXHDPI Phone Error 2571 cutils-trace Error opening trace file: No such file or directory (2) 12-26 21:34:43.151 5" KitKat (4.4) XXHDPI Phone Error 2505 cutils-trace Error opening trace file: No such file or directory (2) 12-26 21:34:40.899 5" KitKat (4.4) XXHDPI Phone Error 2480 cutils-trace Error opening trace file: No such file or directory (2) 12-26 21:34:40.483 5" KitKat (4.4) XXHDPI Phone Error 2468 cutils-trace Error opening trace file: No such file or directory (2) 12-26 21:34:31.659 5" KitKat (4.4) XXHDPI Phone Error 2442 cutils-trace Error opening trace file: No such file or directory (2) 12-26 21:34:31.339 5" KitKat (4.4) XXHDPI Phone Error 2427 cutils-trace Error opening trace file: No such file or directory (2) 12-26 21:34:31.063 5" KitKat (4.4) XXHDPI Phone Error 2411 cutils-trace Error opening trace file: No such file or directory (2) 12-26 21:34:30.731 5" KitKat (4.4) XXHDPI Phone Error 2394 cutils-trace Error opening trace file: No such file or directory (2) 12-26 21:34:21.499 5" KitKat (4.4) XXHDPI Phone Error 2364 cutils-trace Error opening trace file: No such file or directory (2) 12-26 21:34:21.431 5" KitKat (4.4) XXHDPI Phone Error 2363 cutils-trace Error opening trace file: No such file or directory (2) 12-26 21:34:20.919 5" KitKat (4.4) XXHDPI Phone Error 2349 cutils-trace Error opening trace file: No such file or directory (2) 12-26 21:34:00.035 5" KitKat (4.4) XXHDPI Phone Debug 684 OpenGLRenderer GL error from OpenGLRenderer: 0x502 GL_INVALID_OPERATION 12-26 21:33:45.035 5" KitKat (4.4) XXHDPI Phone Error 2335 cutils-trace Error opening trace file: No such file or directory (2) 12-26 21:33:43.151 5" KitKat (4.4) XXHDPI Phone Debug 684 OpenGLRenderer GL error from OpenGLRenderer: 0x502 GL_INVALID_OPERATION 12-26 21:33:42.731 5" KitKat (4.4) XXHDPI Phone Debug 684 OpenGLRenderer GL error from OpenGLRenderer: 0x502 GL_INVALID_OPERATION 12-26 21:33:42.567 5" KitKat (4.4) XXHDPI Phone Error 2319 cutils-trace Error opening trace file: No such file or directory (2)
-
0
-
0
As you see from the logs there's a problem in MainActivity and SplashActivity
Consumer closed input channel or an error occurred
For the error try this solution https://stackoverflow.com/a/41453711/1767482
But my recommendation; run it on Debug mode but if you want to see the application in release mode you need to publish it as APK. See the official docs about how to create your APK. https://docs.microsoft.com/en-us/xamarin/android/deploy-test/release-prep/?tabs=windows
-
0
Still face the same problem even after following the above step, please request you to treat this as urgent.
regards Anwar
-
0
Building in release mode does not make your app ready for publish! As I recommended you before, you need to archieve the Xamarin application. Application archieving makes it compiled in RELEASE mode. You don't need to set your mode to DEBUG.
https://blog.xamarin.com/android-archiving-and-publishing-made-easy/ https://docs.microsoft.com/en-us/xamarin/android/deploy-test/release-prep/?tabs=windows#archive-for-publishing
PS: The error message
Java exited with code 1
doesn't explain the real problem. It's the generic error message of Android. You need to write the full error stack. -
0
-
0
-
0
-
0
-
0
will not unchecking proguard and setting linking to none will result in increase of output file size...
-
0
did as per your suggestion it now states "java.exe exited with code 2
-
0
you are using a 3rd party library and seems like an invalid usage. to narrow down the issue, comment out all
CometChat
code. -
0
the changes are made in the mobile shared project , and that builds fine, the references to dll of cometchat are added in the dorid project other then that there is no changes in the droid project.
-
0
-
0
did you remove the reference for cometchat from Droid project....or you deleted all cometchat code from shared project and then compiled
-
0
i commented the cometchat code and excluded class files, removed dll references but it still gives me the same error "Java.exe exited with code 1"
-
0
can you send me this project that you used, the entire source.
regards Anwar
-
0
Your working project has been shared on Google Drive with your e-mail address.
-
0
downloaded my project but when i compile it givesme this 8 errors, i deleted bin,obj and build solution
Severity Code Description Project File Line Suppression State Error No resource found that matches the given name (at 'background' with value '@drawable/cc_rounded_corners'). NOOR.Sched.Mobile.Droid C:\Users\Apple\Documents\Sched\src\NOOR.Sched.Mobile.Droid\obj\Debug\MonoAndroid81\lp\12\jl\res\layout\cc_activity_status_message.xml 2 Error No resource found that matches the given name (at 'background' with value '@drawable/cc_rounded_corners'). NOOR.Sched.Mobile.Droid C:\Users\Apple\Documents\Sched\src\NOOR.Sched.Mobile.Droid\obj\Debug\MonoAndroid81\lp\12\jl\res\layout\cc_activity_status_message.xml 2 Error No resource found that matches the given name (at 'layout_width' with value '@dimen/profile_image_size'). NOOR.Sched.Mobile.Droid C:\Users\Apple\Documents\Sched\src\NOOR.Sched.Mobile.Droid\obj\Debug\MonoAndroid81\lp\12\jl\res\layout\cc_activity_viewuserprofile.xml 2 Error No resource found that matches the given name (at 'layout_marginTop' with value '@dimen/profile_margin'). NOOR.Sched.Mobile.Droid C:\Users\Apple\Documents\Sched\src\NOOR.Sched.Mobile.Droid\obj\Debug\MonoAndroid81\lp\12\jl\res\layout\cc_activity_viewuserprofile.xml 2 Error No resource found that matches the given name (at 'layout_height' with value '@dimen/profile_image_size'). NOOR.Sched.Mobile.Droid C:\Users\Apple\Documents\Sched\src\NOOR.Sched.Mobile.Droid\obj\Debug\MonoAndroid81\lp\12\jl\res\layout\cc_activity_viewuserprofile.xml 2 Error No resource found that matches the given name (at 'layout_width' with value '@dimen/profile_image_size'). NOOR.Sched.Mobile.Droid C:\Users\Apple\Documents\Sched\src\NOOR.Sched.Mobile.Droid\obj\Debug\MonoAndroid81\lp\12\jl\res\layout\cc_activity_view_profile.xml 9 Error No resource found that matches the given name (at 'layout_height' with value '@dimen/profile_image_size'). NOOR.Sched.Mobile.Droid C:\Users\Apple\Documents\Sched\src\NOOR.Sched.Mobile.Droid\obj\Debug\MonoAndroid81\lp\12\jl\res\layout\cc_activity_view_profile.xml 9 Error No resource found that matches the given name (at 'layout_marginTop' with value '@dimen/profile_margin'). NOOR.Sched.Mobile.Droid C:\Users\Apple\Documents\Sched\src\NOOR.Sched.Mobile.Droid\obj\Debug\MonoAndroid81\lp\12\jl\res\layout\cc_activity_view_profile.xml 9
-
0
alper is it possible for you to login using teamviewer to check my code.