yglukhov / nimx

GUI library
MIT License
1.09k stars 75 forks source link

nake droid fails, invalid AndroidManifest.xml #354

Closed bird closed 5 years ago

bird commented 5 years ago

When building anything for android with nake, the gradlew build always fails with

A problem occurred configuring root project 'com.mycompany.NimxApp'.
> org.xml.sax.SAXParseException; systemId: file:/.../build/android/com.mycompany.NimxApp/src/main/AndroidManifest.xml; lineNumber: 14; columnNumber: 19; Element type "activity" must be followed by either attribute specifications, ">" or "/>".
Tormund commented 5 years ago

Can you attach manifest here?

bird commented 5 years ago

AndroidManifest.xml:

<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
    package="$(PACKAGE_ID)"
    android:versionCode="$(BUILD_NUMBER)"
    android:versionName="$(APP_VERSION)" >

    <application android:label="@string/app_name"
                 android:hardwareAccelerated="true"
                 android:theme="@android:style/Theme.NoTitleBar.Fullscreen"
                 >
        <activity android:name="$(ACTIVITY_CLASS_NAME)"
                  android:label="@string/app_name"
                  android:configChanges="keyboardHidden|orientation|screenSize"
                  $(SCREEN_ORIENTATION)
                  >
            <intent-filter>
                <action android:name="android.intent.action.MAIN" />
                <category android:name="android.intent.category.LAUNCHER" />
            </intent-filter>
        </activity>
    </application>

</manifest>
Tormund commented 5 years ago

All $(*) - should be replaced by naketools. Try this:

  1. nimble install -y or nimble develop -y at nimx folder - naketools.nim used from installed nimx package
  2. Delete executable nakefile (.exe at windows) and build folder.
  3. Re run nake droid
bird commented 5 years ago

I tried both ways (nimble install -y and nimble develop -y), and either way I still end up with the same result.

Tormund commented 5 years ago

Ok, please provide nimx, nim hashes and which sdl version used.

bird commented 5 years ago

Using SDL version 2.0.9 64 bit.

As for the nimx/nim hashes, I'm not entirely sure how I should go about getting them?

Tormund commented 5 years ago

Use nim --version - for nim and git rev-parse HEAD for nimx. Also make sure you have only 1 nimx version installed in ~/.nimple/pkgs. You can just delete all nimx folders from pkgs and reinstall with nimble.

bird commented 5 years ago

nim: 7beea1642ddf7845a9a0034c7a93ccbe15894c36

As for nimx, I cant actually get git rev-parse HEAD to work, because theres no .git folder in any of the nimx directories?

Tormund commented 5 years ago

Ok, you can find revision at ~/.nimble/pkgs/nimx*/nimblemeta.json, field vcsRevision

bird commented 5 years ago

nimx: fa6da31a37431c02825d79743ac8f3c0e0b1d769

Tormund commented 5 years ago

I have same revisions and all works. Removing of build folder should help.

bird commented 5 years ago

I've tried many different combinations (removing build folder, reinstall nimx/SDL), and always produce the same results.

yglukhov commented 5 years ago

What platform are you using? Is this still the issue?

yglukhov commented 5 years ago

Make sure to set SDL_NOME env var to the source code of sdl, which can be downloaded from the official site. I've improved the error in naketools.nim.