I'm learning Android at the moment.
I made 2 layout file first and 2 java file.
I connect them but I got error
checkDebugDuplicateClasses
dupliacate class found
I got just 2 files I can't find any duplicate classes
package com.example.fitcord;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import androidx.appcompat.app.AppCompatActivity;
public class Activity_main extends AppCompatActivity {
@Override
protected void onCreate(Bundle savedInstanceState){
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
}
public void onClick(View view){
startActivity(new Intent("com.example.fitcord.Activity_setting"));
}
}
package com.example.fitcord;
import android.os.Bundle;
import androidx.appcompat.app.AppCompatActivity;
public class Activity_setting extends AppCompatActivity {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_setting);
}
}
These are my 2 java file's code
Is it problem of layout? or What should I do?
使用这种方式开始新的活动:
startActivity(new Intent(Activity_main.this, Activity_setting.class));
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.