- Posts: 36
- Thank you received: 0
Microsoft Windows Phone 8.1 support ends (13 Jul 2017)
Microsoft has ended support for Windows Phone 8.1
Questions about Android development and PDF
Unable to open file on device with Android 5.1.1+
- petr.sklenicka
- Topic Author
- Offline
- Junior Member
-
Less
More
10 years 9 months ago #9918
by petr.sklenicka
Unable to open file on device with Android 5.1.1+ was created by petr.sklenicka
Hello,
I am using your library and I found some strange exception.
In case that I run my application on device with Android 5.0.1 and lower, it works great and no exception is thrown. When I try to run application on device with Android 5.1.1 and higher, above exception is thrown. I also tried this on emulator and exactly the same behavior.
In my application, I am targeting SDK version 22. Previously I was targeting SDK version 18 and it worked fine on all devices. Can you please check it and write me where the problem is?
Thank you in advance for your help.
Best regards,
Petr.
I am using your library and I found some strange exception.
Code:
Caused by: android.view.InflateException: Binary XML file line #7: Binary XML file line #7: Error inflating class com.radaee.reader.PDFReader
Caused by: android.view.InflateException: Binary XML file line #8: Binary XML file line #8: Error inflating class EditText
In case that I run my application on device with Android 5.0.1 and lower, it works great and no exception is thrown. When I try to run application on device with Android 5.1.1 and higher, above exception is thrown. I also tried this on emulator and exactly the same behavior.
In my application, I am targeting SDK version 22. Previously I was targeting SDK version 18 and it worked fine on all devices. Can you please check it and write me where the problem is?
Thank you in advance for your help.
Best regards,
Petr.
10 years 9 months ago #9919
by support
Replied by support on topic Unable to open file on device with Android 5.1.1+
Are you experiencing the issue within your application or using our demo?
Which device and conditions are you testing?
Which device and conditions are you testing?
- petr.sklenicka
- Topic Author
- Offline
- Junior Member
-
Less
More
- Posts: 36
- Thank you received: 0
10 years 9 months ago #9920
by petr.sklenicka
Replied by petr.sklenicka on topic Unable to open file on device with Android 5.1.1+
This issue is in my application.
I tested it on device Nexus 5 with Android 6 and exception has been thrown during opening the PDF file. Also I have tested it on emulator with Android 5.1.1 and Android 6. Exactly the same exception.
When I tested it on my Galaxy S4 with Android 5.0.1, it works fine as well as on emulator with KitKat (API 19). I also tested it on Motorola Xoom with Android 4.0.4 and on this device it worked without problems.
I tested it on device Nexus 5 with Android 6 and exception has been thrown during opening the PDF file. Also I have tested it on emulator with Android 5.1.1 and Android 6. Exactly the same exception.
When I tested it on my Galaxy S4 with Android 5.0.1, it works fine as well as on emulator with KitKat (API 19). I also tested it on Motorola Xoom with Android 4.0.4 and on this device it worked without problems.
10 years 9 months ago #9927
by Davide
Replied by Davide on topic Unable to open file on device with Android 5.1.1+
Hi,
can you reproduce it even with the demo library?
Can you please give us the complete log?
can you reproduce it even with the demo library?
Can you please give us the complete log?
- petr.sklenicka
- Topic Author
- Offline
- Junior Member
-
Less
More
- Posts: 36
- Thank you received: 0
10 years 9 months ago #9935
by petr.sklenicka
Replied by petr.sklenicka on topic Unable to open file on device with Android 5.1.1+
No, I am not able to reproduce it in your demo app.
See the attached log, please.
See the attached log, please.
- petr.sklenicka
- Topic Author
- Offline
- Junior Member
-
Less
More
- Posts: 36
- Thank you received: 0
10 years 9 months ago #9944
by petr.sklenicka
Replied by petr.sklenicka on topic Unable to open file on device with Android 5.1.1+
I finally found the problem.
Previously, I was targeting SDK version 18 and everything worked fine. When I started with targeting SDK version 22, this problem occurred.
I made some research and finally I found that problem is with EditText class, where is missing some 9pach drawable. So everything what I had to do is set style to EditText in my styles. It is important to set "android:background" attribute to EditText.
Previously, I was targeting SDK version 18 and everything worked fine. When I started with targeting SDK version 22, this problem occurred.
I made some research and finally I found that problem is with EditText class, where is missing some 9pach drawable. So everything what I had to do is set style to EditText in my styles. It is important to set "android:background" attribute to EditText.
Time to create page: 0.429 seconds