安卓工作室 货币转换编码

问题描述 投票:0回答:1

我想在android studio中制作货币转换应用,但我无法在模拟器中启动我的应用,我相信这是因为编码中的一些错误,我将在这里复制我的代码,所以你可以帮助我,我将感激不尽。)

public class MainActivity extends AppCompatActivity {
     public void clickFunction(View view) {
        Log.i ("Info", "Button pressed");
        EditText editText = (EditText) findViewById(editText);
        Log.i(       "Values" ,editText,getText().toString());
        String amountInEuros = editText.getText()
                Log.i("Info" , String.valueOf(editText.getText()));
        String getAmountInEuros ;
        double  amountInEuros  double  = double.parsedouble (amountInEuros);
        double  amountInDollars double = double amountInEuros double * 1.08 ;
        String amountInDollars String = double.toString (amountInDollars double)
        Log.i("Amount in Dollars", amountInDollars String);
        Toast.makeText ( this ,  amountInEuros + "Euros" + "is" + amountInDollars String , LENGTH_LONG );
    }
android currency converters
1个回答
0
投票

这些行缺少一个分号。

String amountInEuros = editText.getText();

String amountInDollars String = double.toString (amountInDollars double);
© www.soinside.com 2019 - 2024. All rights reserved.