how to add android.manifest in my cordova project - visual-studio-cordova

I have a problem installing ".apk" file that i generated to my device
I just discovered on StackOverflow that i have to set the version in android.manifest file of Cordova Project.
But i don't have any android.manifest!
how can add it?
where do i neet to put this file?
if yes where can i find a template to set all parameters?
I have visual studio 2015 with Cordova installed and in "add new
file" there is no android.manifest

I just discovered on StackOverflow that i have to set the version in android.manifest file of Cordova Project. But i don't have any android.manifest!
If you compile your project, you can find AndroidManifest.xml under Project Folder\platforms\android\AndroidManifest.xml. But it is not recommended modifying this file, because in cordova, in every compilation for android platform, this file will be overrided.
The recommended way is to double click config.xml file under your project folder and you will get something like below:
by "the Version" if you mean the SDK Version, then you should modify the Minimum/Maximum/Target API level.
If you mean the version of your app, then you should modify the value of Version Code.
After this, delete the app in your emulator/device, rebuild your project and run.

Related

Google Play ask for deobfuscation txt file, Xamarin Forms

When I previously released my application it went well, but now I try to upload a new version of my application and Google Play says that it has some java/kotlin code in it and asks for me to upload an deobfuscation txt file. I have been looking for answers and the people mention a "mapping.txt" file which android studio creates when you are using proguard or R8 code shrinkers.
Does anyone know where I can generate such file or where it may be?
Note: I haven't added or upgraded any nuget packages since the last time I updated the application and I already looked in the bin/obj folders with no luck. Also I checked the archive folder that creates when I bundle the application.
The obfuscation step of ProGuard is disabled when building a Xamarin Android application. Therefore, there's no deobfuscation file generated and no need to upload one. You can ignore the warning.
From the Xamarin.Android documentation:
The Xamarin.Android ProGuard configuration does not obfuscate the APK. In fact, it is not possible to enable obfuscation through ProGuard (even through the use of custom configuration files).
Edit: There is currently an open PR in Xamarin.Android to have ProGuard generate the mapping.txt file. Note that this is only to silence the warning, though. In theory, it's not needed.

Solution explorer menu in Visual Studio 2015 is missing jspm packages and config.js

I'm following an aurelia tutorial with Visual Studio 2015 and ASP.NET core where I installed NPM and run JSPM init, but after successfully creating all the files I can't find the jspm packages or config.js file in my Solution explorer.
UPDATE 1 The hidden folders and files are now showing up, but I have to right click on the main directory and chose the option to add to existing item. As you can see from the image I have a lot of files and folders, how can I speed up the process? Is there a way to just add all files to the project at the same time instead of manually?
Note: The config.js and jspm packages are on my physical directory so I know they exist, but how can I make them show up on my solution explorer menu?
STEPS:
I opened cmd prompt and entered: jspm init + npm install jspm --save-dev and selected yes on everything except on the configuration file part I entered: wwwroot and enter yes on everything, then selected babel.
Please let me know what I should do to make the files show up on the solution explorer or at least point me in the right direction. Thank you.
Originally VS projects did not automatically include new files that were added to the Project directory manually outside of Visual Studio.
However, I find that with VS2015 Update 3 and a new AspNet Core project they do "automagically" show up.
Not sure if maybe you're on a slightly older build, etc. but you could try the older approach as follows:
Select the Project in the Project Explorer (you currently have a solution-level item selected in that screenshot) and then you will see a new icon appear in the row of icons across the top of the Solution Explorer. This is the "Show All Files" icon/button.
Clicking it will show items that are in the physical directory but are not part of the VS Project. You should be able to right-click the file an choose include in project (or at least you used to be able to do this in older projects, etc. as stated).

How do I get Android Studio to include resources in a .jar file?

I'm using Unity 5. It still expects java plugins to be a .jar file built with JDK 1.6.
I had this working under Unity 4, but they changed something. Now I get this error while building the apk from Unity:
OBSOLETE - Providing Android resources in Assets/Plugins/Android/res
is deprecated, please move your resources to an Android Library. See
"Building Plugins for Android" section of the Manual.
How do I get AS to put the resources into classes.jar? The "Building Plugins for Android" doesn't mention resources.
Additional information about my project:
The project references Google Play Services, so I need version.xml in there
<integer name="google_play_services_version">6587000</integer>
Which contains the version number for the reference in the Manifest.
<meta-data android:name="com.google.android.gms.version" android:value="#integer/google_play_services_version" />
But if I include this file in res/values in my AS library project, it's still output as an xml file in res/values next to the classes.jar.
Incidentally, I'm digging the .jar file out of
/ApplicationName/build/intermediates/exploded-aar/ProjectName/LibararyName/unspecified/classes.jar
after building the project.
First of all, this is a warning and not an error.
Providing resources in Unity in Assets/Plugins/Android/res/ folder is not recommended, because it can cause resource conflicts.
When you provide resources in an Android library, they are correctly merged during build process.
Basically, you have three options:
convert your plugin into an Android library. Or you can init an empty library, add your .jar file to bin/, your resources to res/ (there should be a manifest and android.library=true in project.properties). You can do this by calling android create lib-project (more details)
if you compile your plugin directly using gradle or in Android Studio, you can use .aar file produced, given that you have set your project up as a library (apply plugin: 'com.android.library' in your build.gradle file). Just put it in any folder of your project, it should automatically be detected as Android-only plugin.
continue providing resources in res/ and wait for it to be completely unsupported by Unity.
Hope this helps.

