Author Topic: Android compile failing YET AGAIN!!!!!  (Read 4246 times)

Offline UBERmonkeybot

  • Mr. Polyvector
  • ***
  • Posts: 243
    • View Profile
This is getting really boring now!!!


I have updated to V3.01.2 of android extras as well

Android_swt is pointing to x86 swt.jar
Java_home is pointing to JDK folder(32 bit)
I have no spaces in any file paths

Compile fails at line 649 & 694  in ant/build.xml

Can someone point me in the right direction? I need to know why this is happening so i can actually deduce WTF is going on when it inevitably happens again.





Logfile:
_______________________________________
*** Configuration: ANDROID ***
precompiling:
GPC - GLBasic Precompiler V.10.037 SN:f6c7483b - 3D, NET
Wordcount:473 commands
compile+link:

running glb_build.bat
Using ANDROID_TARGET="android-22"
You can use "C:\Users\pc\Desktop\coding\glbasic\GLBasic\breakout\distribute\Android\glb_android_build.bat" to change the API level and SDK path.
ECHO is off.
androidmanifest.xml:
Make sure to check do a manual check for those.
android:minSdkVersion="10" android:targetSdkVersion="22"
ECHO is off.

AndroidIcons.exe [v21-3-2015] running...
copy C:/Users/pc/Desktop/coding/glbasic/GLBasic/breakout/icon_36_AndroidExtras.png to C:/Users/pc/Desktop/coding/glbasic/GLBasic/breakout/distribute/Android/res/drawable-ldpi/icon.png
copy C:/Users/pc/Desktop/coding/glbasic/GLBasic/breakout/icon_48_AndroidExtras.png to C:/Users/pc/Desktop/coding/glbasic/GLBasic/breakout/distribute/Android/res/drawable-mdpi/icon.png
copy C:/Users/pc/Desktop/coding/glbasic/GLBasic/breakout/icon_72_AndroidExtras.png to C:/Users/pc/Desktop/coding/glbasic/GLBasic/breakout/distribute/Android/res/drawable/icon.png
copy C:/Users/pc/Desktop/coding/glbasic/GLBasic/breakout/icon_72_AndroidExtras.png to C:/Users/pc/Desktop/coding/glbasic/GLBasic/breakout/distribute/Android/res/drawable-hdpi/icon.png
copy C:/Users/pc/Desktop/coding/glbasic/GLBasic/breakout/icon_96_AndroidExtras.png to C:/Users/pc/Desktop/coding/glbasic/GLBasic/breakout/distribute/Android/res/drawable-xhdpi/icon.png
copy C:/Users/pc/Desktop/coding/glbasic/GLBasic/breakout/icon_180_AndroidExtras.png to C:/Users/pc/Desktop/coding/glbasic/GLBasic/breakout/distribute/Android/res/drawable-xxhdpi/icon.png
copy C:/Users/pc/Desktop/coding/glbasic/GLBasic/breakout/icon_192_AndroidExtras.png to C:/Users/pc/Desktop/coding/glbasic/GLBasic/breakout/distribute/Android/res/drawable-xxxhdpi/icon.png
C:/Users/pc/Desktop/coding/glbasic/GLBasic/breakout/icon_ouya_AndroidExtras.png is missing (732x412 size)
the Ouya icon is not important, if you dont want to support the console
copy C:/Users/pc/Desktop/coding/glbasic/GLBasic/breakout/icon_ouya_AndroidExtras.png to C:/Users/pc/Desktop/coding/glbasic/GLBasic/breakout/distribute/Android/res/drawable-xhdpi/ouya_icon.png

Checked AdActivity (intersititals):
Does not uses a AdActivity

Android Extras version (SDLActivity.java):
* 2.11.2

Checking Icons Finished...

BUILD STAGE 2: Start compiler (android.bat)
SDK=C:\GLBasic_v14\Compiler\platform\android\bin\..\android-sdk-windows
Updated project.properties
Updated local.properties
Updated file C:\Users\pc\Desktop\coding\glbasic\GLBasic\breakout\distribute\Android\build.xml
Updated file C:\Users\pc\Desktop\coding\glbasic\GLBasic\breakout\distribute\Android\proguard-project.txt
Updated project.properties
Updated local.properties
Updated file C:\Users\pc\Desktop\coding\glbasic\GLBasic\breakout\distribute\Android\bin\build.xml
Updated file C:\Users\pc\Desktop\coding\glbasic\GLBasic\breakout\distribute\Android\bin\proguard-project.txt
.
BUILD STAGE 3: Build a debug build
Buildfile: C:\Users\pc\Desktop\coding\glbasic\GLBasic\breakout\distribute\Android\build.xml

-set-mode-check:

-set-debug-files:

-check-env:
 [checkenv] Android SDK Tools Revision 24.4.1
 [checkenv] Installed at C:\GLBasic_v14\Compiler\platform\android\android-sdk-windows

-setup:
     [echo] Project Name: glbasic
  [gettype] Project Type: Application

-set-debug-mode:

-debug-obfuscation-check:

-pre-build:

-build-setup:
[getbuildtools] Using latest Build Tools: 21.1.2
     [echo] Resolving Build Target for glbasic...
[gettarget] Project Target:   Android 5.1.1
[gettarget] API level:        22
     [echo] ----------
     [echo] Creating output directories if needed...
    [mkdir] Created dir: C:\Users\pc\Desktop\coding\glbasic\GLBasic\breakout\distribute\Android\bin\rsObj
    [mkdir] Created dir: C:\Users\pc\Desktop\coding\glbasic\GLBasic\breakout\distribute\Android\bin\rsLibs
     [echo] ----------
     [echo] Resolving Dependencies for glbasic...
[dependency] Library dependencies:
[dependency] No Libraries
[dependency]
[dependency] ------------------
     [echo] ----------
     [echo] Building Libraries with 'debug'...
   [subant] No sub-builds to iterate on

-code-gen:
[mergemanifest] Found Deleted Target File
[mergemanifest] Merging AndroidManifest files into one.
[mergemanifest] Manifest merger disabled. Using project manifest only.
     [echo] Handling aidl files...
     [aidl] No AIDL files to compile.
     [echo] ----------
     [echo] Handling RenderScript files...
     [echo] ----------
     [echo] Handling Resources...
     [aapt] Generating resource IDs...
     [aapt] C:\Users\pc\Desktop\coding\glbasic\GLBasic\breakout\distribute\Android\res\values\sepia.frag.txt:1: error: Error parsing XML: syntax error
     [aapt]

BUILD FAILED
C:\GLBasic_v14\Compiler\platform\android\android-sdk-windows\tools\ant\build.xml:649: The following error occurred while executing this line:
C:\GLBasic_v14\Compiler\platform\android\android-sdk-windows\tools\ant\build.xml:694: null returned: 1


Total time: 0 seconds
.
BUILD STAGE 4: Build a release build
   [subant] No sub-builds to iterate on

BUILD FAILED
C:\GLBasic_v14\Compiler\platform\android\android-sdk-windows\tools\ant\build.xml:649: The following error occurred while executing this line:
C:\GLBasic_v14\Compiler\platform\android\android-sdk-windows\tools\ant\build.xml:694: null returned: 1

Total time: 0 seconds
Picked up _JAVA_OPTIONS: -Xms256m -Xmx512m
.
HOW TO INSTALL? Install by invoke this command:
"C:\GLBasic_v14\Compiler\platform\android\bin\..\android-sdk-windows\platform-tools\adb.exe" install -r "C:\Users\pc\Desktop\coding\glbasic\GLBasic\breakout\distribute\Android/bin/glbasic-debug.apk"
.
HOW TO SIGN? Sign it by invoke this command:
"C:\GLBasic_v14\Compiler\platform\android\bin\glb_code_sign.bat" "C:\Users\pc\Desktop\coding\glbasic\GLBasic\breakout\distribute\Android"
.
..
sending to device
   pkg: /data/local/tmp/glbasic-debug.apk
Failure [INSTALL_PARSE_FAILED_INCONSISTENT_CERTIFICATES]
2896 KB/s (2094367 bytes in 0.706s)
Android=C:\Users\pc\Desktop\coding\glbasic\GLBasic\breakout\distribute\Android
success
_______________________________________
*** Finished ***
Elapsed: 14.5 sec. Time: 09:53
Build: 1 succeeded.
« Last Edit: 2016-Mar-30 by monkeybot1968 »

Offline spacefractal

  • Community Developer
  • Prof. Inline
  • ******
  • Posts: 4020
    • View Profile
    • Space Fractal
Re: Android compile failing YET AGAIN!!!!!
« Reply #1 on: 2016-Mar-30 »
What is sepia.frag.txt?

its not used by glbasic projects.

Extra files in the res folder and/or misstep in androidmanifest.xml will fails compiling.

Since im dont have your project, im cant do check it out.
Genius.Greedy Mouse - Karma Miwa - Spot Race - CatchOut - PowerUp Elevation and The beagle Jam.

Offline UBERmonkeybot

  • Mr. Polyvector
  • ***
  • Posts: 243
    • View Profile
