Author Topic: Trying to compile mupen64plus-ae  (Read 10694 times)

Offline abnormalwit

  • bit
  • Posts: 5
    • View Profile
Trying to compile mupen64plus-ae
« on: August 01, 2016, 03:02:02 PM »
I just want to play around with the code a bit but i can't get it running. It would be nice if someone has advice for me.
I set up everything (eclipse, sdk, ndk) and the native (C) mupen part compiles and the java code seems to compile also but the preference.jar library is not built. Eclipse shows me some errors in two resource files.

I've got errors in: C:\...\mupen64plus-ae\libs\extras\android\support\v14\preference\res\values\values.xml
and C:\...\mupen64plus-ae\libs\extras\android\support\v14\preference\res\values-v17\values-v17.xml

eclipse says:

Description   Resource   Path   Location   Type
error: Error retrieving parent for item: No resource found that matches the given name 'Preference.Category'.   values.xml   /mupen64plus-ae/libs/extras/android/support/v14/preference/res/values   line 10   Android AAPT Problem
error: Error retrieving parent for item: No resource found that matches the given name 'Preference.CheckBoxPreference'.   values.xml   /mupen64plus-ae/libs/extras/android/support/v14/preference/res/values   line 13   Android AAPT Problem
error: Error retrieving parent for item: No resource found that matches the given name 'Preference.FragmentList'.   values-v17.xml   /mupen64plus-ae/libs/extras/android/support/v14/preference/res/values-v17   line 5   Android AAPT Problem
error: Error retrieving parent for item: No resource found that matches the given name 'Preference.FragmentList'.   values.xml   /mupen64plus-ae/libs/extras/android/support/v14/preference/res/values   line 44   Android AAPT Problem
error: Error retrieving parent for item: No resource found that matches the given name 'PreferenceFragmentList'.   values-v17.xml   /mupen64plus-ae/libs/extras/android/support/v14/preference/res/values-v17   line 5   Android AAPT Problem
error: Error retrieving parent for item: No resource found that matches the given name 'PreferenceFragmentList'.   values.xml   /mupen64plus-ae/libs/extras/android/support/v14/preference/res/values   line 44   Android AAPT Problem
error: Error retrieving parent for item: No resource found that matches the given name 'PreferenceFragmentList'.   values.xml   /mupen64plus-ae/libs/extras/android/support/v14/preference/res/values   line 44   Android AAPT Problem
error: Error retrieving parent for item: No resource found that matches the given name 'PreferenceFragmentList'.   values.xml   /preference/res/values   line 44   Android AAPT Problem
The container 'Android Dependencies' references non existing library 'C:\...\mupen64plus-ae\libs\extras\android\support\v14\preference\bin\preference.jar'   mupen64plus-ae      Build path   Build Path Problem
The project cannot be built until build path errors are resolved   mupen64plus-ae      Unknown   Java Problem

I searched a bit and some guys on stackoverflow are indicating that this happens when a library was build for an other build target then the project... or at least i interpreted it that way (http://stackoverflow.com/questions/23231174/appcompat-v7-error-retrieving-parent-for-item-no-resource-found-that-matches-t [nofollow]).

The build target for "preference" and "mupen64plus-ae" is set to Android 6.0 and I think it's right this way.
I would be happy if someone has a suggestion on how I could get the project to compile.

Thx  ;D

Offline fzurita

  • Moderator
  • double
  • *****
  • Posts: 560
    • View Profile
Re: Trying to compile mupen64plus-ae
« Reply #1 on: August 01, 2016, 08:12:01 PM »
You should have two preference projects: ”preference” and ”preference-v14”. The preference one is the v7 one.

Offline abnormalwit

  • bit
  • Posts: 5
    • View Profile
Re: Trying to compile mupen64plus-ae
« Reply #2 on: August 02, 2016, 03:08:02 AM »
Hmm... strange, I only have one preference project. Do you think something went wrong while importing?
The projects that are listed are:

android-support-v7-appcompat
ExampleActivity
mupen64plus-ae
preference

well, on the filesystem there are two seperate folders
mupen64plus-ae\libs\extras\android\support\v7\preference
mupen64plus-ae\libs\extras\android\support\v14\preference

but in eclipse these two are mashed together to one project
(I havn't done much with eclipse jet, it's complexety confuses me a bit  ;) )

