using the switches:
cca create YourApp --link-to=path/to/manifest.json
The packaged *.apk is built from the default create namespacing of "HelloWorld" and not "YourApp".
A cursory rename gave me INSTALL_PARSE_FAILED_MANIFEST_MALFORMED errors.
It seems a bit brittle. Is there something in the cca toolchain for this?
If not which files need to be changed?
Can someone with a 1500pt reputation add a tag mobile-chrome-apps please?
Thanks,
Nic
The argument YourApp is not the name of the application, but the folder where it is created. The name of your application is specified inside manifest.json and the Android packageId inside the manifest.mobile.json.
After you create your application (whether using --link-to or just starting with the default), modify those files and run cca prepare. The name and packageId should be correctly updated.
(Caveat: there are some leftover bits that don't get cleaned up, we have an open bug, but it should not impact you)
Probably your problem is because you have used capital letter in your project name:
Com.Example.PackageName
Try again using only low letter:
com.example.packagename
It should work!
Related
We're upgrading to Delphi 11.1 from 10.4.
We have a few scripts which build and deploy Android projects. They assemble an msbuild command that looked like this:
msbuild someproject.dproj /v:q /p:Platform=Android /t:Build;Deploy /p:Config=Release /p:BT_BuildType=AppStore
With 11.1, this throws an error message:
C:\Program Files (x86)\Embarcadero\Studio\22.0\bin\CodeGear.Common.Targets(940,7): error MSB4036: The "XmlPeek" task was not found. Check the following: 1.) The name of the task in the project file is the same as the name of the task class. 2.) The task class is "public" and implements the Microsoft.Build.Framework.ITask interface. 3.) The task is correctly declared with <UsingTask> in the project file, or in the *.tasks files located in the "C:\Windows\Microsoft.NET\Framework\v2.0.50727" directory. [someproject.dproj]
Now, C:\Program Files (x86)\Embarcadero\Studio\22.0\bin\rsvars.bat, which is used by all of our build scripts, explicitly sets the .NET framework as below:
#SET FrameworkDir=C:\Windows\Microsoft.NET\Framework\v4.0.30319
#SET FrameworkVersion=v4.5
After some research, I hit on the idea of adding a toolsversion parameter to the msbuild command as below, and this worked:
msbuild someproject.dproj /v:q /p:Platform=Android /t:Build;Deploy /p:Config=Release /p:BT_BuildType=AppStore /toolsversion:4.0
This is all well and good, but I would prefer not to hard-code the toolsversion number in the script(s).
Is there a way I can programmatically obtain the correct value of the toolsversion that Delphi itself is using when it generates builds, etc.?
I assume that just finding the highest .NET version installed will not suffice (and even then, one has to "translate" that to a toolsversion). It has to marry up with whatever Delphi is doing (e.g., in the CodeGear.Common.Targets file referenced in the original error message).
This is a bug in Delphi 11.1 that has at least 3 bug reports: RSP-37855, RSP-38466, and RSP-38467.
You can add /tv:4.0 to your MSBuild command line, or modify the first line in the .dproj file to:
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="4.0" DefaultTargets="Build">
Assuming that rsvars.bat has been run,
FOR %%v IN ("%frameworkdir%") DO SET "toolsversion=%%~nv"
ECHO msbuild ...blah... /toolsversion:%toolsversion:~1%
The variable frameworkdir will be set by rsvars.bat. The for command parses its value (eg. C:\Windows\Microsoft.NET\Framework\v4.0.30319 as though it is a filename, and picks v4.0 as the "filename" (~n modifier [filename] of the metavariable %%v)
Then use the value assigned to toolsversion, starting at character 1 (where the first character is "character 0")
--- Given more info in comment
FOR %%v IN ("%frameworkdir%") DO ECHO %%~nxv|FINDSTR /R ".*\..*\.">nul&IF ERRORLEVEL 1 (SET "toolsversion=%%~nxv") ELSE SET "toolsversion=%%~nv"
Oh ye of little faith :)
I have a react native application and I changed the package name of the application using https://www.npmjs.com/package/react-native-rename. After that I tried to run the project but its saying that the application is not registered. I have tried the following steps also.
Opened the project in android studio and make sure that the package name is changed and all the files are also in the same package name.
Tried cleaning the old gradle files.
Uninstalled the previously installed version of the app (The one which have the original package name.
Any help would be appreciated. Thanks in advance
You need to check 2 files to make sure you have equal names there:
index.js -> application name in the last line:
AppRegistry.registerComponent('YourAppName', () => App);
app.json -> name property
In both places names should be equal (case sensitive).
Have you changed the values in the index.ios.js, index.android.js and app.json files?
There are some instructions here.
android\app\src\main\java\com{someFolderName}\MainActivity.java
you landed up on this answer because still you are not able to solve the issue
open the file mentioned in above in title
this used for
Returns the name of the main component registered from JavaScript.
This is used to schedule rendering of the component.
look for method
#Override
protected String getMainComponentName() {
return "AddYourNewNameHere";
}
which might be returning a hard coded string replace it to desired name!!
EXTENDED TIP
ensure you clean your gradle demon as the project does not compile sometimes
for that use following
cd android
gradlew clean
In worklight it seems that the android package name is set by the varible ${packageName}.
Where is this variable set? And how can I change it?
Right now the default seems to be com.applicationName. In the app im working on, this package name already exists in Google Play, so I would like to change it to com.corperationName.applicationName.
I know I can do this via Ant during Android project compilation, but I was wondering if there was somewhere within Worklight I can do this.
I was able to do this for Shell and Inner projects by making the following changes to the Shell project (check in or backup the shell and test before committing changes):
Add the following dir structure to the ShellApp/android/native/src
directory: com/corpname/{$appName}
Copy the contents of the ${packageDirectory} directory into the new
{$appName} directory (for me it was
${appName}.java.wltemplate.wluser, ForegroundService.java.wltemplate,
GCMIntentService.java.wltemplate).
In the files copied, every reference to ${packageName} needs to be
replaced with com.corpname.{$appName}
In AndroidManifest.xml.wltemplate.wluser, every reference to
${packageName} needs to be replaced with com.corpname.{$appName}.
Remove the ${packageDirectory} from the project.
Every inner project created from this Shell project should now have the package structure as com.corpname.appname
I have two NDK project in my eclipse, and I want to configure NDK_builder for them.
I've finished the configure for the first project, by [Project->Properties->Builders->New] step and edit the configuration. The builder name is NDK_builder.
Anyway, when I try to apply this procedure to my second project, in the edit configuration step, when I try to name my builder 'NDK_builder', here comes the error: ' A 'Program' configuration with this name already exists'.
So, should I change the builder's name for this project? And the builders' name of each project are not the same? That is quite unconvinient.
Could anyone help me with that? Thank you!
Same error, had to create a second builder.
I just appended the project name like so: "NDK Builder for [project name]".
There is a Bug Report for that error - https://bugs.eclipse.org/bugs/show_bug.cgi?id=365232
Martin Larente CLA Friend 2011-11-30 13:42:36 EST
It seems that Eclipse is unable to create an external builder that has the same name of another project's external builder, even though the corresponding launch configuration is saved in the project folder.
This is the answer:
Michael Rennie CLA Friend 2011-11-30 16:23:13 EST
This is because launch configurations have a flat naming scheme. See also bug 59289. This bug has been marked as a duplicate of bug 59289
Also see https://bugs.eclipse.org/bugs/show_bug.cgi?id=59289 and https://bugs.eclipse.org/bugs/show_bug.cgi?id=400126
i try to build Froyo for a given dev board, but i don't know how to configure the source tree, especially where should put the board specific code and the board configuration mkf ile, either in vendor or device ?
I first put my board specific code and config file in the vendor folder as:
vendor\cpyname\the_product_1\, with BoardConfig.mk that describe my board configuration.
I then have vendor\cpyname\product\ with the_product_1.mk to start the source tree build.
can't build with tapas, when giving product name (the_product_1), i get an error
build/core/product_configuration.mk
the_product_1 not found.
I also try with the device folder, like:
device\the_product_1\ with BoardConfig.mk,
and device\the_product_1\product\ with the_product_1.mk
tapas give the same result.
Note that first configuration can build and generate image with make PRODUCT-the_product_1-eng
I also personally find the build process quite obscure and missing documentation. Please help :)
Lionel
Froyo and the after use devices instead of vendor directory ,you will find sample there.