Author Topic: Android build Fails  (Read 1608 times)

Offline Paul Smith

  • Mr. Polyvector
  • ***
  • Posts: 105
    • View Profile
Android build Fails
« on: 2017-Jul-18 »
Hi all i have a project that builds for windows but now fail to build for Android.
I have one project that builds for android every time, I open a new project and copy code and media and the  builds fails at end of stage 3 with android.
any Idea

running glb_build.bat
Using ANDROID_TARGET="android-22"
You can use "C:\Users\pauls\Documents\GLBasic\assaa\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/pauls/Documents/GLBasic/assaa/icon_36_AndroidExtras.png to C:/Users/pauls/Documents/GLBasic/assaa/distribute/Android/res/drawable-ldpi/icon.png
copy C:/Users/pauls/Documents/GLBasic/assaa/icon_48_AndroidExtras.png to C:/Users/pauls/Documents/GLBasic/assaa/distribute/Android/res/drawable-mdpi/icon.png
copy C:/Users/pauls/Documents/GLBasic/assaa/icon_72_AndroidExtras.png to C:/Users/pauls/Documents/GLBasic/assaa/distribute/Android/res/drawable/icon.png
copy C:/Users/pauls/Documents/GLBasic/assaa/icon_72_AndroidExtras.png to C:/Users/pauls/Documents/GLBasic/assaa/distribute/Android/res/drawable-hdpi/icon.png
copy C:/Users/pauls/Documents/GLBasic/assaa/icon_96_AndroidExtras.png to C:/Users/pauls/Documents/GLBasic/assaa/distribute/Android/res/drawable-xhdpi/icon.png
copy C:/Users/pauls/Documents/GLBasic/assaa/icon_180_AndroidExtras.png to C:/Users/pauls/Documents/GLBasic/assaa/distribute/Android/res/drawable-xxhdpi/icon.png
copy C:/Users/pauls/Documents/GLBasic/assaa/icon_192_AndroidExtras.png to C:/Users/pauls/Documents/GLBasic/assaa/distribute/Android/res/drawable-xxxhdpi/icon.png
C:/Users/pauls/Documents/GLBasic/assaa/icon_ouya_AndroidExtras.png is missing (732x412 size)
the Ouya icon is not important, if you dont want to support the console
C:/Users/pauls/Documents/GLBasic/assaa/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)
Q:\Compiler\platform\android\bin\..\android-sdk-windows
Updated project.properties
Updated local.properties
Updated file C:\Users\pauls\Documents\GLBasic\assaa\distribute\Android\build.xml
Updated file C:\Users\pauls\Documents\GLBasic\assaa\distribute\Android\proguard-project.txt
Updated and renamed default.properties to project.properties
Updated local.properties
Added file C:\Users\pauls\Documents\GLBasic\assaa\distribute\Android\bin\build.xml
Added file C:\Users\pauls\Documents\GLBasic\assaa\distribute\Android\bin\proguard-project.txt
.
BUILD STAGE 3: Build a debug build
Buildfile: C:\Users\pauls\Documents\GLBasic\assaa\distribute\Android\build.xml

-set-mode-check:

-set-debug-files:

-check-env:
 [checkenv] Android SDK Tools Revision 24.2.0
 [checkenv] Installed at Q:\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\pauls\Documents\GLBasic\assaa\distribute\Android\bin\rsObj
    [mkdir] Created dir: C:\Users\pauls\Documents\GLBasic\assaa\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\pauls\Documents\GLBasic\assaa\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
Q:\Compiler\platform\android\android-sdk-windows\tools\ant\build.xml:653: The following error occurred while executing this line:
Q:\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
Q:\Compiler\platform\android\android-sdk-windows\tools\ant\build.xml:653: The following error occurred while executing this line:
Q:\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:
"Q:\Compiler\platform\android\bin\..\android-sdk-windows\platform-tools\adb.exe" install -r "C:\Users\pauls\Documents\GLBasic\assaa\distribute\Android/bin/glbasic-debug.apk"
.
HOW TO SIGN? Sign it by invoke this command:
"Q:\Compiler\platform\android\bin\glb_code_sign.bat" "C:\Users\pauls\Documents\GLBasic\assaa\distribute\Android"
.
Android=C:\Users\pauls\Documents\GLBasic\assaa\distribute\Android
success
_______________________________________
*** Finished ***
Elapsed: 10.5 sec. Time: 20:41
Build: 1 succeeded.


