Code Monkey home page Code Monkey logo

Comments (22)

RohitSurwase avatar RohitSurwase commented on May 27, 2024

Please make sure you have added dependencies to the project level build.gradle and the app level build.gradle. After that, you need to initialize UCE-Handler in your Application class's onCreate().

If you have already done this try disabling ( .setUCEHEnabled(false) ) the library and see if your app works (it should show default crash dialog).
Additionally, can you share the logs?

from uce-handler.

Caceresenzo avatar Caceresenzo commented on May 27, 2024

I don't use Android Studio with Gradle, I use Eclipse Android Developement Tool

That work the shame but ADT don't support gradle, so you have to import all project yourself and say you want to add them to your project, and that work perfeclty fine

By disabling your library with .setUCEHEnabled(false), the default crash "Stopped working" message show again;

But if i remove this line, the app just froze and stay like this (it become black most of the time)

Here is logcat output of my application: (Put in pastebin, because that was not practical)
https://pastebin.com/8g5gSBLR

As you can see, your handler has been called but nothing append

And here is my Application class (defined in the AndroidManifest.xml)
image

from uce-handler.

RohitSurwase avatar RohitSurwase commented on May 27, 2024

So if you are using ADT, make sure after you download the project, import only "uce_handler" out of it. That's what you will need. I'll look into the logs and get back to you.

from uce-handler.

Caceresenzo avatar Caceresenzo commented on May 27, 2024

I am already importing only the uce_handler. I even check if the libs was depending of any libs

  • Enzo

from uce-handler.

RohitSurwase avatar RohitSurwase commented on May 27, 2024

Are you using any other custom exception handler? or similar library for the same?
Please make sure if you are not doing something in wrong way. As apart from your app, the included example app should definitely work if used as it is.
I have even tried causing an exception (as you have) in the library but still, it is not freezing as you are experiencing.

from uce-handler.

Caceresenzo avatar Caceresenzo commented on May 27, 2024

I am not using any other libraries

I try with your example app, because i was not understanding why that was not working
So i imported it into eclipse, add appcompat and your libraries, but the example app freeze too..

If you want i can export you your example app and you will see by yourself

I think i forgot to mention that the only difference with our 2 example compiled app, was the fact that my app used the AppTheme (i was forced to put minSdk to 21 and targetSdk to 27, otherwise eclipse wasn't compiling because he found that if no sdk information was provided, the default was 0 or 1, and throw an exception saying that this version don't support Runtime Permission)

  • Enzo

from uce-handler.

RohitSurwase avatar RohitSurwase commented on May 27, 2024

If you don't mind, please share the example app.
The minSdkVersion of the library is 14.

from uce-handler.

Caceresenzo avatar Caceresenzo commented on May 27, 2024

http://caceresenzo.esy.es/repo/enzo/code/test/Android.App.HandlerTest.apkx

(sorry but this host don't allow .apk file or .exe file on their site, i just rename the file extension)
(and btw, this application is not signed)

from uce-handler.

RohitSurwase avatar RohitSurwase commented on May 27, 2024

Thanks but I was asking about the source of the example app which you have modified and not working. Share the compressed file with me.

from uce-handler.

Caceresenzo avatar Caceresenzo commented on May 27, 2024

http://caceresenzo.esy.es/repo/enzo/code/test/Android.App.HandlerTest.7z

(the project name was Android.App.ExpandableLayoutTest or something like that, because i use this example project and remove everything and use this project for your example app (i was lazy creating a new project))

from uce-handler.

RohitSurwase avatar RohitSurwase commented on May 27, 2024

The source of the example app you have shared does not have the library as a module included. Please review your project setup once again. I have tested it several times with different scenarios nothing happing like yours. Another thing, a suggestion, try upgrading to Android Studio.

I am closing this issue as it is either because of wrong setup or deprecated Eclipse and APT.

from uce-handler.

Caceresenzo avatar Caceresenzo commented on May 27, 2024

Check out the project.properties file, all libraries are here!

from uce-handler.

RohitSurwase avatar RohitSurwase commented on May 27, 2024

Yes, correct me if I'm wrong, you have imported the project but not the library, the library is in submodule
compile 'com.github.RohitSurwase.UCE-Handler:uce_handler:1.3'
I have not used eclipse for ages so cannot be sure.

from uce-handler.

Caceresenzo avatar Caceresenzo commented on May 27, 2024

With eclipse, a library is a project that you need to configure "As Library", eclipse will do all the work if you tell him (with project.properties (with a GUI)) to use this libraries, the compilation will exactly do the same as android studio for the "compile 'com.github.RohitSurwase.UCE-Handler:uce_handler:1.3'" thing

Eclipse work fine with lib, just as an example, my main project depend of 12 another libraries (interpreted as independant project by eclipse)

from uce-handler.

RohitSurwase avatar RohitSurwase commented on May 27, 2024

Okay, let me try it another way, share your main app's crash log without adding the library or disabling the library.
By the way, I still doubt why the default example is not working in your case.

from uce-handler.

Caceresenzo avatar Caceresenzo commented on May 27, 2024

I removed your library of my project, and re-add the "crash" back

my code is just when my second activity start, it throw an exception
@Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_video); <... code ...> throw new RuntimeException(); }

so here the crahs report:
https://pastebin.com/waMrfTC4

EDIT: code seems to not format, sorry

from uce-handler.

RohitSurwase avatar RohitSurwase commented on May 27, 2024

It looks like your main app is causing out of memory exception because of the library. Maybe your device is not able to hold the stack trace in the memory. Try increasing the heap size temporary like largeHeap="true" And tell me the result.

from uce-handler.

Caceresenzo avatar Caceresenzo commented on May 27, 2024

I got 2 devices, one is running android 8 (2gb ram) and the other one 5.1 (1gb ram), i have tested on both phone, and the same result occure, the app just froze...

I just added the largeHeap="true" to the android manifest but the result stay like before

  • Enzo

from uce-handler.

RohitSurwase avatar RohitSurwase commented on May 27, 2024

In that case no luck for both of us. I can not reproduce it on my side, different IDE environment. You are doing your best. The library is tested multiple times and also being used by many without any issues. Thanks for reporting the issue though.

from uce-handler.

Caceresenzo avatar Caceresenzo commented on May 27, 2024

Even if the problem persist, thanks you for your time helping me!

I will try to do thing tomorow, i will come to post solution, if any, as soon as possible

from uce-handler.

Caceresenzo avatar Caceresenzo commented on May 27, 2024

FOUND!!!!!!!!!!!!!!!!

Eclipse ADT is pretty old and not maintained, SO HERE THS FUC*ING SOLUTION:

I edit a lot your code, searching what could cause this error;
After 1 hour, i found that application.startActivitity(intent); was blocking!

Soooooooooooooooooooooooo,
Why this operation was blocking ? I tried to do the instruction in a thread and found that was because the instruction was crashing the thread again.
And the reason was simple, because Your Library Activity was NOT registered! Eclipse ADT is capable to mix R.java file, but is NOT capable (yet i think) to mix AndroidManifest.xml...

image

And it finally work! Thanks you!

But can you edit your Readme.rm to say that if the developer is using Eclipse ADT, he need to register, BY HAND, your crash report activity!

Thanks for you libs, he will be helpful!

from uce-handler.

RohitSurwase avatar RohitSurwase commented on May 27, 2024

Yes! Of course, I will add this suggestion to README file.
Thanks for replying your solution.
I hope soon you will start using Android Studio as your default IDE.

from uce-handler.

Related Issues (8)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.