我昨天收到了Google Play开发者帐户。我上传了我的第一个应用程序,但它不兼容任何设备。它总是说0.我认为我的Android Manifest有问题。
这是:
<uses-permission android:name="android.permission.CAMERA" />
<uses-feature android:name="android:hardware.Camera" />
<uses-feature android:name="android:hardware.Parameters" />
<uses-sdk
android:minSdkVersion="14"
android:targetSdkVersion="21" />
<application
android:allowBackup="true"
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:theme="@style/AppTheme" >
<activity
android:name="com.arved95.material_torch.MainActivity"
android:label="@string/app_name"
android:screenOrientation="portrait" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity
android:name="com.arved95.material_torch.ButtonScreen"
android:label="@string/title_activity_button_screen" >
</activity>
<receiver android:name="com.arved95.material_torch.WidgetProvider" android:label="MaterialTorch Widget">
<intent-filter>
<action android:name="android.appwidget.action.APPWIDGET_UPDATE"/>
</intent-filter>
<meta-data android:name="android.appwidget.provider" android:resource="@xml/widget_info" />
</receiver>
</application>
$(document).ready(function () {
var counter = 1;
$("#addrow").on("click", function () {
counter++;
var newRow = $("<tr>");
var cols = "";
cols += "<td><select name='draft_id" + counter + "'><option value=''>Pilih</option></select></td>"; //<select name="draft_id" id="draft_id"></select>
cols += "<td><input type='text' name='draft_qty" + counter + "' size='3'/></td>";
cols += "<td><input type='text' name='draft_isi" + counter + "' size='50'/></td>"; //<input type="text" name="draft_isi"/>
cols += "<td><input type='text' name='harga_satuan" + counter + "' size='8'/></td>"; //<input type="text" name="harga_satuan" id="harga_satuan" />
cols += "<td><input type='text' name='jumlah" + counter + "' readonly='readonly'/></td>";
cols += "<td><button type='button' class='deleteRow'>Del</button></td>"; //<button type="button" class="deleteRow">Del</button>
newRow.append(cols);
$("table.order-list").append(newRow);
});
$("table.order-list").on("change", 'input', function (event) {
hitungbaris($(this).closest("tr"));
hitung();
});
$("table.order-list").on("click", "button.deleteRow", function (event) {
$(this).closest("tr").remove();
hitung();
});
});
function hitung() { //fungsi hitung ini memiliki 2 fungsi sekaligus yaitu ...:
hitungGrandTotal();
hitungsisa();
}
function hitungbaris(row) {
var harga_satuan = +row.find('input[name^="harga_satuan"]').val();
var draft_qty = +row.find('input[name^="draft_qty"]').val();
row.find('input[name^="jumlah"]').val((harga_satuan * draft_qty).toFixed(2));
}
function hitungGrandTotal() {
var grandTotal = 0;
$("table.order-list").find('input[name^="jumlah"]').each(function () {
grandTotal += +$(this).val();
});
$("#grandtotal").val(grandTotal.toFixed(2));
}
function hitungsisa() { //bisa juga di gunakan untuk menghitung uang kembali
//var sisa = "";
var bayar = parseFloat(document.formpenjualan.bayar.value);
var grandtotal = parseFloat(document.formpenjualan.grandtotal.value);
if (bayar < grandtotal){
//
sisa = "KREDIT";
}else{
//
sisa = "LUNAS";
}
$("#sisa").val(sisa);
}
如果有人知道如何解决这个问题,那就太好了。
THX
答案 0 :(得分:0)
盲目猜测,你缺乏
<supports-screens
android:anyDensity="true"
android:largeScreens="true"
android:normalScreens="true"
android:resizeable="true"
android:smallScreens="true"
android:xlargeScreens="true"/>
清单中的(必须在<application>
区之外)。
答案 1 :(得分:0)
我修正了添加required =“false”。
<uses-feature android:name="android:hardware.Camera" />
<uses-feature android:name="android:hardware.Parameters" />
到
<uses-feature android:name="android:hardware.Camera" required="false" />
<uses-feature android:name="android:hardware.Parameters" required="false" />