Re: Android compile failing YET AGAIN!!!!!
« Reply #2 on: 2016-Mar-30 »
I just spotted that too,It was a shader i was messing around with but that was another program i was working on.I have no idea how that got into my templateproj folder!! :S

Anyway it is now removed and the log file is the same as before but without that errror.
I notice there is an error in stage 3 with androidmanifest.

*** Configuration: ANDROID ***
precompiling:
GPC - GLBasic Precompiler V.10.037 SN:f6c7483b - 3D, NET
Wordcount:473 commands
compile+link:

running glb_build.bat
Using ANDROID_TARGET="android-22"
You can use "C:\Users\pc\Desktop\coding\glbasic\GLBasic\breakout\distribute\Android\glb_android_build.bat" to change the API level and SDK path.
%ANDROIDSDK% not set. Using GLBasic's default target-22, Android 5.1 (Lollipop
ECHO is off.
androidmanifest.xml:
Make sure to check do a manual check for those.
android:minSdkVersion="10" android:targetSdkVersion="22"
ECHO is off.

AndroidIcons.exe [v02-9-2015] running...
copy C:/Users/pc/Desktop/coding/glbasic/GLBasic/breakout/icon_36_AndroidExtras.png to C:/Users/pc/Desktop/coding/glbasic/GLBasic/breakout/distribute/Android/res/drawable-ldpi/icon.png
copy C:/Users/pc/Desktop/coding/glbasic/GLBasic/breakout/icon_48_AndroidExtras.png to C:/Users/pc/Desktop/coding/glbasic/GLBasic/breakout/distribute/Android/res/drawable-mdpi/icon.png
copy C:/Users/pc/Desktop/coding/glbasic/GLBasic/breakout/icon_72_AndroidExtras.png to C:/Users/pc/Desktop/coding/glbasic/GLBasic/breakout/distribute/Android/res/drawable/icon.png
copy C:/Users/pc/Desktop/coding/glbasic/GLBasic/breakout/icon_72_AndroidExtras.png to C:/Users/pc/Desktop/coding/glbasic/GLBasic/breakout/distribute/Android/res/drawable-hdpi/icon.png
copy C:/Users/pc/Desktop/coding/glbasic/GLBasic/breakout/icon_96_AndroidExtras.png to C:/Users/pc/Desktop/coding/glbasic/GLBasic/breakout/distribute/Android/res/drawable-xhdpi/icon.png
copy C:/Users/pc/Desktop/coding/glbasic/GLBasic/breakout/icon_180_AndroidExtras.png to C:/Users/pc/Desktop/coding/glbasic/GLBasic/breakout/distribute/Android/res/drawable-xxhdpi/icon.png
copy C:/Users/pc/Desktop/coding/glbasic/GLBasic/breakout/icon_192_AndroidExtras.png to C:/Users/pc/Desktop/coding/glbasic/GLBasic/breakout/distribute/Android/res/drawable-xxxhdpi/icon.png
C:/Users/pc/Desktop/coding/glbasic/GLBasic/breakout/icon_ouya_AndroidExtras.png is missing (732x412 size)
the Ouya icon is not important, if you dont want to support the console
C:/Users/pc/Desktop/coding/glbasic/GLBasic/breakout/icon_TV_AndroidExtras.png is missing (320x180 size)
the Ouya icon is not important, if you dont want to support the console

Checked AdActivity (intersititals):
Does not uses a AdActivity

Android Extras version (SDLActivity.java):
* 3.01.2

Checking Icons Finished...

BUILD STAGE 2: Start compiler (android.bat)
C:\GLBasic_v14\Compiler\platform\android\bin\..\android-sdk-windows
Updated and renamed default.properties to project.properties
Updated local.properties
Added file C:\Users\pc\Desktop\coding\glbasic\GLBasic\breakout\distribute\Android\build.xml
Added file C:\Users\pc\Desktop\coding\glbasic\GLBasic\breakout\distribute\Android\proguard-project.txt
.
BUILD STAGE 3: Build a debug build
Buildfile: C:\Users\pc\Desktop\coding\glbasic\GLBasic\breakout\distribute\Android\build.xml

-set-mode-check:

-set-debug-files:

-check-env:
 [checkenv] Android SDK Tools Revision 24.2.0
 [checkenv] Installed at C:\GLBasic_v14\Compiler\platform\android\android-sdk-windows

-setup:
     [echo] Project Name: glbasic
  [gettype] Project Type: Application

-set-debug-mode:

-debug-obfuscation-check:

-pre-build:

-build-setup:
[getbuildtools] Using latest Build Tools: 21.1.2
     [echo] Resolving Build Target for glbasic...
