我正在尝试将我的离子应用程序作为Android上的本机应用程序进行测试。
我已尝试按照离子文档
运行以下命令离子cordova运行android
我还连接了手机并启用了USB调试功能。我得到了一堆输出,但应用程序没有安装到我的设备上。
我也尝试为android构建应用程序,但我没有获取apk的输出文件夹。
public async void Post()
{
//Read the content to a string
var content = await Request.Content.ReadAsStringAsync();
//Get the Input object you wanted
var input = JsonConvert.DeserializeObject<Input>(content);
//Get a Dictionary containing all the content sent
var allContent = JsonConvert.DeserializeObject<Dictionary<string, object>>(content);
//Get the property names of the wanted object
var props = input.GetType().GetProperties().Select(a => a.Name);
//See which properties are extra
var extraContent = allContent.Keys.Except(props);
}
离子信息的输出
Running app-scripts build: --platform android --target cordova
[11:10:08] build dev started ...
[11:10:08] clean started ...
[11:10:08] clean finished in 2 ms
[11:10:08] copy started ...
[11:10:08] deeplinks started ...
[11:10:08] deeplinks finished in 27 ms
[11:10:08] transpile started ...
[11:10:12] transpile finished in 4.13 s
[11:10:12] preprocess started ...
[11:10:12] preprocess finished in less than 1 ms
[11:10:12] webpack started ...
[11:10:12] copy finished in 4.38 s
[11:10:20] webpack finished in 7.76 s
[11:10:20] sass started ...
Without `from` option PostCSS could generate wrong source map and
will not find Browserslist config. Set it to CSS file path or to
`undefined` to prevent this warning.
[11:10:21] sass finished in 1.28 s
[11:10:21] postprocess started ...
[11:10:21] postprocess finished in 8 ms
[11:10:21] lint started ...
[11:10:21] build dev finished in 13.33 s
> cordova run android
Android Studio project detected
ANDROID_HOME=/Users/markwright/Library/Android/sdk
JAVA_HOME=/Library/Java/JavaVirtualMachines/jdk1.8.0_77.jdk/Contents/Home
studio
[OK] Your app has been deployed.
Did you know you can live-reload changes from your app with --livereload?
[11:10:25] lint finished in 3.81 s
我运行cordova的日志运行android --verbose
cli packages: (/Users/markwright/Documents/myApp/node_modules)
@ionic/cli-utils : 1.19.0
ionic (Ionic CLI) : 3.19.0
global packages:
cordova (Cordova CLI) : 8.0.0
local packages:
@ionic/app-scripts : 3.1.6
Cordova Platforms : android 7.0.0 ios 4.5.4
Ionic Framework : ionic-angular 3.9.2
System:
Android SDK Tools : 26.1.1
Node : v6.5.0
npm : 5.6.0
OS : OS X El Capitan
Environment Variables:
ANDROID_HOME : /Users/markwright/Library/Android/sdk
Misc:
backend : pro
工作室