Exporting signed package

I downloaded processing, android mode and android SDK several times, but every time i try to export the signed package of a large project (pretty much 1300 lines of code) processing never end the operation:

Processing start to export the package, but at the end, after "release:" is printed, no one folder is created in the sketch folder. In addiction, while processing is exporting the package, nearly at the bottom-right corner of the IDE there's a rectangle, whose presence states that processing is exporting. this rectangle remains also after "release:" is printed.

The sketch of course has no errors, and the not signed apk runs smoothly on my android device.

I tried to export the android project and open it with android studio, but with the exported project android studio doesn't show the button to export the signed package(i'm sure of this).

How can i fix this problem? Thanks

Answers

  • @sarrio

    You said you downloaded the android SDk several times. Have you successfully run a simple example using Android mode in your device?

    Please answer the following questions. You have provided details of some of them in your prev post.

    https://forum.processing.org/two/discussion/comment/98031/#Comment_98031


    • Processing version

    • Android mode Version

    • Operating system

    • Target APIs you have tried (Installed through the Android SDK manager and visible in the Processing IDE Android mode)

    • Android SDK version. Did you install it yourself or using the automatic installation offered by the Processing IDE android mode?

    • Have you run Android apps in Processing before? In any other SDK like Eclipse or Android Studio (AS)?

    • Is this your first time? Did you enabled the developer mode in your device?

    • Did you check the following website as a reference: http://android.processing.org/install.html Did you try any other set of instructions? Which ones? Can you provide your link?

    • Are you running your app in an actual device or through an emulator? (NOTE: It is strongly recommended to do it on an actual device)

    • In case you found something meaningful in the forum or in other site, please provide links (If nothing found... leave blank).

    • Have you tried anything else? For example, renaming/removing the manifest and letting Processing recreate the manifest for you again? (To access the manifest, press ctrl+k in your sketch and there should be a file called "manifest.xml")

    • Have you activated the debug mode on your phone + what is your phone OS ? ) + give us more error code (not only the first 2 lines)


    My suggestion is to make sure you have Android mode working in your Processing IDE and to export successfully a simple sketch. Then, loading your application brings another challenge but it should be manageable after Android Mode is confirmed to be working.

    You wrote this code originally using some other SW? Then you migrated to Processing?

    Btw, I am not an expert in Android but I will try to help as much as I can.

    Kf

  • @kfrajer

    1)Yes, I'have successfully run a simple example using Android mode in my device;

    2)Processing version: 3.3.5;

    3)Android mode Version: 3.0.2;

    4)Operating Sistem: Windows 10;

    5)Target APIs: I have tried with API 6.0(23), API 7.0(24), API 8.0.0(26);

    6)Android SDK version: Last version installed using the automatic installation offered by the Processing IDE android mode;

    7) I have run an app on Processing before https://play.google.com/store/apps/details?id=com.Sarothlon.MazeGenerator&hl=it. I managed to export a signed package in that case, but the code was very short. What i'm trying to export now is a powerfull upgrade of that game, as i said before, actually the code is more that 1300 lines long;

    8)Of course I enabled the developer mode in my device;

    9)I checked that website as a reference (I did NOT downloaded any pre-release);

    10)I'm running my app on an actual device, it runs very smoothly;

    11) Lots of people had my same problem, https://forum.processing.org/two/discussion/22711/processing-won-t-export-signed-packagemany of them used other software to sign the APK, such as AIDE, but in my case AIDE does not recognise the exported android project version of my app.(I followed the instructions presented in that link);

    12)I tried to delete the AndroidManifest.xml in order to make Processing generating a new one, but the result is the same (I even modified the package name "com.SiteName.scketchName"). I tried to export the android project and open it with AIDE or Android Studio, but none of them ricognise my android project;

    13)I have activated the debug mode on my phone. My phone is a "HUAWEI P8 Lite 2017", but it is not a problem of the phone, because in the exporting signed package process the phone has no role. I thin is a problem of Processing.

    Here's everything is printed: -package: Current build type is different than previous build: forced apkbuilder run. Creating MazeGeneratorPremium-release-unsigned.apk for release...

    -post-package:
    
    -release-prompt-for-password:
    
    -release-nosign:
         [echo] No key.store and key.alias properties found in build.properties.
         [echo] Please sign C:\Users\km98k\AppData\Local\Temp\android6314598080541656668sketch\bin\MazeGeneratorPremium-release-unsigned.apk manually
         [echo] and run zipalign from the Android SDK tools.
    [propertyfile] Creating new property file: C:\Users\km98k\AppData\Local\Temp\android6314598080541656668sketch\bin\build.prop
    [propertyfile] Updating property file: C:\Users\km98k\AppData\Local\Temp\android6314598080541656668sketch\bin\build.prop
    [propertyfile] Updating property file: C:\Users\km98k\AppData\Local\Temp\android6314598080541656668sketch\bin\build.prop
    [propertyfile] Updating property file: C:\Users\km98k\AppData\Local\Temp\android6314598080541656668sketch\bin\build.prop
    
    -release-sign:
    
    -post-build:
    
    release:
        [mkdir] Created dir: C:\Users\km98k\AppData\Local\Temp\android7048853124211056461sketch\bin
         [echo] org.eclipse.jdt.core.JDTCompilerAdapter
    
    -set-mode-check:
    
    -set-release-mode:
    
    -release-obfuscation-check:
         [echo] proguard.config is ${proguard.config}
    
    -pre-build:
    
    -check-env:
    Android SDK Tools Revision 25.2.5
    Installed at C:\Users\km98k\Documents\Processing\modes\AndroidMode\sdk
    
    -setup:
         [echo] Project Name: MazeGeneratorPremium
    Project Type: Application
    
    -build-setup:
    Using latest Build Tools: 26.0.1
         [echo] Resolving Build Target for MazeGeneratorPremium...
    Project Target:   Android 7.0
    API level:        24
         [echo] ----------
         [echo] Creating output directories if needed...
        [mkdir] Created dir: C:\Users\km98k\AppData\Local\Temp\android7048853124211056461sketch\bin\res
        [mkdir] Created dir: C:\Users\km98k\AppData\Local\Temp\android7048853124211056461sketch\bin\rsObj
        [mkdir] Created dir: C:\Users\km98k\AppData\Local\Temp\android7048853124211056461sketch\bin\rsLibs
        [mkdir] Created dir: C:\Users\km98k\AppData\Local\Temp\android7048853124211056461sketch\gen
        [mkdir] Created dir: C:\Users\km98k\AppData\Local\Temp\android7048853124211056461sketch\bin\classes
        [mkdir] Created dir: C:\Users\km98k\AppData\Local\Temp\android7048853124211056461sketch\bin\dexedLibs
         [echo] ----------
         [echo] Resolving Dependencies for MazeGeneratorPremium...
    Library dependencies:
    No Libraries
    
    ------------------
         [echo] ----------
         [echo] Building Libraries with 'release'...
       [subant] No sub-builds to iterate on
    
    -code-gen:
    Merging AndroidManifest files into one.
    Manifest merger disabled. Using project manifest only.
         [echo] Handling aidl files...
    No AIDL files to compile.
         [echo] ----------
         [echo] Handling RenderScript files...
         [echo] ----------
         [echo] Handling Resources...
    Generating resource IDs...
         [echo] ----------
         [echo] Handling BuildConfig class...
    Generating BuildConfig class.
    
    -pre-compile:
    
    -compile:
        [javac] Compiling 4 source files to C:\Users\km98k\AppData\Local\Temp\android7048853124211056461sketch\bin\classes
    -post-compile:
    
    -obfuscate:
    
    -dex:
    input: C:\Users\km98k\AppData\Local\Temp\android7048853124211056461sketch\bin\classes
    input: C:\Users\km98k\AppData\Local\Temp\android7048853124211056461sketch\libs\android-support-v4.jar
    input: C:\Users\km98k\AppData\Local\Temp\android7048853124211056461sketch\libs\processing-core.jar
    Pre-Dexing C:\Users\km98k\AppData\Local\Temp\android7048853124211056461sketch\libs\android-support-v4.jar -> android-support-v4-edfa3353337af3760454ef3f3e2ce14c.jar
    Pre-Dexing C:\Users\km98k\AppData\Local\Temp\android7048853124211056461sketch\libs\processing-core.jar -> processing-core-30d3e2a7c783a92ded538054147d1165.jar
    Converting compiled files and external libraries into C:\Users\km98k\AppData\Local\Temp\android7048853124211056461sketch\bin\classes.dex...
           [dx] Merged dex #1 (22 defs/44.9KiB)
           [dx] Merged dex #2 (1153 defs/1127.0KiB)
           [dx] Merged dex #3 (171 defs/703.5KiB)
           [dx] Result is 1346 defs/2298.6KiB. Took 0.6s
    
    -crunch:
       [crunch] Crunching PNG Files in source dir: C:\Users\km98k\AppData\Local\Temp\android7048853124211056461sketch\res
       [crunch] To destination dir: C:\Users\km98k\AppData\Local\Temp\android7048853124211056461sketch\bin\res
       [crunch] Processing image to cache: C:\Users\km98k\AppData\Local\Temp\android7048853124211056461sketch\res\drawable-hdpi\icon.png => C:\Users\km98k\AppData\Local\Temp\android7048853124211056461sketch\bin\res\drawable-hdpi\icon.png
       [crunch]   (processed image to cache entry C:\Users\km98k\AppData\Local\Temp\android7048853124211056461sketch\bin\res\drawable-hdpi\icon.png: 0% size of source)
       [crunch] Processing image to cache: C:\Users\km98k\AppData\Local\Temp\android7048853124211056461sketch\res\drawable-xhdpi\icon.png => C:\Users\km98k\AppData\Local\Temp\android7048853124211056461sketch\bin\res\drawable-xhdpi\icon.png
       [crunch]   (processed image to cache entry C:\Users\km98k\AppData\Local\Temp\android7048853124211056461sketch\bin\res\drawable-xhdpi\icon.png: 0% size of source)
       [crunch] Processing image to cache: C:\Users\km98k\AppData\Local\Temp\android7048853124211056461sketch\res\drawable-xxhdpi\icon.png => C:\Users\km98k\AppData\Local\Temp\android7048853124211056461sketch\bin\res\drawable-xxhdpi\icon.png
       [crunch]   (processed image to cache entry C:\Users\km98k\AppData\Local\Temp\android7048853124211056461sketch\bin\res\drawable-xxhdpi\icon.png: 77% size of source)
       [crunch] Processing image to cache: C:\Users\km98k\AppData\Local\Temp\android7048853124211056461sketch\res\drawable-xxxhdpi\icon.png => C:\Users\km98k\AppData\Local\Temp\android7048853124211056461sketch\bin\res\drawable-xxxhdpi\icon.png
       [crunch]   (processed image to cache entry C:\Users\km98k\AppData\Local\Temp\android7048853124211056461sketch\bin\res\drawable-xxxhdpi\icon.png: 69% size of source)
       [crunch] Processing image to cache: C:\Users\km98k\AppData\Local\Temp\android7048853124211056461sketch\res\drawable\icon.png => C:\Users\km98k\AppData\Local\Temp\android7048853124211056461sketch\bin\res\drawable\icon.png
       [crunch]   (processed image to cache entry C:\Users\km98k\AppData\Local\Temp\android7048853124211056461sketch\bin\res\drawable\icon.png: 0% size of source)
       [crunch] Crunched 5 PNG files to update cache
    
    -package-resources:
    Creating full resource package...
    
    -package:
    Current build type is different than previous build: forced apkbuilder run.
    Creating MazeGeneratorPremium-release-unsigned.apk for release...
    
    -post-package:
    
    -release-prompt-for-password:
    
    -release-nosign:
         [echo] No key.store and key.alias properties found in build.properties.
         [echo] Please sign C:\Users\km98k\AppData\Local\Temp\android7048853124211056461sketch\bin\MazeGeneratorPremium-release-unsigned.apk manually
         [echo] and run zipalign from the Android SDK tools.
    [propertyfile] Creating new property file: C:\Users\km98k\AppData\Local\Temp\android7048853124211056461sketch\bin\build.prop
    [propertyfile] Updating property file: C:\Users\km98k\AppData\Local\Temp\android7048853124211056461sketch\bin\build.prop
    [propertyfile] Updating property file: C:\Users\km98k\AppData\Local\Temp\android7048853124211056461sketch\bin\build.prop
    [propertyfile] Updating property file: C:\Users\km98k\AppData\Local\Temp\android7048853124211056461sketch\bin\build.prop
    
    -release-sign:
    
    -post-build:
    
    release:
        [mkdir] Created dir: C:\Users\km98k\AppData\Local\Temp\android4963803699278340410sketch\bin
         [echo] org.eclipse.jdt.core.JDTCompilerAdapter
    
    -set-mode-check:
    
    -set-release-mode:
    
    -release-obfuscation-check:
         [echo] proguard.config is ${proguard.config}
    
    -pre-build:
    
    -check-env:
    Android SDK Tools Revision 25.2.5
    Installed at C:\Users\km98k\Documents\Processing\modes\AndroidMode\sdk
    
    -setup:
         [echo] Project Name: MazeGeneratorPremium
    Project Type: Application
    
    -build-setup:
    Using latest Build Tools: 26.0.1
         [echo] Resolving Build Target for MazeGeneratorPremium...
    Project Target:   Android 6.0
    API level:        23
         [echo] ----------
         [echo] Creating output directories if needed...
        [mkdir] Created dir: C:\Users\km98k\AppData\Local\Temp\android4963803699278340410sketch\bin\res
        [mkdir] Created dir: C:\Users\km98k\AppData\Local\Temp\android4963803699278340410sketch\bin\rsObj
        [mkdir] Created dir: C:\Users\km98k\AppData\Local\Temp\android4963803699278340410sketch\bin\rsLibs
        [mkdir] Created dir: C:\Users\km98k\AppData\Local\Temp\android4963803699278340410sketch\gen
        [mkdir] Created dir: C:\Users\km98k\AppData\Local\Temp\android4963803699278340410sketch\bin\classes
        [mkdir] Created dir: C:\Users\km98k\AppData\Local\Temp\android4963803699278340410sketch\bin\dexedLibs
         [echo] ----------
         [echo] Resolving Dependencies for MazeGeneratorPremium...
    Library dependencies:
    No Libraries
    
    ------------------
         [echo] ----------
         [echo] Building Libraries with 'release'...
       [subant] No sub-builds to iterate on
    
    -code-gen:
    Merging AndroidManifest files into one.
    Manifest merger disabled. Using project manifest only.
         [echo] Handling aidl files...
    No AIDL files to compile.
         [echo] ----------
         [echo] Handling RenderScript files...
         [echo] ----------
         [echo] Handling Resources...
    Generating resource IDs...
         [echo] ----------
         [echo] Handling BuildConfig class...
    Generating BuildConfig class.
    
    -pre-compile:
    
    -compile:
        [javac] Compiling 4 source files to C:\Users\km98k\AppData\Local\Temp\android4963803699278340410sketch\bin\classes
    
    -post-compile:
    
    -obfuscate:
    
    -dex:
    input: C:\Users\km98k\AppData\Local\Temp\android4963803699278340410sketch\bin\classes
    input: C:\Users\km98k\AppData\Local\Temp\android4963803699278340410sketch\libs\android-support-v4.jar
    input: C:\Users\km98k\AppData\Local\Temp\android4963803699278340410sketch\libs\processing-core.jar
    Pre-Dexing C:\Users\km98k\AppData\Local\Temp\android4963803699278340410sketch\libs\android-support-v4.jar -> android-support-v4-c075d0398e79368cf6709aaee08e2dde.jar
    Pre-Dexing C:\Users\km98k\AppData\Local\Temp\android4963803699278340410sketch\libs\processing-core.jar -> processing-core-01b136ad09d8f64ffe4b6d4e6d8eb34b.jar
    Converting compiled files and external libraries into C:\Users\km98k\AppData\Local\Temp\android4963803699278340410sketch\bin\classes.dex...
           [dx] Merged dex #1 (22 defs/44.9KiB)
           [dx] Merged dex #2 (1153 defs/1127.0KiB)
           [dx] Merged dex #3 (171 defs/703.5KiB)
           [dx] Result is 1346 defs/2298.6KiB. Took 0.4s
    
    -crunch:
       [crunch] Crunching PNG Files in source dir: C:\Users\km98k\AppData\Local\Temp\android4963803699278340410sketch\res
       [crunch] To destination dir: C:\Users\km98k\AppData\Local\Temp\android4963803699278340410sketch\bin\res
       [crunch] Processing image to cache: C:\Users\km98k\AppData\Local\Temp\android4963803699278340410sketch\res\drawable-hdpi\icon.png => C:\Users\km98k\AppData\Local\Temp\android4963803699278340410sketch\bin\res\drawable-hdpi\icon.png
       [crunch]   (processed image to cache entry C:\Users\km98k\AppData\Local\Temp\android4963803699278340410sketch\bin\res\drawable-hdpi\icon.png: 0% size of source)
       [crunch] Processing image to cache: C:\Users\km98k\AppData\Local\Temp\android4963803699278340410sketch\res\drawable-xhdpi\icon.png => C:\Users\km98k\AppData\Local\Temp\android4963803699278340410sketch\bin\res\drawable-xhdpi\icon.png
       [crunch]   (processed image to cache entry C:\Users\km98k\AppData\Local\Temp\android4963803699278340410sketch\bin\res\drawable-xhdpi\icon.png: 0% size of source)
       [crunch] Processing image to cache: C:\Users\km98k\AppData\Local\Temp\android4963803699278340410sketch\res\drawable-xxhdpi\icon.png => C:\Users\km98k\AppData\Local\Temp\android4963803699278340410sketch\bin\res\drawable-xxhdpi\icon.png
       [crunch]   (processed image to cache entry C:\Users\km98k\AppData\Local\Temp\android4963803699278340410sketch\bin\res\drawable-xxhdpi\icon.png: 77% size of source)
       [crunch] Processing image to cache: C:\Users\km98k\AppData\Local\Temp\android4963803699278340410sketch\res\drawable-xxxhdpi\icon.png => C:\Users\km98k\AppData\Local\Temp\android4963803699278340410sketch\bin\res\drawable-xxxhdpi\icon.png
       [crunch]   (processed image to cache entry C:\Users\km98k\AppData\Local\Temp\android4963803699278340410sketch\bin\res\drawable-xxxhdpi\icon.png: 69% size of source)
       [crunch] Processing image to cache: C:\Users\km98k\AppData\Local\Temp\android4963803699278340410sketch\res\drawable\icon.png => C:\Users\km98k\AppData\Local\Temp\android4963803699278340410sketch\bin\res\drawable\icon.png
       [crunch]   (processed image to cache entry C:\Users\km98k\AppData\Local\Temp\android4963803699278340410sketch\bin\res\drawable\icon.png: 0% size of source)
       [crunch] Crunched 5 PNG files to update cache
    
    -package-resources:
    Creating full resource package...
    
    -package:
    Current build type is different than previous build: forced apkbuilder run.
    Creating MazeGeneratorPremium-release-unsigned.apk for release...
    
    -post-package:
    
    -release-prompt-for-password:
    
    -release-nosign:
         [echo] No key.store and key.alias properties found in build.properties.
         [echo] Please sign C:\Users\km98k\AppData\Local\Temp\android4963803699278340410sketch\bin\MazeGeneratorPremium-release-unsigned.apk manually
         [echo] and run zipalign from the Android SDK tools.
    [propertyfile] Creating new property file: C:\Users\km98k\AppData\Local\Temp\android4963803699278340410sketch\bin\build.prop
    [propertyfile] Updating property file: C:\Users\km98k\AppData\Local\Temp\android4963803699278340410sketch\bin\build.prop
    [propertyfile] Updating property file: C:\Users\km98k\AppData\Local\Temp\android4963803699278340410sketch\bin\build.prop
    [propertyfile] Updating property file: C:\Users\km98k\AppData\Local\Temp\android4963803699278340410sketch\bin\build.prop
    
    -release-sign:
    
    -post-build:
    
    release:
    
  • Answer ✓

    @sarrio=== as you can see in the console the problem seems to be that the key.store is not found and i dont think that it happens because the code is "too long". In order to be sure: try to export signed apk for another code, with exactly the same values. Another thing i cannot understand is that you cannot import your project in AS or another IDE but as you dont put any lines of your code i cannot verify this point and see why. Third thing is to download the sdk by yourselves and install it manually.

Sign In or Register to comment.