[gettarget] Project Target:   Android 5.1.1
[gettarget] API level:        22
     [echo] ----------
     [echo] Creating output directories if needed...
    [mkdir] Created dir: C:\Users\pc\Desktop\coding\glbasic\GLBasic\breakout\distribute\Android\bin
    [mkdir] Created dir: C:\Users\pc\Desktop\coding\glbasic\GLBasic\breakout\distribute\Android\bin\res
    [mkdir] Created dir: C:\Users\pc\Desktop\coding\glbasic\GLBasic\breakout\distribute\Android\bin\rsObj
    [mkdir] Created dir: C:\Users\pc\Desktop\coding\glbasic\GLBasic\breakout\distribute\Android\bin\rsLibs
    [mkdir] Created dir: C:\Users\pc\Desktop\coding\glbasic\GLBasic\breakout\distribute\Android\gen
    [mkdir] Created dir: C:\Users\pc\Desktop\coding\glbasic\GLBasic\breakout\distribute\Android\bin\classes
    [mkdir] Created dir: C:\Users\pc\Desktop\coding\glbasic\GLBasic\breakout\distribute\Android\bin\dexedLibs
     [echo] ----------
     [echo] Resolving Dependencies for glbasic...
[dependency] Library dependencies:
[dependency] No Libraries
[dependency]
[dependency] ------------------
     [echo] ----------
     [echo] Building Libraries with 'debug'...
   [subant] No sub-builds to iterate on

-code-gen:
[mergemanifest] Merging AndroidManifest files into one.
[mergemanifest] Manifest merger disabled. Using project manifest only.
     [echo] Handling aidl files...
     [aidl] No AIDL files to compile.
     [echo] ----------
     [echo] Handling RenderScript files...
     [echo] ----------
     [echo] Handling Resources...
     [aapt] Generating resource IDs...
     [aapt] C:\Users\pc\Desktop\coding\glbasic\GLBasic\breakout\distribute\Android\bin\AndroidManifest.xml:23: error: Error: No resource found that matches the given name (at 'banner' with value '@drawable/banner').
     [aapt]

BUILD FAILED
C:\GLBasic_v14\Compiler\platform\android\android-sdk-windows\tools\ant\build.xml:653: The following error occurred while executing this line:
C:\GLBasic_v14\Compiler\platform\android\android-sdk-windows\tools\ant\build.xml:698: null returned: 1

Total time: 0 seconds
.
BUILD STAGE 4: Build a release build
   [subant] No sub-builds to iterate on

BUILD FAILED
C:\GLBasic_v14\Compiler\platform\android\android-sdk-windows\tools\ant\build.xml:653: The following error occurred while executing this line:
C:\GLBasic_v14\Compiler\platform\android\android-sdk-windows\tools\ant\build.xml:698: null returned: 1

Total time: 0 seconds
Picked up _JAVA_OPTIONS: -Xms256m -Xmx512m
.
HOW TO INSTALL? Install by invoke this command:
"C:\GLBasic_v14\Compiler\platform\android\bin\..\android-sdk-windows\platform-tools\adb.exe" install -r "C:\Users\pc\Desktop\coding\glbasic\GLBasic\breakout\distribute\Android/bin/glbasic-debug.apk"
.
HOW TO SIGN? Sign it by invoke this command:
"C:\GLBasic_v14\Compiler\platform\android\bin\glb_code_sign.bat" "C:\Users\pc\Desktop\coding\glbasic\GLBasic\breakout\distribute\Android"
.
Android=C:\Users\pc\Desktop\coding\glbasic\GLBasic\breakout\distribute\Android
success
_______________________________________
*** Finished ***
Elapsed: 11.9 sec. Time: 11:13
Build: 1 succeeded.









Offline spacefractal

  • Community Developer
  • Prof. Inline
  • ******
  • Posts: 4020
    • View Profile
    • Space Fractal
Re: Android compile failing YET AGAIN!!!!!
« Reply #3 on: 2016-Mar-30 »
A simple issue from mine side.

banner.png is missing (should been in res\drawable-xhdpi\banner.png). Pixel size is 320x150px. Its only used for Android TV, where GameInput API is required.

If you dont plan to support Android TV, then just remove android:banner="@drawable/banner" from AndroidManifest.xml.

Fixed in the next release, so its no longer added by default.

PS. Unlike java files, AndroidManifest.xml does not overwrite, if its allready exist in the distribute dir. Sometimes you need to change it from the default.
« Last Edit: 2016-Mar-30 by spacefractal »
Genius.Greedy Mouse - Karma Miwa - Spot Race - CatchOut - PowerUp Elevation and The beagle Jam.

Offline UBERmonkeybot

  • Mr. Polyvector
  • ***
  • Posts: 243
    • View Profile
