【Mono for Android】应用开发初探(2)

版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/ZHANGKUN35268/article/details/77253897

这是效果图。但是新建 OpenGL 游戏(Android)      Visual C#   工程时,遇到了问题。

即使我在AndroidManifest.xml中添加了网络权限

  <uses-permission android:name="android.permission.INTERNET" />
    <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />

仍然打开APP就闪退。


我找到了这样一篇文章:http://www.c-sharpcorner.com/UploadFile/093731/create-opengl-mono-for-android-application3/

察觉到自己的Main.axml有问题,改为

<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:orientation="vertical"
    android:layout_width="fill_parent"
    android:layout_height="fill_parent">
</LinearLayout>


然后就显示正常了。





猜你喜欢

转载自blog.csdn.net/ZHANGKUN35268/article/details/77253897
今日推荐