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
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
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
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
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
hi @avanekar02,
I already compiled your solution, archieved and took a screenshot to show it's working on my machine, also sent a copy of working solution to you. That means there's no problem related with the code. So you need to find out what's missing in your machine configuration. Uninstall your Visual Studio and install the latest Visual Studio. Install all components of Xamarin. Install latest Android SDK to your machine.
-
0
By the way, I guess you still check
Enable Proguard
option on Android Options window. Proguard obfuscates Java code and removes/renames some resources (and sometimes makes mistakes while finding the references when reflection is being used) that's why you see these errors: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
Proguard should be enabled very carefully. You have to configure Proguard to not obfuscate these sensitive names. Before enabling Proguard, learn more about how it works, how you can skip these errors. https://docs.microsoft.com/en-us/xamarin/android/deploy-test/release-prep/?tabs=windows#proguard
Lastly, watch the video to check out how we successfully archieve and package your Xamarin app: https://vimeo.com/310492853
-
0
Hello Alper
i uninstalled VS 2017, reinstalled it , installed all latest ,
unchecked proguard and tried to compile the droid project i still get the same 8 errors,
that i have put up on the issue.can you please logon to mys system using teamviewer to assist me in the same.
regards Anwar
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\81\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\81\lp\12\jl\res\layout\cc_activity_status_message.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\81\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\81\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\81\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\81\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\81\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\81\lp\12\jl\res\layout\cc_activity_view_profile.xml 9