No key.store and key.alias properties found in build.properties - java

I am using ant-release to do a 1-step build of my Android app.
My build.properties looks like this:
application.package=xxxxx
key.store=sonr
key.alias=sonr labs
key.store.password=xxxx
key.alias.password=xxxx
When I run ant-release everything is fine except for application signing. I get the error:
-release-prompt-for-password:
-release-nosign:
[echo] No key.store and key.alias properties found in build.properties.
[echo] Please sign /Users/syalam/Documents/git/joeborn-sonr/sonr/bin/SONR-release-unsigned.apk manually
[echo] and run zipalign from the Android SDK tools.
[propertyfile] Updating property file: /Users/syalam/Documents/git/joeborn-sonr/sonr/bin/build.prop
[propertyfile] Updating property file: /Users/syalam/Documents/git/joeborn-sonr/sonr/bin/build.prop
[propertyfile] Updating property file: /Users/syalam/Documents/git/joeborn-sonr/sonr/bin/build.prop
[propertyfile] Updating property file: /Users/syalam/Documents/git/joeborn-sonr/sonr/bin/build.prop
How can I resolve this?
PS. I followed this tutorial for getting my build process down http://www.androidengineer.com/2010/06/using-ant-to-automate-building-android.html

I had this problem too recently, I think that that tutorial is out of date...
The key.alias etc directives need to be in a file named ant.properties. There's no file called build.properties any more.

Ultimate answer of any this kind of question is in android-sdk/tools/ant/build.xml
Document is at http://developer.android.com/guide/developing/building/building-cmdline.html

regarding 'Sheehan Alam' issue that follows file name fix
[signjar] jarsigner error: java.lang.RuntimeException: keystore load: ...
You probably have key.store set to a value with a full path.
Make sure that you are using '/' and not '\'.

Is keystore the name of your keystore file? From the tutorial:
Where keystore is the name of your keystore file and change the value
of key.alias to your keystore's alias. Now when you run ant release,
you will be prompted for your passwords, and the build will
automatically sign and zipalign your package.
In your example above, you're using the same value for both key.store and key.alias.
The only other potential discrepancy I can see is that -release-nosign: is referencing build.properties when looking for key.store and key.alias, but referencing build.props later on.
I'm not an Andriod developer, so the best I can do is be a second pair of eyes; sorry.

If you already have a project that you'd like to add the Ant build script to, then there is an easy command line tool you can use. Open up a command prompt and navigate to the base directory of your project. From there, use the command:
android update project --path .

add "<"property file="build.properties" /">"
in your build.xml at the project folder.

Related

androiddeployqt.exe now crashes when migrating from Qt5 to Qt6

I am developing an android application using Qt.
I decided to migrate from Qt5 to Qt6 for the convenience of the project, but androiddeployqt.exe, a tool for deploying to Android, started to crash after migrating to Qt6.
"C:\Qt\6.2.4\mingw_64\bin\androiddeployqt.exe" --input ~/android-{packageName}-deployment-settings.json --output ~/build-Android_Qt_6_2_4_Clang_arm64_v8a/android-build --android- platform android-30 --jdk "C:/Program Files/Android/Android Studio/jre" --verbose --gradle
Generating Android Packages
Input file: ~/src/build-Android_Qt_6_2_4_Clang_arm64_v8a/android-{packageName}-deployment-settings.json
Output directory: ~/src/build-Android_Qt_6_2_4_Clang_arm64_v8a/android-build/
Application binary: building
Android build platform: android-30
Install to device: No
Delete missing files ~/depend_android ~/build-Android_Qt_6_2_4_Clang_arm64_v8a/android-build/{packageName}
Delete missing files ~/depend_android ~/build-Android_Qt_6_2_4_Clang_arm64_v8a/android-build/{packageName}
Delete missing files ~/depend_android ~/build-Android_Qt_6_2_4_Clang_arm64_v8a/android-build/{packageName}
Delete missing files ~/depend_android ~/build-Android_Qt_6_2_4_Clang_arm64_v8a/android-build/{packageName}
Delete missing files ~/depend_android ~/build-Android_Qt_6_2_4_Clang_arm64_v8a/android-build/{packageName}
...
As shown in the above log, the same log output is looped infinitely and eventually crashes
I checked the source code under the Qt installation directory to solve the problem. (C:\Qt\6.2.4\Src\qtbase\src\tools\androiddeployqt\main.cpp)
The cause of the loop seems to be that the parent directory of the specified Path is passed instead of the directory of the Path specified by the argument to deleteMissingFiles() of main.cpp L400.
As of Qt5, the specified Path was passed instead of the parent directory's Path. At least that's what the code in androiddeployqt/main.cpp looks like.
Qt6 androiddeploy qt/main.cpp L400
deleteMissingFiles(options, src.absoluteDir(), dst.absoluteDir());
Qt5 androiddeploy qt/main.cpp L386
deleteMissingFiles(options, src.absoluteFilePath(), dst.absoluteFilePath());
I would like to ask people who are developing using Qt6 and androiddeployqt.exe. How do you work around this issue?