Offline fzurita

  • Moderator
  • double
  • *****
  • Posts: 560
    • View Profile
Re: Trying to compile mupen64plus-ae
« Reply #3 on: August 02, 2016, 08:44:10 AM »
Yeah, there should be two project. You should be able to import both project using File->Import.

Offline abnormalwit

  • bit
  • Posts: 5
    • View Profile
Re: Trying to compile mupen64plus-ae
« Reply #4 on: August 02, 2016, 09:55:30 AM »
Ok after fiddeling around with it the whole day I'm still not able to build everything, but I found out a few things.

It's not possible to import two projects with the same name into the same workspace (at least for me I guess).
When I try to import all projects at once I get en error stating that a project with the name "preference" already exists. The import process aborts and the second "preference" project and the "recyclerview" projects won't be imported.

Then I tried just importing "preference" (v7), "android-support-v7-appcompat" and "recyclerview".
These three projects built without errors.

After that I imported "mupen64plus-ae".
The native libraries compiled successfully but the java stuff did not, because no mupen64plus-ae\gen\org\mupen64plusae\R.java file (the org.mupen64plusae.v3.alpha.R class) was generated.
After a bit of searcing I found aut that this almost always indicates errors in resource files and I saw some errors in the eclipse output console but they were quickly overwritten by the ndk build progress... after that I haven't seen the error again.

Then I tried importing just "preference" (v14), "android-support-v7-appcompat" and "recyclerview".
"android-support-v7-appcompat" and "recyclerview" did compile but "preference" (v14) did not because of resource errors.

I got a lot of errors like these

[2016-08-02 16:37:03 - preference]
[2016-08-02 16:37:03 - preference] C:\...\mupen64plus-ae\libs\extras\android\support\v14\preference\res\values\values.xml:50: error: Error retrieving parent for item: No resource found that matches the given name 'PreferenceThemeOverlay'.
[2016-08-02 16:37:03 - preference]
[2016-08-02 16:37:03 - preference] C:\...\mupen64plus-ae\libs\extras\android\support\v14\preference\res\values\values.xml:51: error: Error: No resource found that matches the given name: attr 'switchPreferenceStyle'.
[2016-08-02 16:37:03 - preference]
[2016-08-02 16:37:03 - preference] C:\...\mupen64plus-ae\libs\extras\android\support\v14\preference\res\values\values.xml:58: error: Error: No resource found that matches the given name: attr 'checkBoxPreferenceStyle'.
[2016-08-02 16:37:03 - preference]
[2016-08-02 16:37:03 - preference] C:\...\mupen64plus-ae\libs\extras\android\support\v14\preference\res\values\values.xml:61: error: Error: No resource found that matches the given name: attr 'dialogPreferenceStyle'.
[2016-08-02 16:37:03 - preference]
[2016-08-02 16:37:03 - preference] C:\...\mupen64plus-ae\libs\extras\android\support\v14\preference\res\values\values.xml:62: error: Error: No resource found that matches the given name: attr 'editTextPreferenceStyle'.
[2016-08-02 16:37:03 - preference]
[2016-08-02 16:37:03 - preference] C:\...\mupen64plus-ae\libs\extras\android\support\v14\preference\res\values\values.xml:55: error: Error: No resource found that matches the given name: attr 'preferenceCategoryStyle'.
[2016-08-02 16:37:03 - preference]
[2016-08-02 16:37:03 - preference] C:\Users\Silvio\Desktop\bakup\Projects\mupen64plus-ae\libs\extras\android\support\v14\preference\res\values\values.xml:63: error: Error: No resource found that matches the given name: attr 'preferenceFragmentListStyle'.
[2016-08-02 16:37:03 - preference]
[2016-08-02 16:37:03 - preference] C:\...\mupen64plus-ae\libs\extras\android\support\v14\preference\res\values\values.xml:57: error: Error: No resource found that matches the given name: attr 'preferenceInformationStyle'.
[2016-08-02 16:37:03 - preference]
[2016-08-02 16:37:03 - preference] C:\...\mupen64plus-ae\libs\extras\android\support\v14\preference\res\values\values.xml:54: error: Error: No resource found that matches the given name: attr 'preferenceScreenStyle'.
[2016-08-02 16:37:03 - preference]
[2016-08-02 16:37:03 - preference] C:\...\mupen64plus-ae\libs\extras\android\support\v14\preference\res\values\values.xml:56: error: Error: No resource found that matches the given name: attr 'preferenceStyle'.
[2016-08-02 16:37:03 - preference]
[2016-08-02 16:37:03 - preference] C:\...\mupen64plus-ae\libs\extras\android\support\v14\preference\res\values\values.xml:59: error: Error: No resource found that matches the given name: attr 'switchPreferenceCompatStyle'.
[2016-08-02 16:37:03 - preference]

