Worklight 6.1 Android ant build not using shell template configChanges - ibm-mobilefirst

I was having a problem that all android apps build with 6.1 and ant were closing on rotate.
When i notices that the AndroidManifest.xml was not including the changeConfig screenSize.
When i look at my AndroidManifest.xml.wltemplate.wluser i see clearly
android:configChanges="orientation|keyboardHidden|screenSize"
Yet after ant build doing an ant build i see this in the AndroidManifest.xml
android:configChanges="orientation|keyboardHidden"
Other configurations(packageName, minApiVersion) made in the wluser template are being used.
My build command looks like::
<app-builder applicationFolder="${appPath}/${appName}" environments="android"
nativeProjectPrefix="${appName}" outputFolder="./bin"
skinBuildExtensions="build-dojo.xml" worklightserverhost="${wlServerAddress}"/>
Is there something im missing, this worked in 505.
Worklight Ant Task version 6.1.0.00.20131126-0630

Try this instead of making changes in AndroidManifest.xml.wltemplate.wluser
Add your changes to AndroidManifest.xml which exists in nativeEmptyApp folder if you are using inner application.
or
If you dont have inner application add your changes in AndroidManifest.xml which exists in nativeResources in Android project.
Hoping this helps.
Cheers !!

Related

Building a asset pack in a Ionic project in Android studio

I have recently converted my only cordova project to use Ionic and Capacitor.
Publishing to the app store I find my app is too big (in the aab format), because I have too many images.
I understand I need to create an asset pack. All I can find about the details of a creating an asset pack is https://developer.android.com/guide/playcore/asset-delivery/integrate-native
(anyone have any better information?).
After following those steps, in VS Code I ...
> ionic build
> ionic capacitor build
Then in Android studio I do.
Menu | Build | Make Project
I get the following error:
Build file 'C:\code\myco-match\android\build.gradle' line: 27
A problem occurred evaluating root project 'android'.
> Could not find method android() for arguments [build_19eh0vogqj489iczcfbatfj08$_run_closure2#69641835] on root project 'android' of type org.gradle.api.Project.
Line 27 is
android {
assetPacks = [":species-images"]
}
Did I leave out a step in the build?
Am I missing something in my gradle configuration? I am not that familiar with gradle).
Did I forget something in my initial app conversion? It was my 1st cordova project converted to my 1st ionic and capacitor project.
Any ideas?
The problem is that in the reference in my first link above I mis-read step 2.
https://developer.android.com/guide/playcore/asset-delivery/integrate-native
Reading the following stack overflow issue
Gradle sync failed: Could not find method android() for arguments on root project on android studio
Gabriele Mariotti said the poster "using the wrong build.gradle file.
You can't define the android block in the top-level file."
Reviewing the instructions step 4 says "In the project’s app build.gradle file"
I had incorrectly changed the top-level build.gradle file.
Step 7 lists build.gradle as if you change it, but that list item ought to be /app/build.gradle.
Now I can build and package using android studio.

How to use "increment_build_number" in xcworkspace projects?

I am trying to automate my build process with fastlane in my react native project. I am following this article. In increment_build_number action I couldn't find any option to specify the .xcworkspace project. I tried using workspace tag, but didn't work.
The action does not have a workspace parameter: https://docs.fastlane.tools/actions/increment_build_number/#parameters
increment_build_number is more or less a wrapper for agvtool from Apple. That tool unfortunately only works on xcodeproj files: http://www.manpagez.com/man/8/agvtool/ You actually don't even specify the file, it looks for it in the folder you are executing the command in.
Which is also why increment_build_number only uses the xcodeproj parameter to change the directory before running the command: https://github.com/fastlane/fastlane/blob/04ef48fad041eb6c62e8015264df781d3bfc9983/fastlane/lib/fastlane/actions/increment_build_number.rb#L15-L21
You will probably have to modify your usage to specify the xcode project (that should exist next to the workspace anyway) or execute it in a way so the action can find it automatically.

no such module SWXMLHash while building SourceKitten

I cloned SourceKitten from github and when I open the project in Xcode, I am not able to build
In class Clang+SourceKitten.swift, I am getting No such module SWXMLHash
I have tried running swift build and make install from command line, which works perfectly. But, I need to create my own custom command line tool (similar to sourcekitten) - for which I need to open project and should be able to build and run it.
Well, I needed to update the carthage and open xcworkspace and everything was fine.

Intellij IDEA - JavaFX packager : access denied

I'm trying to generate an artifact of my JavaFX application using Intellij but for some reason I always end up having JavaFX packager throwing an access denied error on my output directory.
Generating a simple jar works fine though.
I'm using it on Windows 8.1 with Java 8.
I had the same problem. I kind of solved it:
by ticking the "Build on make" box in the Project Structur Dialog
starting a Run of my Java App in Intellij Idea
Now the executable jar magically appeared in my build folder. God knows why.
I had this problem and solved it by deleting the Artifact from IntellIJ, then deleting the "out/artifact" previously created folder where it tried to build my jar and finally re created an artifact from scratch. For no specific reason it now worked.
I have encountered the same problem recently. I checked the permissions of the directory and can read and write. Later I deleted the artifact and re-created a new one to solve the problem. I hope to help people who have encountered this problem.
I had this problem. I ran into it because When I added artifact with + button in Project Settings->Artifacts, I selected JAR artifact , and change JAR to JavaFx Application from type drop down box on right side pane. Later, I removed this artifact and pressed + button, then selected JavaFx Application from drop down list, then it was builded successfully. My JDK version is 8.
When I call JavaVXPacker from the command line I get the following:
C:\Users\Ingo>javafxpackager -help
javafxpackager.exe has been renamed javapackager.exe.
The original file may be removed in a future release in lieu of javapackager.
Please update your scripts.
...
...
So I guess IntelliJ has to update it's script to re-enable the feature???
(using Windows 10 and JDK Liberica 15+36)
Go to File > Project Structure
Click on Artifacts on the left panel.
Thereafter click on the plus icon to add a Jar From modules with dependencies…
A pop-up will be shown and there you would have to select for the startup class of your project.
Click on OK twice to save the changes.
Lastly go to Build > Build Artifacts... And select build action.
Now your jar will be generated in the out folder of your project.
For a more details guide, please refer to this post

where is gradle storing the android buildapk?

I use the command gradle clean build
it ends with BUILD SUCCESSFUL, but where can I find the build .apk?
Or how can I set up the build directory destination?
Look in //build/apk. You'll need to do this outside of Android Studio since AS filters the directories and hides "apk".
Update: Android Studio no longer filters the output directory, so you can just drill into the build directory (under the app).