Re: Android compile failing YET AGAIN!!!!!
« Reply #4 on: 2016-Mar-30 »
Hi SF,That worked i can now compile but when installing to my phone i am getting

INSTALL_PARSE_FAILED_INCONSISTENT_CERTIFICATES.

i have regenerated a new key with keytool but it doesn't seem to make any difference.



Offline spacefractal

  • Community Developer
  • Prof. Inline
  • ******
  • Posts: 4020
    • View Profile
    • Space Fractal
Re: Android compile failing YET AGAIN!!!!!
« Reply #5 on: 2016-Mar-30 »
uninstall and reinstall. Its normal its can happens.

you cannot mix the same app with two different cerficates using the same package name. Its can been happens, if you installed it with the release cerficate, but you tried to install with the debug one (ot the other way).

In AndroidManifest.xml, also checkout package entry as well. Should been com.yourdomain.yourapp (im uses example com.spacefractal.greedymouse for Genius Greedy Mouse). Its property say com.company.title. Not good, if you have various app with that package name.
« Last Edit: 2016-Mar-30 by spacefractal »
Genius.Greedy Mouse - Karma Miwa - Spot Race - CatchOut - PowerUp Elevation and The beagle Jam.

Offline UBERmonkeybot

  • Mr. Polyvector
  • ***
  • Posts: 243
    • View Profile
Re: Android compile failing YET AGAIN!!!!!
« Reply #6 on: 2016-Mar-30 »
OK will do,
Thanks for the tips i really need to learn the ins and outs of the android system.


Offline UBERmonkeybot

  • Mr. Polyvector
  • ***
  • Posts: 243
    • View Profile
Re: Android compile failing YET AGAIN!!!!!
« Reply #7 on: 2016-Mar-30 »
I did a fresh install of GLB and did the updates.
I updated android extras.

I was then getting the @banner error again so i removed it from androidmanifest
My code seems to compile ok but i am still getting the INSTALL_PARSE_FAILED_INCONSISTENT_CERTIFICATE errror.


Offline spacefractal

  • Community Developer
  • Prof. Inline
  • ******
  • Posts: 4020
    • View Profile
    • Space Fractal
Re: Android compile failing YET AGAIN!!!!!
« Reply #8 on: 2016-Mar-30 »
read above. you allready have a app installed with the same package name, but with a different cerficat. Android wont update a app with a different cerficate. you need to uninstall that problem app first. Other than you will allways see this issue.

Im sometimes forget to uninstall the retail version of my game, when im trying to install the debug version.

the banner error is from my side as im wrote. sorry about that,

Checkout you use different package name between apps you use and not the same name.
Genius.Greedy Mouse - Karma Miwa - Spot Race - CatchOut - PowerUp Elevation and The beagle Jam.

Offline MrPlow

  • Prof. Inline
  • *****
  • Posts: 1810
    • View Profile
Re: Android compile failing YET AGAIN!!!!!
« Reply #9 on: 2016-Mar-30 »
Hi

Check your string values file

Might be an unclosed quote or missing value from manifest

[aapt] C:\Users\pc\Desktop\coding\glbasic\GLBasic\breakout\distribute\Android\res\values\sepia.frag.txt:1: error: Error parsing XML: syntax error
Comp:
Speccy-48k, Speccy-128k, Amigas, PCs

Offline UBERmonkeybot

  • Mr. Polyvector
  • ***
  • Posts: 243
    • View Profile
Re: Android compile failing YET AGAIN!!!!!
« Reply #10 on: 2016-Mar-30 »
Sorry SF i didn't understand what you meant about the cert mix up,i uninstalled my previoius app from my phone and all is working now.

Thanks very much again.

Offline spacefractal

  • Community Developer
  • Prof. Inline
  • ******
  • Posts: 4020
    • View Profile
    • Space Fractal
Re: Android compile failing YET AGAIN!!!!!
« Reply #11 on: 2016-Mar-30 »
Android needs to use the same previous cerficate when you update a app.

When you create a new one, then the cerficate it's different than the previous and it's fails.

Debug version uses own debug cerficate for testing.

You only need one release cerficate for all your apps when you release to Google play etc. Etc you only need to sign a cerficate when you public release your app.
Genius.Greedy Mouse - Karma Miwa - Spot Race - CatchOut - PowerUp Elevation and The beagle Jam.

Offline UBERmonkeybot

  • Mr. Polyvector
  • ***
  • Posts: 243
    • View Profile
Re: Android compile failing YET AGAIN!!!!!
« Reply #12 on: 2016-Mar-31 »
Thanks fro the info SF.