Android Question [RESOLVED] My First Application fails to run with jarsigner: unable to open jar file: bin\temp.ap_ Error

RKM904

Member
Licensed User
Longtime User
After a 5 year absence from b4A I am attempting to restart development for Android using B4A.

My approach was to start fresh since I have not used B4A at all over the past number of years and forgotten most of what I learned 5 years ago. I followed the instruction in the B4X booklets for B4A. (Thanks Klaus and Eril)

  • Downloaded and installed Open JDK 11 (installed in C:\Java)
  • Downloaded and installed the SDK (installed in C:\Android)
  • Using SDK Manager installed all recommended items (also installed in C:\Android)
  • Did a clean install of B4A (licensed version of 9.50)
  • Configured the paths using the Paths Configuration tool
  • Checked that the Paths were properly configured using file explorer
  • Created the "MyFirstApplication" sample
  • Set up and deployed B4A bridge
Used the Designer with wireless bridge without any problems
The sample compiled cleanly but when I attempt to run it I get the following error:

B4X:
B4A Version: 9.50
Java Version: 11
Parsing code.    (0.00s)
Building folders structure.    (0.01s)
Compiling code.    (0.00s)
Compiling layouts code.    (0.00s)
Organizing libraries.    (0.00s)
(AndroidX SDK)
Generating R file.    (0.00s)
Compiling generated Java code.    (1.01s)
Convert byte code - optimized dex.    (0.32s)
Packaging files.    (0.23s)
Copying libraries resources    (0.00s)
Signing package file (debug key).    Error

jarsigner: unable to open jar file: bin\temp.ap_


In the configuration tool the android jar path is “C:\Android\platforms\android-28\android.jar”. I checked using file explorer and the only version installed is android 28 and the jar file exists in the directory.

I have spent many hours in the forum and on the web seeking a solution with no success. There were references to this issue that very significantly out of date so I am reluctant to make changes based on such dated information.

Any help or guidance would be greatly appreciated.
 

f0raster0

Well-Known Member
Licensed User
Longtime User
maybe something with debug-key?
try:
Menu Tools - Private Sign Key

or clean the project and compile again
 
Upvote 0

RKM904

Member
Licensed User
Longtime User
Where is the project saved?
It is saved in a directory on my Windows 10 desktop "D:\development\Basic4Android\ProjectFiles\MyFirstProgam",
within that directory there are 3 directories and 2 files:
AutoBackups [directory]
Files [directory]
Objects [directory]
MyFirstProgram.b4a [file]
MyFirstProgram.b4a.meta [file]
 
Upvote 0

RKM904

Member
Licensed User
Longtime User
The issue was a virus protection issue. I use VIPRE virus protection and it flagged C:\Android\build-tools\27.0.1\aapt.exe as a potential virus. Allowing aapt.exe access solved the compilation problem.
I have changed the heading on this question to RESOLVED. Thank you Erel and f0raster0 for your suggestions.

I have a different installation issue now, but will start a new thread.
 
Upvote 0
Top