当我在Android Studio中“运行”我的项目时,在“消息”窗口中,我得到:
Gradle:
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':play01:compileDebug'.
> Compilation failed; see the compiler error output for details.
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
它说>编译失败;有关详细信息,请参阅编译器错误输出。
那么“编译器错误输出”在哪里呢?我如何运行——stacktrace选项?
将android转换为androidx后。
导入库问题将得到解决。
是这样的:
import androidx.appcompat.widget.Toolbar; << like this
进口androidx.annotation.NonNull;<<像这样
进口androidx.appcompat.app.ActionBarDrawerToggle;<<像这样
进口androidx.drawerlayout.widget.DrawerLayout;<<像这样
进口androidx.recyclerview.widget.RecyclerView;<<像这样
进口androidx.appcompat.app.AppCompatActivity;<<像这样
将android转换为androidx后。
导入库问题将得到解决。
是这样的:
import androidx.appcompat.widget.Toolbar; << like this
进口androidx.annotation.NonNull;<<像这样
进口androidx.appcompat.app.ActionBarDrawerToggle;<<像这样
进口androidx.drawerlayout.widget.DrawerLayout;<<像这样
进口androidx.recyclerview.widget.RecyclerView;<<像这样
进口androidx.appcompat.app.AppCompatActivity;<<像这样