First Program - No Launcher activity found - android-activity

I am struggling to get my first Android application to run. I create a new Android Application Project and ask for a "Blank Activity" on the Create Activity dialog box.
When I run the Dave application as an Android project, I get the following console messages in red:
[2014-07-04 22:14:40 - MyFirstProject] No Launcher activity found!
[2014-07-04 22:14:40 - MyFirstProject] The launch will only sync the application package on the device!
The Virtual Device shows up, and when I unlock it there is no Dave application.
Where am I going wrong?

you need to declare in your manifest the activity .. and add a category also ..declaring it as a launcher.
like here.. it would have been nice if you could just google a little more :)
code snippet:
<activity
android:name=".YourActivityName"
android:clearTaskOnLaunch="true"
android:label="#string/activity_name">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>

Turns out the problem with the missing activity and launcher are caused by Eclipse. I found a post click here where someone else had this kind of problem and fixed it by NOT installing the SDK and Eclipse bundle, but rather installing components separately. Now the new application gets generated properly.

Related

Flutter app does not run on release mode and only shows white screen

I saw my app works well on emulator and built an apk to test it on my phone. It only showed white screen and worked nothing.
I found somehow flutter run -v command, and running this command make my emulator also shows only white screen.
The whole log of the command is uploaded Here, and the whole txt file for log can be found in the end of the issue.
What is the usual reason of the problem ? I am still trying but not finding answer.
If there is any code or information I should post here please tell me and I will immediately do.
add internet permission to your AndroidManifest.xml file
android/src/main/AndroidManifest.xml
<manifest xmlns:android...>
...
<uses-permission android:name="android.permission.INTERNET" />
<application ...
</manifest>

Getting Error HTTP Error 500.34 - ANCM Mixed Hosting Models Not Supported after HTTP Error 500.35 - ANCM Multiple Hosting models not supported

I am getting error "Error HTTP Error 500.34 - ANCM Mixed Hosting Models Not Supported" after adding
<PropertyGroup>
<TargetFramework>netcoreapp3.1</TargetFramework>
<AspNetCoreHostingModel>OutOfProcess</AspNetCoreHostingModel>
</PropertyGroup>
to my application.config.host, I was trying to resolve HTTP Error 500.35 - ANCM Multiple Hosting models not supported by adding above code snippet to application.config.host. Any help would be appreciated. Thanks
This issu occured because you may have different hosting model on you web apps under the same server where you have hosted your all web apps ,so you need to change hosting model for all ur web apps to be outofprocess by adding below line
<AspNetCoreHostingModel>OutOfProcess</AspNetCoreHostingModel>
I got the same error when I changed target SDK to .Net Core 3.1.
My solution was remove hostingModel="inprocess" from aspNetCore tag in file web.config.
Sure it can be made cleaner, but at least the app works.
Hope it may help someone.
<aspNetCore processPath="dotnet" arguments=".\XXXXXXX.dll" stdoutLogEnabled="false" stdoutLogFile=".\logs\stdout" hostingModel="inprocess"/>
I got it resolved.
I was loking for my applicationhost.config file in the .vs folder, to start i was unble to find .vs folder in my project folder. I manually typed C:\Users\v-wauddi\Desktop\Dutch Treat\DutchTreat.vs\DutchTreat\config\applicationhost.config and i was able to get applicationhost.config, I saw an unusual entry, I fixed it by commenting that unsual entry which can be seen in the below code.
<site name="DutchTreat" id="2">
<application path="/" applicationPool="DutchTreat AppPool">
<virtualDirectory path="/" physicalPath="C:\Users\v-
wauddi\Desktop\Dutch Treat\DutchTreat\DutchTreat" />
</application>
//commented out section
<!--<application path="/App" applicationPool="App AppPool">
<virtualDirectory path="/" physicalPath="C:\Users\v-
wauddi\Desktop\Dutch Treat\DutchTreat\DutchTreat" />
</application>-->
<bindings>
<binding protocol="http" bindingInformation="*:8888:localhost" />
</bindings>
</site>
I was going mad due to this issue from last 30-40 minutes. At last I deleted the .vs folder and reopened the project.
It works like charm.
Steps:
Open your solution folder.
exit project and close visual studio.
delete the vs folder, it might be hidden, so you need to enable
hidden items as shown below :
At last reopen project, it will take some extra seconds to reconstruct the files in .vs folder.

Flutter provider not working in release apk, but working fine in debug mode

the provider should work to provide real time updates to consumers but only works in debug mode and not release mode. do i have to use the state full widget again to update the ui with set state, any clue?
Might be possible that you missed to add internet permission in AndroidManifest.xml
<uses-permission android:name="android.permission.INTERNET" />
We have to add Internet permission in AndroidManifest.xml file for release build. It is working fine in debug mode. If you have been calling api call in provider. Same mistake I have done and resolved that issue.
If you add in the 2 AndroidManifest.xml files the internet permission
<uses-permission android:name="android.permission.INTERNET" />
and it is still not works, so add this in the 2 files in the application tag
android:usesCleartextTraffic="true"

Specifying app_id and app_name for facebookConnect in a multi-device hybrid app in VS2013 & W8.1

I've been banging my head on this one for a while now.
How do I specify the app_id and app_name when trying to use the facebookConnect plugin in a Multi-Device Hybrid app in Visual Studio 2013?
If I create a new solution using the CLI approach; something similar to:
cordova create MyTest <blah> <blah> <blah>
I can probably use the CLI to add the plugin with a command similar to: (Untested and the command might be slightly wrong)
cordova plugin add com.phonegap.plugins.facebookconnect
BUT...
How do I add it when I've created a Mutli-Device Hybrid app directly from within Visual Studio?
I've tried 2 approaches to get this to install:
Method 1:
Create a "plugin" directory
Download the code from
https://github.com/Wizcorp/phonegap-facebook-plugin and extract into
the plugin directory
Compile/build
This seems to "work" but then bombs out with:
Variable(s) missing: APP_ID, APP_NAME
Method 2:
Open the config.xml file
Add in the following "vs:feature" tag:
Compile/build
<vs:features>
<vs:feature>com.phonegap.plugins.facebookconnect</vs:feature>
This method also seems to "work", showing a line in the build Output window:
Calling plugman.fetch on plugin "com.phonegap.plugins.facebookconnect"
But then it too bombs out with the ever annoying:
Variable(s) missing: APP_ID, APP_NAME
Can someone PLEASE tell me where to add these two variables in so that the thing builds???
I have the values available.
I can't seem to use the CLI to install this plugin into my solution because I get an error like:
Current working directory is not a Cordova-based project
Thanks for any help you can offer.
I'd recommend going with method 1 since it provides greater flexibility to configure your plugin. That being said, what you are running into is a common issue with the FacebookConnect plugin when it is added manually instead of using the cordova CLI. To add the app ID and app name, do the following as documented here.
In plugin.xml, find the below lines <preference name="APP_ID">
<preference name="APP_NAME"> and modify them to <param name="APP_ID" value="<id of your app>" />
<param name="APP_NAME" value="<name of your app>" />
This will get you past the error.
However, the plugin is written in Java and the references are not precompiled. So, you will run into issues like com.facebook.blah not found. To get past these additional compilation issues, follow the instructions here, which let you build the plugin dependencies without eclipse.
To use the CLI to install the plugin, you need to run the commands from <projectRoot>\bld\debug\platform\<yourplatform> where the cordova projects are created.
What you probably miss is the renaming of the element from preference to param
in plugin.xml change preference to param for app name and app id an also enter their value.
<preference name="APP_NAME">
to
<param name="APP_NAME" value="<name of your app>" />

Phonegap 3.0 InAppBrowser - Provides no way for user to close

I had inApBrowser working in my app just fine... however, I upgraded some things and now it opens the URL without any way of closing it. You have to kill the app.
I have tried many variations of this: window.open('http://cnn.com','_blank','location=yes,toolbar=yes');
myconfig.xml has:
<feature name="InAppBrowser">
<param name="ios-package" value="CDVInAppBrowser" />
</feature>
I get no errors... the page opens... but there is no way to close and return to the app. I have seen a lot of folks putting solutions for URL recognition and making the window close... but I need the childBrowser plugin method... where the user can close the window when he/she is finished viewing the page.
Phonegap 3.0 -
JqueryMobile 1.2 -
IOS 7.0.2 -
xCode 5.0 -
Any help would be greatly appreciated!
Your syntax looks okay, but give these code snippets a try:
Pure JavaScript:
var ref = window.open('http://cnn.com', '_blank', 'location=yes,toolbar=yes');
HTML + JavaScript:
CNN Link
Also, check that you have correctly installed the InAppBrowser plugin (PhoneGap/Cordova 3.0+ need it to be installed separately via the command line). Your config.xml file looks correct, but just make sure that the rest of the plugin is installed properly.
You can use the following commands to list all the installed plugins in your project...
Using Cordova: cordova plugins
Using PhoneGap: phonegap local plugin list
You can also just go to your Desktop, navigate to the 'plugins' folder within your project and check that there is a folder named 'org.apache.cordova.inappbrowser' or 'org.apache.cordova.core.inappbrowser' inside.
To install the InAppBrowser plugin (if necessary)...
Using Cordova: cordova plugin add org.apache.cordova.inappbrowser
Using PhoneGap: phonegap local plugin add org.apache.cordova.inappbrowser
From your description, it sounds like your page is opening within the app's webview, instead of the InAppBrowser window. This is the behaviour you would normally get if you used '_self' instead of '_blank'. Hopefully something here will help fix it.
If you are using PhoneGap Build then you need to use different syntax i.e. (see plugin info):
<gap:plugin name="org.apache.cordova.inappbrowser" />
See also PGB plugin repository. It seem to be up-to-date now. You can see a simple test application for a working version.
Note that this might not be working if you are building yourself (locally on your computer). Use instructions by wicketyjarjar if you are building locally.
The inAppBrowser did not work with Phonegap 3.0.0, and had to change this in config.xml to make it work on both ios and Android :
<plugin name="inAppBrowser">
to
<gap:plugin name="org.apache.cordova.inappbrowser" />
Also if you would want to include emailcomposer use the below line in config.xml
<gap:plugin name="de.appplant.cordova.plugin.email-composer" />
and in the Javascript file add the below lines:
var ops = {
callback: function (result) {
navigator.notification.alert(result);
},
subject: "Look at this photo",
body: "Take a look at <b>this</b>:",
toRecipients: ["example#email.com", "johndoe#email.org"],
ccRecipients: [],
bccRecipients: [],
isHTML: true,
attachments: ["_complete_path/image.png"]
}
function mail(name, url) {
window.plugin.email.open({
to: [],
cc: [],
bcc: [],
subject: name,
body: url,
isHtml: true
});
}
I had the same problem. In my case it was caused by forgetting to include the cordova.js script.
<script type="text/javascript" src="cordova.js"></script>