适用于Android版本的SDK设置

时间:2017-12-25 03:36:52

标签: android cocos2d-x

我在游戏中使用cocos2d-x。现在我想发布它。在我的gradle.property文件中,我有:

PROP_COMPILE_SDK_VERSION=26
PROP_MIN_SDK_VERSION=14
PROP_TARGET_SDK_VERSION=26
PROP_APP_PLATFORM=10
PROP_APP_ABI=armeabi-v7a:x86

我有以下依赖项:

classpath 'com.google.gms:google-services:3.1.1'
compile 'com.google.android.gms:play-services-base:11.8.0'
compile 'com.google.firebase:firebase-ads:11.8.0' 

如您所见,我使用最新的firebase admob广告。

  1. 什么是PROP_APP_PLATFORM?什么是最好的数字? (默认为10
  2. 我的PROP_APP_ABI好吗?它涵盖了大多数硬件吗?我删除了armeabi,因为NDK r26不支持compile。我不关心APK大小并且想要覆盖大多数设备。
  3. 我的3 SDK版本好吗?我知道3 SDK的含义(min是用于编译代码的实际SDK; target是最低SDK支持; compile首选与SDK 14相同)。但是,Admob网站表示它只支持Android 4.0+(SDK 15)。如果将来Admob决定将其提升到,<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android" android:orientation="vertical" android:layout_width="match_parent" android:layout_height="match_parent" android:scrollbars="vertical" android:scrollbarAlwaysDrawVerticalTrack="true" android:fitsSystemWindows="true" android:padding="16dp"> <ScrollView xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="fill_parent" android:layout_height="wrap_content" android:orientation="vertical" android:padding="10dp" android:scrollbars="none" android:fillViewport="false"> <TableLayout android:layout_width="match_parent" android:layout_height="wrap_content" android:orientation="vertical" android:layout_gravity="center" android:stretchColumns="1" > <android.support.design.widget.TextInputLayout android:layout_width="match_parent" android:layout_height="wrap_content"> <Spinner android:id="@+id/cmbSaleType" android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_gravity="center" android:entries="@array/sale_type_choices" android:hint="Sale Type" android:layout_marginTop="10dp" /> </android.support.design.widget.TextInputLayout> <android.support.design.widget.TextInputLayout android:layout_width="match_parent" android:layout_height="wrap_content" android:id="@+id/txtLayoutClient" > <EditText android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_gravity="center" android:inputType="text" android:hint="Customer" android:text="Client" android:id="@+id/txtclient" /> </android.support.design.widget.TextInputLayout> <android.support.design.widget.TextInputLayout android:layout_width="match_parent" android:layout_height="wrap_content"> <EditText android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_gravity="center" android:inputType="date" android:hint="Date" android:text="" android:id="@+id/txtDate" /> </android.support.design.widget.TextInputLayout> <android.support.design.widget.TextInputLayout android:layout_width="match_parent" android:layout_height="wrap_content"> <EditText android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_gravity="center" android:inputType="text" android:hint="Job Type" android:text="HairCut" android:id="@+id/txtjob" /> </android.support.design.widget.TextInputLayout> <android.support.design.widget.TextInputLayout android:layout_width="match_parent" android:layout_height="wrap_content"> <EditText android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_gravity="center" android:inputType="numberDecimal" android:hint="Amount" android:text="" android:id="@+id/txtAmount" /> </android.support.design.widget.TextInputLayout> <android.support.design.widget.TextInputLayout android:layout_width="match_parent" android:layout_height="wrap_content"> <EditText android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_gravity="center" android:inputType="numberDecimal" android:hint="KM" android:text="" android:id="@+id/txtKM" /> </android.support.design.widget.TextInputLayout> <Button android:id="@+id/btnSave" android:layout_marginTop="10dp" android:layout_width="match_parent" android:layout_height="wrap_content" android:text="Save" android:layout_marginBottom="20dp" /> </TableLayout> </ScrollView> </FrameLayout> ,我的应用程序会崩溃吗?

1 个答案:

答案 0 :(得分:2)

    NDK使用
  1. APP_PLATFORM作为最低SDK。我建议将其设为14
  2. 是的,它涵盖了大多数硬件。
  3. 是的,未来的Admob版本不会崩溃。但使用旧设备的用户可能无法接收任何广告。