我写了一个应用程序,用户点击购买按钮他/她重定向到互联网浏览器(例如:铬)和付款后我想他回到我的应用程序(我的活动),所以我发现我应该使用Intent-Filter但它对我不起作用!
我在清单中添加这些代码:
<intent-filter>
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE" />
<data android:host="returnApp" android:scheme="myapp"></data>
</intent-filter>
Run Code Online (Sandbox Code Playgroud)
当我打开这样的网址时:
MYAPP:// returnApp状态= 1
我的应用程序无法打开.
我有一个九个补丁图像并给它一个这样的名字:
img.9.png
当我将它导入drawable-hdpi或drawable-xhdpi文件夹等等时,android studio无法识别图像并给我一个错误:
无法解析资源@ mipmap/img.9
无法将@ mipmap/img.9转换为drawable错误:(69,29)找不到与给定名称匹配的资源(在'background'处,值为'@ drawable/img').
此外,当我将这个9patch图像导入drawable文件夹时,android studio正确显示它,但是当我构建并运行应用程序时出错:
错误:(69,29)找不到与给定名称匹配的资源(在'background'处,值为'@ mipmap/img.9').
int n = Convert.ToInt32(Console.ReadLine());
int factorial = 1;
for (int i = 1; i <= n; i++)
{
factorial *= i;
}
Console.WriteLine(factorial);
Run Code Online (Sandbox Code Playgroud)
此代码在控制台应用程序中运行,但当数字大于34时,应用程序返回0.
为什么返回0以及如何计算大数的阶乘?