Android Question Problem with B4A Firebase tutorial

Discussion in 'Android Questions' started by davemorris, Jul 30, 2019.

Tags:
  1. davemorris

    davemorris Member Licensed User

    Hi
    I have a problem with the B4A Firebase tutorial - When I attempt to compile the project I get the following report

    B4A Version: 9.30
    Java Version: 11
    Parsing code. (0.00s)
    Building folders structure. (0.03s)
    Compiling code. (0.08s)
    Compiling layouts code. (0.00s)
    Organizing libraries. (0.00s)
    (AndroidX SDK)
    Generating R file. (0.71s)
    Compiling debugger engine code. (1.31s)
    Compiling generated Java code. (2.59s)
    Convert byte code - optimized dex. (3.50s)
    Packaging files. (1.39s)
    Copying libraries resources (0.05s)
    Found 20 resource files.
    Signing package file (private key). (1.12s)
    ZipAlign file. (0.13s)
    Installing file to device. Error
    Performing Push Install
    pushTest_RAPID_DEBUG.apk: 1 file pushed. 6.3 MB/s (1781333 bytes in 0.268s)
    pkg: /data/local/tmp/pushTest_RAPID_DEBUG.apk
    Failure [INSTALL_PARSE_FAILED_MANIFEST_MALFORMED]


    The manifest file is
    Code:
    'This code will be applied to the manifest file during compilation.
    'You do not need to modify it in most cases.
    'See this link for for more information: https://www.b4x.com/forum/showthread.php?p=78136
    AddManifestText(
    <uses-sdk android:minSdkVersion=
    "5" android:targetSdkVersion="26"/>
    <supports-screens android:largeScreens=
    "true"
        android:normalScreens=
    "true"
        android:smallScreens=
    "true"
        android:anyDensity=
    "true"/>)
    SetApplicationAttribute(android:icon, 
    "@drawable/icon")
    SetApplicationAttribute(android:
    label"$LABEL$")
    CreateResourceFromFile(Macro, Themes.DarkTheme)
    'End of default text.
    CreateResourceFromFile(Macro, FirebaseAnalytics.GooglePlayBase)
    CreateResourceFromFile(Macro, FirebaseAnalytics.Firebase)
    CreateResourceFromFile(Macro, FirebaseNotifications.FirebaseNotifications)
    Can anyone help?

    Regards Dave
     
  2. Computersmith64

    Computersmith64 Well-Known Member Licensed User

    Have a look at the AndroidManifest XML file in your projects \Objects directory & see if anything looks amiss in it. That's the manifest that is being installed with the app.

    - Colin.
     
  3. Erel

    Erel Administrator Staff Member Licensed User

    Manifest code looks correct. Which device are you using? As Colin please upload the AndroidManifest.xml file.
     
  4. davemorris

    davemorris Member Licensed User

    Hi, Guys - thanks for the quick response.

    1. Had a look at the AndroidManifest.xml file - it appears OK but I really don't know what I should be looking for - I have uploaded the file as requested.

    2. The issue occurred with an Android 6 phone, after reading a post with similar problems, I tried it on an Android 9 phone and that worked (the manifest file is from that successful compile operation).

    In the interim, I will retry with the Android 6 phone just and compare manifest files).

    Kind regards
    Dave
     
  5. davemorris

    davemorris Member Licensed User

    Hi, Sorry forgot to upload the file.
     

    Attached Files:

  6. davemorris

    davemorris Member Licensed User

    Hi, Again

    After the success with Android 9 phone, I retried with the Android 6 again and still reports the problem (also compared the AndroidManifest.xml files between the Android 6 and 9 phones compilations and they are identical).

    Dave
     
  7. Erel

    Erel Administrator Staff Member Licensed User

    The compilation process has nothing to do with the connected device. The output will always be exactly the same.

    Have you tried to restart the Android 6 device?
     
  8. davemorris

    davemorris Member Licensed User

    Hi Erel Reseting the phone appeared to fix the problem

    Thanks for your help.
     
    Erel likes this.
Loading...
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice