我正在尝试在Android Studio中编译一个简单的Java程序,但收到以下错误:
Error:com.android.builder.internal.aapt.AaptException:失败 关键文件 D:\ Downloads \ alr-h450_sdk_1.0.8_170621 \ alr-h450_sdk_1.0.8_170621 \ samples \ BarcodeReader \ app \ build \ intermediates \ exploded-aar \ com.google.android.gms \ play-services-base \ 8.4.0 \ res \ drawable-xxhdpi \ common_google_signin_btn_icon_light_focused.9.png 进入 D:\ Downloads \ alr-h450_sdk_1.0.8_170621 \ alr-h450_sdk_1.0.8_170621 \ samples \ BarcodeReader \ app \ build \ intermediates \ res \ merged \ debug \ drawable-xxhdpi \ common_google_signin_btn_icon_light_focused.9.png
我的代码:
package com.cargoaware.barcodereader;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.widget.Toast;
import com.alien.barcode.BarcodeCallback;
import com.alien.barcode.BarcodeReader;
import java.util.regex.MatchResult;
public class MainActivity extends AppCompatActivity {
private BarcodeReader barcodeReader;
class C04171 implements BarcodeCallback {
C04171() {
}
public void onBarcodeRead(String barcode) {
Toast.makeText(getApplicationContext(),"Test",Toast.LENGTH_LONG).
}
}
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
barcodeReader = new BarcodeReader(getApplicationContext());
if (!barcodeReader.isRunning()) {
barcodeReader.start(new C04171());
}
}
}
我不确定为什么这是一个问题,因为我没有在xml文件中使用任何图形或视图。我想念东西吗?