How to fix "NoClassDefFoundError" with BCrypt (org.mindrot.BCrypt)?

I try to create a Minecraft Plugin (it's my first one) and I can't fix this error:
So, the plugin compiles good but when the code has to execute this code :
BCrypt.checkpw(mdp, result.getString("mdp"))
that come from the lib org.mindrot.BCrypt, I have this error :
Caused by: java.lang.NoClassDefFoundError: org/mindrot/BCrypt
But, when I open my JAR with WinRAR, there is my lib bcrypt (so it's well export). And it's also in my .classpath.
Can you help me ?
Thanks.
There are several ways to configure the CLASSPATH when launching a java application via the java command. According to what you posted so far, I would use the -classpath flag:
java -classpath spigot.jar;jbcrypt.jar class.containing.main.method.MyMain
Alternatively, you could modify the MANIFEST in file spigot.jar. Refer to Adding Classes to the JAR File's Classpath.
Or you could copy jbcrypt.jar to the directory pointed to by the java System property "java.ext.dirs".

In `launch.json`, what should `projectName` be when attaching to remote java application?

When debugging Java in VSCode, if I reach a breakpoint and try to inspect a value by entering its name in the Watch panel, I get the following error:
That's clear enough. I need to add the projectName property to launch.json ... I assumed that would be the <name> field in the .project file that VSCode generated from the pom.xml file. But when I add that to launch.json, it then tells me that it can't find the project:
So, I'm guessing that it's looking for something different as the project name, but I don't know what that would be. If you can help, I would appreciate it. :o)
Someone else had the same problem:
https://stackoverflow.com/a/49696053/8273587
Specifically, I've been using the project name found in .project as well. As it turns out, I needed to use the Artifact ID in the relevant pom.xml

What is this error: Missing stack map in ....?

I created lib for my blackberry java app (jar file). But it isn't work.
com.myapp.MyManager: Error!: Missing stack map in: getInstance at label: 31
What is this?
If i copy package of my lib to my blackberry app, it works well. But I need have lib.
You need to preverify the jar file manually. you can do the following to preverify the jar.
execute the following command:
preverify -classpath "JDE_PATH_HERE\lib\net_rim_api.jar" "your_jar_filename"
Read more: http://getablogger.blogspot.com/2009/09/how-to-include-external-jar-file-in.html#ixzz1iTh6g1SF
You can try this link as well .It has instructions on how to do it.

how to overcome this exception

i am using a third part SDK with my java application.The providers of sdk provided me exe file that i installed and one java project.I installed the exefile.
Now when i run the code i get a dialog box showing error
Excepting a absulut path for library AKSSDK.dll
No AKSSDK in java.library.path
could not load load library AKSSDK
how do i resolve it?
You need to run java with the following configuration:
java -Djava.library.path={where your library is}
Note the above is the directory where your library is, not the full path name of the library!
You have to add AKSSDK.dll to your PATH environment variable.
It would look like this:
echo %PATH%
C:\xyz\;C:\other\etc\etc;C:\Your\Path\To\AKSSDK.dll
EDIT
To modify your environment variable you have to go to:
MyComputer/RightClick/Properties/Advanced/EnvironmentVariables
(source: vlaurie.com)
And modify the existing Path under System variables
See this tutorial for more details: http://vlaurie.com/computers2/Articles/environment.htm
I have had problems with the white space of ( Program files ) in the past. If possible install your SDK on something like C:\SondaSDK or C:\You\SondaSDK
That way you shouldn't have problems.
You can manually set the path to this value by starting with
java -Djava.library.path=PATH_TO_LIBRARY

Categories

Resources