Amstrad CPC 6128, ATARI STE.
Acer  SW5-173 & AMD FX 8350/1050Ti

Offline dreamerman

  • Global Moderator
  • Mr. Polyvector
  • *******
  • Posts: 242
    • View Profile
    • my personal website
Re: Android build Fails
« Reply #1 on: 2017-Jul-19 »
Check your AndroidManifest.xml file in android output patch for project.
Code: GLBasic [Select]
C:\Users\pauls\Documents\GLBasic\assaa\distribute\Android\bin\AndroidManifest.xml:23: error: Error: No resource found that matches the given name (at 'banner' with value '@drawable/banner')
Whats on that line? Remember that always you need to set 'company name' in project options, it's needed.
Check my source code editor for GLBasic - link

Offline Ian Price

  • Administrator
  • Prof. Inline
  • *******
  • Posts: 4141
  • On the shoulders of giants.
    • View Profile
    • My Apps
Re: Android build Fails
« Reply #2 on: 2017-Jul-19 »
Also ensure that you have all the right size icons for your project.
I came. I saw. I played.

Offline Paul Smith

  • Mr. Polyvector
  • ***
  • Posts: 105
    • View Profile
Re: Android build Fails
« Reply #3 on: 2017-Jul-19 »
I think your both right.
the new project was missing the original glbasic Icon, but with any new projects it appears.
But that on its own didn't fix it.
the xml file is twice as big at the one generated since i updated android extras.
I copied the one from my working project pre android extra update, and that done the trick.

I worked out if I change the auto generated andriodmanifest.xml line

<application android:label="@string/app_name" android:isGame="true" android:hardwareAccelerated="true" android:icon="@drawable/icon" android:banner="@drawable/banner"

to this one

<application android:label="@string/app_name" android:icon="@drawable/icon" android:debuggable="false">

this sort the problem.
Is there a way I can correct this so GLBasic generates a working xml, so I don't have to correct it every time?

« Last Edit: 2017-Jul-19 by Paul Smith »
Amstrad CPC 6128, ATARI STE.
Acer  SW5-173 & AMD FX 8350/1050Ti

Offline dreamerman

  • Global Moderator
  • Mr. Polyvector
  • *******
  • Posts: 242
    • View Profile
    • my personal website
Re: Android build Fails
« Reply #4 on: 2017-Jul-19 »
My experience with Android is limited but from what I see, it looks like new AndroidExtras needs also banner image for app, (I'm still on ver 2.x.x), from Android info:
Quote
Banners are images that represent the face of your app or game on the home screens of Android TV devices and serve as a way for users to launch your app. Here are the requirements for your banner image:

Size: 320 x 180 px, xhdpi resource
Text must be included in the image. If your app is available in more than one language, you must provide versions of the banner image for each supported language.
Try adding 'baner.png' or something like this along with app icon in project directory, check that in AndroidExtras or ask SpaceFractal/other Android expert to about this.
Check my source code editor for GLBasic - link

Offline spacefractal

  • Community Developer
  • Prof. Inline
  • ******
  • Posts: 3587
    • View Profile
    • Space Fractal
Re: Android build Fails
« Reply #5 on: 2017-Aug-03 »
The banner is only for Android tv. You should could remove the banner line thing.

Glbasic also can't create that banner in its own. Isgame tag is also Android tv stuff too.
Greedy Mouse - Karma Miwa - Spot Race - CatchOut - Android Extras - is on a vacation trip, home before end of few days in jan.

Offline MrPlow

  • Prof. Inline
  • *****
  • Posts: 1400
    • View Profile
Re: Android build Fails
« Reply #6 on: 2017-Sep-01 »
Just seeing this now - but yes - looks like a manifest issue - lets know if you still having issues...
Comp:
Speccy-48k, Speccy-128k, Amigas, PCs