Could not find SDK "SQLite.WinRT" - Add Reference shows "Missing value for TargetPlatformWinMDLocation property"

I'm trying to create a Multi-device hybrid app that uses Typescript, WinJS, and a persistent local database. I've got it working to the point of rendering WinJS controls.
However, when I attempt to add WebSQL functionality according to the instructions for adding a Cordova plugin (go to config.xml file--> under plugins tab, check WebSQL Polyfill), it will no longer compile.
The compiler error is C:\Program Files (x86)\MSBuild\12.0\bin\amd64\Microsoft.Common.CurrentVersion.targets(1886,5): error MSB3774: Could not find SDK "SQLite.WinRT, Version=3.8.2". [C:\Users\Lee\Documents\JSApps\TurnstileTS\TurnstileTS\bld\Debug\platforms\windows8\CordovaApp.jsproj]
I have all the latest versions of the SQLite binaries (both Win8 and Win8.1). I realize that the plugin seems to depend on v3.8.2, so I tried to add the NuGet package using the command line:
install-package SQLitePCL -Version 3.8.2
This installed successfully, but the next set of messages was:
Unable to find a reference to the extension SDK SQLite for Windows Runtime.
Verify that the reference to the extension SDK SQLite for Windows Runtime has already been removed.
Uninstalling 'SQLitePCL 3.8.2.0'.
Successfully uninstalled 'SQLitePCL 3.8.2.0'.
Install failed. Rolling back...
This is driving me crazy. I'm normally a C# person, so I realize this might be something simple... but I can't even add a reference to a dll like some other stackoverflow suggestions state. When I right-click on the project and try to "Add Reference..." I get the error message:
Missing value for TargetPlatformWinMDLocation property.
...then nothing.
Any ideas?
[edit] I have Win8, Win8.1, WP8, WP8.1 version of SQLite 3.8.6 installed. I just tried building a Windows Phone version of the app and it works! However, Windows 8 won't build. I set it to x86 instead of AnyCPU and it doesn't change anything.
There's a very simple fix to this. For Windows 8, you need to have the VSIX packages for SQLite already installed. Please, note which version number you have installed! As of 10/26/14, I have 3.8.7 installed.
From your solution's folder in explorer, navigate to:
{solution folder}\JavaScript\{project name}\bld\Debug\platforms\windows8
Edit the project's jsproj file in a text editor and scroll down until you see the entries for SQLite.
<ItemGroup>
<SDKReference Include="SQLite.WinRT, Version=3.8.7" />
</ItemGroup>
Change the version number in your file to the actual version on your computer. The project will build with the WebSQL plugin enabled and will actually work. (I verified the database file created in local storage.)
NOTE - You must already have enabled the WebSQL plugin in the config.xml menu.

Plugin is not recognized in QML Desktop Appication Deployment

I have wrote a Qt Quick Desktop application in c++ qnd Qt Creator(QML) on Windows7. Now I have to deploy it.
I'm using Qt Quick Desktop Components plugin in my application, I've installed it according to these instructions, and I'm using it with:"import Qt.labs.components", as written there.
I tried adding to the .pro file:
QML_IMPORT_PATH = C:\QtSDK\Desktop\Qt\4.7.4\mingw\imports\Qt\labs\components
but I saw it's working well without it, and I removed it.
I've read a guide how to deploy such an application here, and followed it; I have now a deployment folder, with: the .exe file, the needed dll's, and a folder hierarchy like:Qt/labs/components.
in components I put the styleplugin.dll(for desktop components), and a qmldir file, with the content: plugin styleplugin, excactly like in the doc.
but when I'm runnig my application.exe from the deployment folder in another computer, I'm getting a white, empty window, means: It didn't find the .dll file.
Should you explain me please what's wrong?
I know two reasons, when app can not load plugin dll:
Some of dependecies of the plugin dll are missing or can not be found and that is why it can not be loaded. Qt Creator or Visual Studio environment can be different than the system one. For example, your IDE can modify PATH environment variable. Check plugin's dependencies availability with Microsoft Dependency Walker tool in the same environment where you launch your app.
App can not find plugin in standard directories. To check this you should specify plugin import directory explicitly:
QDeclarativeView *rootView = new QDeclarativeView()
rootView->engine()->addImportPath(QLatin1String("path/to/your/imports"));

Resources