kiwix / kiwix-xulrunner

[ARCHIVED] Legacy Kiwix desktop solution for Windows/macOS/Linux
https://download.kiwix.org/release/kiwix-xulrunner/
GNU General Public License v3.0
112 stars 28 forks source link

Android Custom app generation seems to be broken #451

Closed kelson42 closed 7 years ago

kelson42 commented 7 years ago
$ ./gen-custom-android-build.py custom/phet/info.json 
INFO:__main__:Your are now building PhET version 2016-06 at /home/kelson/kiwix/android-custom-4bIFb1 for content.zim
-----------
convert /home/kelson/kiwix/android-custom-4bIFb1/ic_launcher_512.png -resize 96x96 /home/kelson/kiwix/android-custom-4bIFb1/res/mipmap-xhdpi/kiwix_icon.png
-----------
-----------
convert /home/kelson/kiwix/android-custom-4bIFb1/ic_launcher_512.png -resize 96x96 /home/kelson/kiwix/android-custom-4bIFb1/res/drawable-xhdpi/ic_kiwix_widget.png
-----------
-----------
convert /home/kelson/kiwix/android-custom-4bIFb1/ic_launcher_512.png -resize 256x256 /home/kelson/kiwix/android-custom-4bIFb1/res/drawable/kiwix_icon_with_title.png
-----------
-----------
convert /home/kelson/kiwix/android-custom-4bIFb1/ic_launcher_512.png -resize 72x72 /home/kelson/kiwix/android-custom-4bIFb1/res/mipmap-hdpi/kiwix_icon.png
-----------
-----------
convert /home/kelson/kiwix/android-custom-4bIFb1/ic_launcher_512.png -resize 72x72 /home/kelson/kiwix/android-custom-4bIFb1/res/drawable-hdpi/ic_kiwix_widget.png
-----------
-----------
convert /home/kelson/kiwix/android-custom-4bIFb1/ic_launcher_512.png -resize 256x256 /home/kelson/kiwix/android-custom-4bIFb1/res/drawable/kiwix_icon_with_title.png
-----------
-----------
convert /home/kelson/kiwix/android-custom-4bIFb1/ic_launcher_512.png -resize 192x192 /home/kelson/kiwix/android-custom-4bIFb1/res/mipmap-xxxhdpi/kiwix_icon.png
-----------
-----------
convert /home/kelson/kiwix/android-custom-4bIFb1/ic_launcher_512.png -resize 192x192 /home/kelson/kiwix/android-custom-4bIFb1/res/drawable-xxxhdpi/ic_kiwix_widget.png
-----------
-----------
convert /home/kelson/kiwix/android-custom-4bIFb1/ic_launcher_512.png -resize 256x256 /home/kelson/kiwix/android-custom-4bIFb1/res/drawable/kiwix_icon_with_title.png
-----------
-----------
convert /home/kelson/kiwix/android-custom-4bIFb1/ic_launcher_512.png -resize 144x144 /home/kelson/kiwix/android-custom-4bIFb1/res/mipmap-xxhdpi/kiwix_icon.png
-----------
-----------
convert /home/kelson/kiwix/android-custom-4bIFb1/ic_launcher_512.png -resize 144x144 /home/kelson/kiwix/android-custom-4bIFb1/res/drawable-xxhdpi/ic_kiwix_widget.png
-----------
-----------
convert /home/kelson/kiwix/android-custom-4bIFb1/ic_launcher_512.png -resize 256x256 /home/kelson/kiwix/android-custom-4bIFb1/res/drawable/kiwix_icon_with_title.png
-----------
-----------
convert /home/kelson/kiwix/android-custom-4bIFb1/ic_launcher_512.png -resize 72x72 /home/kelson/kiwix/android-custom-4bIFb1/res/mipmap-mdpi/kiwix_icon.png
-----------
-----------
convert /home/kelson/kiwix/android-custom-4bIFb1/ic_launcher_512.png -resize 72x72 /home/kelson/kiwix/android-custom-4bIFb1/res/drawable-mdpi/ic_kiwix_widget.png
-----------
-----------
convert /home/kelson/kiwix/android-custom-4bIFb1/ic_launcher_512.png -resize 256x256 /home/kelson/kiwix/android-custom-4bIFb1/res/drawable/kiwix_icon_with_title.png
-----------
Traceback (most recent call last):
  File "./gen-custom-android-build.py", line 737, in <module>
    main(jspath, **options)
  File "./gen-custom-android-build.py", line 681, in main
    step_func(jsdata, **options)
  File "./gen-custom-android-build.py", line 361, in step_update_xml_nodes
    soup = soup = BeautifulSoup(open(toolbar_xml, 'r'),
IOError: [Errno 2] No such file or directory: u'/home/kelson/kiwix/android-custom-4bIFb1/res/layout/toolbar.xml'
kelson42 commented 7 years ago

@EladKeyshawn @borisfba @mhutti1 Any idea?

mhutti1 commented 7 years ago

@kelson42 Yeah its a small python change testing the fix now.

EladKeyshawn commented 7 years ago

@mhutti1 I've seen you did something with the toolbar recently. So it somehow doesn't find toolbar.xml

mhutti1 commented 7 years ago

@EladKeyshawn Yeah needed to make lots of UI xml changes. Its a simple fix but I'm still debuging.

EladKeyshawn commented 7 years ago

@mhutti1 Yeah I know.. anyways I've added file existence check in 621ca42 @kelson42

mhutti1 commented 7 years ago

@EladKeyshawn Yeah but this will now just move the crash to runtime.

EladKeyshawn commented 7 years ago

@mhutti1 You're right maybe i'll just catch the exception and print better log

mhutti1 commented 7 years ago

@EladKeyshawn I needed to rollback our libraries a bit. I had to downgrade the package in https://github.com/kiwix/kiwix/commit/ca22e01028cd64059d5e5f3a8cea8209032c9fa0 hopefully it will still work fine.

mhutti1 commented 7 years ago

@EladKeyshawn No it doesn't compile as we can't use the latest version of the library you imported and I have had to roll it back. You are going to need to fix/revert the bookmark activity that as it currently stops the whole app from building.

mhutti1 commented 7 years ago

@EladKeyshawn Or you can repackage the android sdk so @kelson42 can upgrade our download page and we can update our gradle version so that we can upgrade our support libraries.

EladKeyshawn commented 7 years ago

@mhutti1 Can you tell me which exact line I imported causes the problem? and what's the error log

EladKeyshawn commented 7 years ago

@mhutti1 I removed now one unused dependency even though I don't think it's the one which causes the problem as it supports down to minSdk14

kelson42 commented 7 years ago

@mhutti1 @EladKeyshawn thx but it seems to die later now

* What went wrong:
A problem occurred configuring root project 'android-custom-FwBbe7'.
> Could not find recyclerview-v7.jar (com.android.support:recyclerview-v7:24.1.0).
  Searched in the following locations:
      https://jcenter.bintray.com/com/android/support/recyclerview-v7/24.1.0/recyclerview-v7-24.1.0.jar
kelson42 commented 7 years ago

@EladKeyshawn Can you please rollback your last changes? It's too late for 2.2 to introduce this kind of changes. I see it like this:

EladKeyshawn commented 7 years ago

@kelson42 Yes but I think it's a pretty simple change and a great improvement for user experience. I can roll back, but I just merged locally, rolled back my last added dependency to previous version and tested and it still worked perfectly.

EladKeyshawn commented 7 years ago

@kelson42 Do you still want me to roll back or try to work it through?

kelson42 commented 7 years ago

@EladKeyshawn It's really late to make such important changes. If you are confident your last commits won't brake anything, just make the necessary to get it compiling (with gen-custom-android-build.py). Otherwise remove it from "master'. It's really important now we go ahead with the release of 2.2

EladKeyshawn commented 7 years ago

@kelson42 I have some problems with compiling it on my local machine since some of the commands won't work on osx

EladKeyshawn commented 7 years ago

@mhutti1 I reverted the bookmarks back as before and I noticed something weird with the toolbar you changed, now when the context menu appear you could still see the main one behind it (the toolbar is slightly higher for some reason ).

mhutti1 commented 7 years ago

@EladKeyshawn Yeah I see that I will look into it.

mhutti1 commented 7 years ago

@kelson42 I have tested and its now fixed for me.