- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我的应用程序在 android 7 版本以下的手机上崩溃了。这是我申请的链接 https://play.google.com/store/apps/details?id=comdhanusharea.wixsite.benitinhere.phonebook .
我不知道为什么我会收到此崩溃报告。当我尝试在低于 Android 版本 7 的手机应用程序中安装我的应用程序时崩溃并向我展示
Unfortunately,Application is stopped
我在我的开发者帐户上收到了这份崩溃报告。
java.lang.RuntimeException:
at android.app.ActivityThread.performLaunchActivity (ActivityThread.java:2338)
at android.app.ActivityThread.handleLaunchActivity (ActivityThread.java:2390)
at android.app.ActivityThread.access$800 (ActivityThread.java:151)
at android.app.ActivityThread$H.handleMessage (ActivityThread.java:1321)
at android.os.Handler.dispatchMessage (Handler.java:110)
at android.os.Looper.loop (Looper.java:193)
at android.app.ActivityThread.main (ActivityThread.java:5292)
at java.lang.reflect.Method.invokeNative (Native Method)
at java.lang.reflect.Method.invoke (Method.java:515)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run (ZygoteInit.java:824)
at com.android.internal.os.ZygoteInit.main (ZygoteInit.java:640)
at dalvik.system.NativeStart.main (Native Method)
Caused by: android.view.InflateException:
at android.view.LayoutInflater.createViewFromTag (LayoutInflater.java:713)
at android.view.LayoutInflater.rInflate (LayoutInflater.java:755)
at android.view.LayoutInflater.rInflate (LayoutInflater.java:758)
at android.view.LayoutInflater.rInflate (LayoutInflater.java:758)
at android.view.LayoutInflater.rInflate (LayoutInflater.java:758)
at android.view.LayoutInflater.inflate (LayoutInflater.java:492)
at android.view.LayoutInflater.inflate (LayoutInflater.java:397)
at android.view.LayoutInflater.inflate (LayoutInflater.java:353)
at android.support.v7.app.AppCompatDelegateImplV9.setContentView (AppCompatDelegateImplV9.java:287)
at android.support.v7.app.AppCompatActivity.setContentView (AppCompatActivity.java:139)
at comdhanusharea.wixsite.benitinhere.phonebook.A2_Login.onCreate (A2_Login.java:36)
at android.app.Activity.performCreate (Activity.java:5264)
at android.app.Instrumentation.callActivityOnCreate (Instrumentation.java:1088)
at android.app.ActivityThread.performLaunchActivity (ActivityThread.java:2302)
Caused by: android.content.res.Resources$NotFoundException:
at android.content.res.Resources.loadDrawable (Resources.java:2124)
at android.content.res.TypedArray.getDrawable (TypedArray.java:602)
at android.widget.ImageView.<init> (ImageView.java:129)
at android.support.v7.widget.AppCompatImageView.<init> (AppCompatImageView.java:72)
at android.support.v7.widget.AppCompatImageView.<init> (AppCompatImageView.java:68)
at android.support.v7.app.AppCompatViewInflater.createView (AppCompatViewInflater.java:106)
at android.support.v7.app.AppCompatDelegateImplV9.createView (AppCompatDelegateImplV9.java:1024)
at android.support.v7.app.AppCompatDelegateImplV9.onCreateView (AppCompatDelegateImplV9.java:1081)
at android.view.LayoutInflater.createViewFromTag (LayoutInflater.java:684)
这是我的 A2_Login onCreate 函数的 Java 代码
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_a2__login);
SharedPreferences preferences=getSharedPreferences("PhoneBook",MODE_PRIVATE);
Boolean b= preferences.getBoolean("IsLogin",false);
if(b)
{
startActivity(new Intent(this,A3_HomePage.class));
finish();
}
if(Build.VERSION.SDK_INT >= Build.VERSION_CODES.M){
if (ContextCompat.checkSelfPermission(A2_Login.this, Manifest.permission.READ_CONTACTS) != PackageManager.PERMISSION_GRANTED &&
ContextCompat.checkSelfPermission(A2_Login.this, Manifest.permission.WRITE_CONTACTS) != PackageManager.PERMISSION_GRANTED
)
{
ActivityCompat.requestPermissions(A2_Login.this, new String[]{Manifest.permission.READ_CONTACTS}, REQUEST_PHONE_CALL);
ActivityCompat.requestPermissions(A2_Login.this, new String[]{Manifest.permission.WRITE_CONTACTS}, REQUEST_PHONE_CALL);
}
if( ContextCompat.checkSelfPermission(A2_Login.this, Manifest.permission.INTERNET) != PackageManager.PERMISSION_GRANTED){
ActivityCompat.requestPermissions(A2_Login.this, new String[]{Manifest.permission.INTERNET}, REQUEST_PHONE_CALL);
}
}
else{
if (ContextCompat.checkSelfPermission(A2_Login.this, Manifest.permission.READ_CONTACTS) != PackageManager.PERMISSION_GRANTED &&
ContextCompat.checkSelfPermission(A2_Login.this, Manifest.permission.WRITE_CONTACTS) != PackageManager.PERMISSION_GRANTED
)
{
ActivityCompat.requestPermissions(A2_Login.this, new String[]{Manifest.permission.READ_CONTACTS}, REQUEST_PHONE_CALL);
ActivityCompat.requestPermissions(A2_Login.this, new String[]{Manifest.permission.WRITE_CONTACTS}, REQUEST_PHONE_CALL);
}
if( ContextCompat.checkSelfPermission(A2_Login.this, Manifest.permission.INTERNET) != PackageManager.PERMISSION_GRANTED){
ActivityCompat.requestPermissions(A2_Login.this, new String[]{Manifest.permission.INTERNET}, REQUEST_PHONE_CALL);
}
}
db = openOrCreateDatabase("db_contactmanager", MODE_PRIVATE, null);
db.execSQL("Create Table If Not Exists tbl_register(" +
"db_regiser_id Integer Primary Key AutoIncrement," +
"db_gender nvarchar(20)," +
"db_fname nvarchar(20)," +
"db_lname nvarchar(20)," +
"db_mobile nvarchar(13)," +
"db_mail nvarchar(50)," +
"db_passwd nvarchar(15))");
db.execSQL("Create Table If Not Exists tbl_root1(" +
"db_security nvarchar(50) not null," +
"db_fname nvarchar(20)," +
"db_lname nvarchar(20)," +
"db_mobile nvarchar(13)," +
"db_mail nvarchar(50)," +
"db_passwd nvarchar(15))");
edt_phone_mail = (EditText) findViewById(R.id.A2_edt_phone_mail);
edit_passwd = (EditText) findViewById(R.id.A2_edt_passwd);
}
这是我的布局文件
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@drawable/back2"
android:orientation="vertical"
tools:context="comdhanusharea.wixsite.benitinhere.phonebook.A2_Login">
<TextView
android:id="@+id/A2_r_txt"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:layout_marginBottom="20dp"
android:layout_marginTop="30dp"
android:layout_weight="1.5"
android:fontFamily="cursive"
android:gravity="center"
android:text="Sign In"
android:textColor="@color/md_black_1000"
android:textSize="50dp"
android:textStyle="bold" />
<ScrollView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_below="@+id/A2_r_txt">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_marginTop="25dp"
android:orientation="vertical">
<LinearLayout
android:id="@+id/A2_r_ll1"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_below="@+id/A2_r_txt"
android:layout_weight="1">
<ImageView
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_marginLeft="5dp"
android:layout_marginRight="8dp"
android:layout_weight=".5"
android:backgroundTint="@color/colorPrimary"
android:src="@drawable/username" />
<EditText
android:id="@+id/A2_edt_phone_mail"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginLeft="10dp"
android:layout_marginRight="10dp"
android:layout_weight="4.6"
android:backgroundTint="@color/colorPrimary"
android:ems="10"
android:hint="Enter Email id or Phone number"
android:inputType="text"
android:padding="20dp" />
</LinearLayout>
<LinearLayout
android:id="@+id/A2_r_ll2"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_below="@+id/A2_r_ll1"
android:layout_weight="1">
<ImageView
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_marginLeft="5dp"
android:layout_marginRight="8dp"
android:layout_weight=".5"
android:src="@drawable/password" />
<EditText
android:id="@+id/A2_edt_passwd"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginLeft="10dp"
android:layout_marginRight="10dp"
android:layout_weight="4.6"
android:ems="10"
android:hint="Enter Password"
android:inputType="textPassword"
android:padding="20dp" />
</LinearLayout>
<Button
android:id="@+id/A2_r_btn_signup"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@+id/A2_r_ll2"
android:layout_centerHorizontal="true"
android:layout_gravity="center"
android:layout_marginTop="15dp"
android:layout_weight=".8"
android:background="@drawable/btn_background"
android:onClick="fun_A2_btnlogin"
android:text="Login" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@+id/A2_r_btn_signup"
android:layout_centerHorizontal="true"
android:layout_gravity="center"
android:layout_marginBottom="100dp"
android:layout_marginTop="15dp"
android:layout_weight="1"
android:onClick="fun_A2_btnsignup"
android:text="I don't have an account"
android:textColor="@color/md_black_1000"
android:textSize="20dp" />
</LinearLayout>
</ScrollView>
</RelativeLayout>
jelly bean 支持的最低 android 版本
我的问题不是 Unfortunately MyApp has stopped. How can I solve this? 的重复问题我的问题与此不同,因为在编译我的项目时,我没有遇到任何类型的崩溃或错误。
提前致谢。
最佳答案
我认为您的图像在 drawable-v24 或其他文件夹中,将其移动到 drawable 文件夹并再次测试。
关于android - 在牛轧糖以下的操作系统版本上获得运行时异常,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/49229989/
这个问题在这里已经有了答案: standalone parentheses in javascript [duplicate] (5 个答案) 关闭 8 年前。 我在学习JavaScript,有时会
我是mysql新手,我必须减少以下更新查询的执行时间 UPDATE temp_countcalculations, ( SELECT count(*) as insuffcounts,CRP_
def escape_html(s): for (i, o) in (("&","&"),(">", ">"),(" "变成 ">"等。 关于python - 以下 for 循环
if (read(read(cin, data1), data2)) 问题是C++ Primer 5th Edition 的练习。 read 函数定义如下: std::istream &read(st
我想创建两个宏。其中一个将扩展到函数原型(prototype)和函数内容,另一个将扩展到仅函数原型(prototype)。我正在考虑创建以下内容: #ifdef SOME_CONDITION #def
我正在使用 jongo API - org.jongo.MongoCollection 是类。 我有对象 ID 列表并转换为与 ObjectId[] 相同并尝试按如下方式查询 collection.f
有人可以解释以下正则表达式匹配什么吗? ^.*$ 谢谢! 最佳答案 或者整个字符串或者整行,取决于是否multiline mode被使用。 关于java - 以下 ^.*$ 正则表达式匹配什么?,我们
#include void main() { int a,b,c; for(b = c = 10; a = "- FIGURE?, UMKC,XYZHello Folks,TFy!QJ
我的代码段中的以下代码行被 Sonar 检测为问题。 代码段: final int Pending=1; Sonar 问题: Name 'Pending' must matc
Print name of all activities with neither maximum nor minimum number of participants 我尝试了以下查询,但出现错误:
这个问题在这里已经有了答案: What is this practice called in JavaScript? (7 个回答) 关闭8年前。 (function() { //do stuff
根据任务,我们必须通过 foldr 实现 foldl。通过比较函数签名和 foldl 实现,我得到了以下解决方案: myFoldl :: (a -> b -> a) -> a -> [b] -> a
这个问题在这里已经有了答案: Export an es6 default class inline with definition or at end of file? (1 个回答) 关闭 2 年
据我了解,以下是相同的: Person p{}; // Case 1 Person p = {}; // Case 1.5 我注意到 Person p = Person{}; // Case 2 产生
below i have given a javascript code picture `` can any one help me in this code. what do this code.
我想在标题和正文上搜索全文,并在答案计数上进行过滤。 我阅读了elasticsearch documentation for combining filters并构建了此查询。 "query": {
它是流动的 C 代码中的内存泄漏吗? #include int *a; int main() { a = malloc(sizeof(int)*10); return
这两个声明有什么区别: char (*ptr)[N]; 对比 char ptr[][N]; 谢谢。 最佳答案 (1)声明 char (*ptr)[N]; ptr 是指向大小为 N 的字符数组的指针 下
data II = I Int Int deriving (Show) instance II Show where show I a b = show (a+b) showt.hs:3:2: s
我从 clojuredoc 中阅读了关于 condp 的文档。在文档中我找到了以下代码: (condp 一些 [1 2 3 4] #{0 6 7} :>> 公司 #{4 5 9} :>> 十二月 #{
我是一名优秀的程序员,十分优秀!