Then I found out that the "preference" (v14) project references the "preference" (v7) project what I found pretty strange since eclipes didn't allow me to import both.


....
So how do you guys get this to compile? do you use eclipse, just ant or do you use AndroidStudio?
Or do I have a wrong eclipse version? I've got
Eclipse Neon Release (4.6.0)
Build id: 20160613-1800
running on Win8.1 (64bit)

since other people (including you fzurita ;) ) where able to build it I'm kind of left wondering.
Is it really neccessary to include both "preference" projects to compile mupen64plus-ae?

Offline fzurita

  • Moderator
  • double
  • *****
  • Posts: 560
    • View Profile
Re: Trying to compile mupen64plus-ae
« Reply #5 on: August 02, 2016, 01:28:11 PM »
Yeah, it is necessary to import both. Here is a tip. First import the v14 one. Once imported, rename it to preference-v14. Then import the v7 one, it should hopefully allow you to import it since there is no longer a preference project.

And yeah, the v14 one has dependencies on the v7 one.

Also, personally, I use Android Studio, but I have gone back to Eclipse every once in a while to make sure it still builds there. Eclipse with Android is getting deprecated, so I'm trying to get away from it.

If you want to try to build with Android Studio, you may have an easier time. I have included the necessary gradle files in the "tools" directory of the project. With Android Studio, you don't have to worry about importing any additional projects, it's all done automatically. You just have to import the main mupen64plus-ae project.
« Last Edit: August 02, 2016, 01:33:30 PM by fzurita »

Offline abnormalwit

  • bit
  • Posts: 5
    • View Profile
Re: Trying to compile mupen64plus-ae
« Reply #6 on: August 03, 2016, 09:14:19 AM »
Hey thx for being so responsive and helpful! The renaming trick did it  ;D . It compiles and runs now.
I also tried to use AndroidStudio but I got an error message about "preference" having a cyclic dependence while importing mupen64plus-ae. I also wasn't entirely sure how the whole cradle thing works... I played a bit around with it, got several crashe... I wasn't really able to build it with AndroidStudio...

Was kind of awkward that I needed roughly two days to set up a working build environmenment without having written a single line of code... when I code something in C++ I write a makefile, and thats it  ;D
During the whole process I had to make continuos breaks playing "Wave Race 64" and "Ogre Battle 64" to not get to frustrated  ;)

but thanks a lot  ;D

Offline fzurita

  • Moderator
  • double
  • *****
  • Posts: 560
    • View Profile
Re: Trying to compile mupen64plus-ae
« Reply #7 on: August 03, 2016, 11:49:34 AM »
No problem! Contributions are always welcome at https://github.com/mupen64plus-ae/mupen64plus-ae