Форум программистов, компьютерный форум, киберфорум
Программирование Android
Войти
Регистрация
Восстановить пароль
Карта форума Темы раздела Блоги Сообщество Поиск Заказать работу  
 
Рейтинг 4.83/18: Рейтинг темы: голосов - 18, средняя оценка - 4.83
0 / 0 / 0
Регистрация: 30.11.2012
Сообщений: 25
1

Странные ошибки при компиляции проекта

30.11.2012, 15:53. Показов 3645. Ответов 18
Метки нет (Все метки)

Author24 — интернет-сервис помощи студентам
Доброго дня, форумчане! Создавал проект вида Списка контактов, но для списка резюме, выдаёт ошибку со строки:

XML
1
 View root = inflater.inflate(R.layout.dialog, null);
Текст ошибки: dialog cannot be resolved or is not a field
В дереве проекта dialog.xml создан, и далее все строки, которые связаны с R.layout так же выдают ошибку.
К сообщению прикладываю исходники в архиве, если не сложно помогите, пожалуйста! Заранее спасибо
Вложения
Тип файла: rar ContactList.rar (422.1 Кб, 8 просмотров)
0
Programming
Эксперт
94731 / 64177 / 26122
Регистрация: 12.04.2006
Сообщений: 116,782
30.11.2012, 15:53
Ответы с готовыми решениями:

При компиляции нового (не измененного) проекта на движке Cocos2D выскакивает ошибка
error: There is no SDK with the name or path 'iphoneos' Из-за чего это может быть т как это...

Ошибки при компиляции проекта
#include <vcl.h> #pragma hdrstop #include "Unit1.h"...

Ошибки при компиляции проекта
Использую MPLAB X IDE v1.10. Создал проект (благо инфы как это сделать много в нете). Листинг...

Ошибки доступа при компиляции проекта
Люди добрые выручайте,сдавать проект на недели вылезли вот такие ошибки,при запуске не пускает...

18
Mobile Developer
238 / 234 / 18
Регистрация: 10.05.2009
Сообщений: 917
01.12.2012, 18:47 2
А можно увидеть stack trace всей ошибки? и кусок кода где создается infalter а так же xml диалога?
0
0 / 0 / 0
Регистрация: 30.11.2012
Сообщений: 25
01.12.2012, 20:20  [ТС] 3
Цитата Сообщение от lifestyle Посмотреть сообщение
А можно увидеть stack trace всей ошибки? и кусок кода где создается infalter а так же xml диалога?
так исходники же прилеплены в первом сообщении
0
Mobile Developer
238 / 234 / 18
Регистрация: 10.05.2009
Сообщений: 917
01.12.2012, 20:36 4
stack trace'а там нету и во вторых качать все исходники для двух кусочков кода излишне
1
0 / 0 / 0
Регистрация: 30.11.2012
Сообщений: 25
01.12.2012, 20:47  [ТС] 5
Все ошибки
Кликните здесь для просмотра всего текста
Description Resource Path Location Type
The method requery() from the type Cursor is deprecated SimplyDatabaseActivity.java /SimplyDatabase/src/ru/alexanderklimov/simplydatabase line 82 Java Problem
edu cannot be resolved or is not a field ContactListActivity.java /ContactList/src/ru/alexanderklimov/contactlist line 104 Java Problem
lang cannot be resolved or is not a field ContactListActivity.java /ContactList/src/ru/alexanderklimov/contactlist line 103 Java Problem
email cannot be resolved or is not a field ContactListActivity.java /ContactList/src/ru/alexanderklimov/contactlist line 102 Java Problem
phone cannot be resolved or is not a field ContactListActivity.java /ContactList/src/ru/alexanderklimov/contactlist line 101 Java Problem
name cannot be resolved or is not a field ContactListActivity.java /ContactList/src/ru/alexanderklimov/contactlist line 100 Java Problem
dialog cannot be resolved or is not a field ContactListActivity.java /ContactList/src/ru/alexanderklimov/contactlist line 98 Java Problem
toast_notify cannot be resolved or is not a field ContactListActivity.java /ContactList/src/ru/alexanderklimov/contactlist line 88 Java Problem
toast_notify cannot be resolved or is not a field ContactListActivity.java /ContactList/src/ru/alexanderklimov/contactlist line 79 Java Problem
dialog cannot be resolved or is not a field ContactListActivity.java /ContactList/src/ru/alexanderklimov/contactlist line 139 Java Problem
btn_cancel cannot be resolved or is not a field ContactListActivity.java /ContactList/src/ru/alexanderklimov/contactlist line 131 Java Problem
The method requery() from the type Cursor is deprecated ContactListActivity.java /ContactList/src/ru/alexanderklimov/contactlist line 127 Java Problem
btn_ok cannot be resolved or is not a field ContactListActivity.java /ContactList/src/ru/alexanderklimov/contactlist line 113 Java Problem
title_add cannot be resolved or is not a field ContactListActivity.java /ContactList/src/ru/alexanderklimov/contactlist line 111 Java Problem
person_inf cannot be resolved or is not a field ContactListActivity.java /ContactList/src/ru/alexanderklimov/contactlist line 107 Java Problem
exp cannot be resolved or is not a field ContactListActivity.java /ContactList/src/ru/alexanderklimov/contactlist line 106 Java Problem
exp_edu cannot be resolved or is not a field ContactListActivity.java /ContactList/src/ru/alexanderklimov/contactlist line 105 Java Problem
phone cannot be resolved or is not a field ContactListActivity.java /ContactList/src/ru/alexanderklimov/contactlist line 44 Java Problem
email cannot be resolved or is not a field ContactListActivity.java /ContactList/src/ru/alexanderklimov/contactlist line 44 Java Problem
[I18N] Hardcoded string "Delete All", should use @string resource main.xml /SimplyDatabase/res/layout line 29 Android Lint Problem
main cannot be resolved or is not a field ContactListActivity.java /ContactList/src/ru/alexanderklimov/contactlist line 42 Java Problem
[I18N] Hardcoded string "Add", should use @string resource main.xml /SimplyDatabase/res/layout line 22 Android Lint Problem
This text field does not specify an inputType or a hint main.xml /SimplyDatabase/res/layout line 12 Android Lint Problem
name cannot be resolved or is not a field ContactListActivity.java /ContactList/src/ru/alexanderklimov/contactlist line 44 Java Problem
[I18N] Hardcoded string "Enter content", should use @string resource main.xml /SimplyDatabase/res/layout line 10 Android Lint Problem
The method managedQuery(Uri, String[], String, String[], String) from the type Activity is deprecated ContactListActivity.java /ContactList/src/ru/alexanderklimov/contactlist line 38 Java Problem
menu_edit cannot be resolved or is not a field ContactListActivity.java /ContactList/src/ru/alexanderklimov/contactlist line 53 Java Problem
menu_delete cannot be resolved or is not a field ContactListActivity.java /ContactList/src/ru/alexanderklimov/contactlist line 57 Java Problem
person_inf cannot be resolved or is not a field ContactListActivity.java /ContactList/src/ru/alexanderklimov/contactlist line 44 Java Problem
menu_add cannot be resolved or is not a field ContactListActivity.java /ContactList/src/ru/alexanderklimov/contactlist line 50 Java Problem
exp_edu cannot be resolved or is not a field ContactListActivity.java /ContactList/src/ru/alexanderklimov/contactlist line 44 Java Problem
exp cannot be resolved or is not a field ContactListActivity.java /ContactList/src/ru/alexanderklimov/contactlist line 44 Java Problem
lang cannot be resolved or is not a field ContactListActivity.java /ContactList/src/ru/alexanderklimov/contactlist line 44 Java Problem
edu cannot be resolved or is not a field ContactListActivity.java /ContactList/src/ru/alexanderklimov/contactlist line 44 Java Problem
name cannot be resolved or is not a field ContactListActivity.java /ContactList/src/ru/alexanderklimov/contactlist line 141 Java Problem
phone cannot be resolved or is not a field ContactListActivity.java /ContactList/src/ru/alexanderklimov/contactlist line 142 Java Problem
email cannot be resolved or is not a field ContactListActivity.java /ContactList/src/ru/alexanderklimov/contactlist line 143 Java Problem
lang cannot be resolved or is not a field ContactListActivity.java /ContactList/src/ru/alexanderklimov/contactlist line 144 Java Problem
edu cannot be resolved or is not a field ContactListActivity.java /ContactList/src/ru/alexanderklimov/contactlist line 145 Java Problem
exp_edu cannot be resolved or is not a field ContactListActivity.java /ContactList/src/ru/alexanderklimov/contactlist line 146 Java Problem
exp cannot be resolved or is not a field ContactListActivity.java /ContactList/src/ru/alexanderklimov/contactlist line 147 Java Problem
person_inf cannot be resolved or is not a field ContactListActivity.java /ContactList/src/ru/alexanderklimov/contactlist line 148 Java Problem
title_edit cannot be resolved or is not a field ContactListActivity.java /ContactList/src/ru/alexanderklimov/contactlist line 162 Java Problem
btn_ok cannot be resolved or is not a field ContactListActivity.java /ContactList/src/ru/alexanderklimov/contactlist line 165 Java Problem
The method requery() from the type Cursor is deprecated ContactListActivity.java /ContactList/src/ru/alexanderklimov/contactlist line 180 Java Problem
btn_cancel cannot be resolved or is not a field ContactListActivity.java /ContactList/src/ru/alexanderklimov/contactlist line 185 Java Problem
title_delete cannot be resolved or is not a field ContactListActivity.java /ContactList/src/ru/alexanderklimov/contactlist line 194 Java Problem
btn_ok cannot be resolved or is not a field ContactListActivity.java /ContactList/src/ru/alexanderklimov/contactlist line 197 Java Problem
The method requery() from the type Cursor is deprecated ContactListActivity.java /ContactList/src/ru/alexanderklimov/contactlist line 201 Java Problem
btn_cancel cannot be resolved or is not a field ContactListActivity.java /ContactList/src/ru/alexanderklimov/contactlist line 206 Java Problem
Unparsed aapt error(s)! Check the console for output. ContactList line 1 Android ADT Problem
The method startManagingCursor(Cursor) from the type Activity is deprecated SimplyDatabaseActivity.java /SimplyDatabase/src/ru/alexanderklimov/simplydatabase line 52 Java Problem
The constructor SimpleCursorAdapter(Context, int, Cursor, String[], int[]) is deprecated SimplyDatabaseActivity.java /SimplyDatabase/src/ru/alexanderklimov/simplydatabase line 57 Java Problem


xml диалог
Кликните здесь для просмотра всего текста
XML
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:orientation="vertical" >
 
    <LinearLayout
        android:layout_width="fill_parent"
        android:layout_height="wrap_content"
        android:orientation="horizontal" >
 
        <TextView
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_alignParentLeft="true"
            android:text="@string/field_name" />
 
        <EditText
            android:id="@+id/name"
            android:layout_width="fill_parent"
            android:layout_height="wrap_content"
            android:layout_alignParentRight="true" />
 
    </LinearLayout>
 
    <LinearLayout
        android:layout_width="fill_parent"
        android:layout_height="wrap_content"
        android:orientation="horizontal" >
 
        <TextView
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_alignParentLeft="true"
            android:text="@string/field_phone" />
 
        <EditText
            android:id="@+id/phone"
            android:layout_width="fill_parent"
            android:layout_height="wrap_content"
            android:layout_alignParentRight="true" >
        </EditText>
 
    </LinearLayout>
 
     <LinearLayout
        android:layout_width="fill_parent"
        android:layout_height="wrap_content"
        android:orientation="horizontal" >
 
        <TextView
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_alignParentLeft="true"
            android:text="@string/field_email" />
 
        <EditText
            android:id="@+id/email"
            android:layout_width="fill_parent"
            android:layout_height="wrap_content"
            android:layout_alignParentRight="true" >
        </EditText>
 
    </LinearLayout>
    
      <LinearLayout
        android:layout_width="fill_parent"
        android:layout_height="wrap_content"
        android:orientation="horizontal" >
 
        <TextView
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_alignParentLeft="true"
            android:text="@string/field_lang" />
 
        <EditText
            android:id="@+id/phone"
            android:layout_width="fill_parent"
            android:layout_height="wrap_content"
            android:layout_alignParentRight="true" >
        </EditText>
 
    </LinearLayout>
    
       <LinearLayout
        android:layout_width="fill_parent"
        android:layout_height="wrap_content"
        android:orientation="horizontal" >
 
        <TextView
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_alignParentLeft="true"
            android:text="@string/field_edu" />
 
        <EditText
            android:id="@+id/phone"
            android:layout_width="fill_parent"
            android:layout_height="wrap_content"
            android:layout_alignParentRight="true" >
        </EditText>
 
    </LinearLayout>
    
        <LinearLayout
        android:layout_width="fill_parent"
        android:layout_height="wrap_content"
        android:orientation="horizontal" >
 
        <TextView
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_alignParentLeft="true"
            android:text="@string/field_exp_edu" />
 
        <EditText
            android:id="@+id/phone"
            android:layout_width="fill_parent"
            android:layout_height="wrap_content"
            android:layout_alignParentRight="true" >
        </EditText>
 
    </LinearLayout>
    
         <LinearLayout
        android:layout_width="fill_parent"
        android:layout_height="wrap_content"
        android:orientation="horizontal" >
 
        <TextView
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_alignParentLeft="true"
            android:text="@string/field_exp" />
 
        <EditText
            android:id="@+id/phone"
            android:layout_width="fill_parent"
            android:layout_height="wrap_content"
            android:layout_alignParentRight="true" >
        </EditText>
 
    </LinearLayout>
    
    <LinearLayout
        android:layout_width="fill_parent"
        android:layout_height="wrap_content"
        android:orientation="horizontal" >
 
        <TextView
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_alignParentLeft="true"
            android:text="@string/field_person_inf" />
 
        <EditText
            android:id="@+id/phone"
            android:layout_width="fill_parent"
            android:layout_height="wrap_content"
            android:layout_alignParentRight="true" >
        </EditText>
 
    </LinearLayout>
</LinearLayout>
    <menu xmlns:android="http://schemas.android.com/apk/res/android"></menu>

Inflater
Кликните здесь для просмотра всего текста
XML
1
2
3
 private void CallAddContactDialog() {
        LayoutInflater inflater = LayoutInflater.from(this);
        View root = inflater.inflate(R.layout.dialog, null);
XML
1
2
3
 private void CallEditContactDialog(final long id) {
        LayoutInflater inflater = LayoutInflater.from(this);
        View root = inflater.inflate(R.layout.dialog, null);
0
Mobile Developer
238 / 234 / 18
Регистрация: 10.05.2009
Сообщений: 917
01.12.2012, 21:24 6
Мне вот интересно, а ты код пересматривал вообще , пытался разобраться что да как??
открой dialog.xm на строке номер 51 и ответь самому себе на вопрос откуда взялось( или откуда там возьмется) строка с именем field_email ?!
Java
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
[2012-12-01 19:01:40 - ContactListActivity] W/ResourceType( 3916): Bad XML block: header size 92 or total size 0 is larger than data size 0
[2012-12-01 19:01:40 - ContactListActivity] C:\Users\LifeStyle\Downloads\ContactList\ContactList\res\layout\dialog.xml:51: error: Error: No resource found that matches the given name (at 'text' with value '@string/field_email').
[2012-12-01 19:01:40 - ContactListActivity] C:\Users\LifeStyle\Downloads\ContactList\ContactList\res\layout\dialog.xml:71: error: Error: No resource found that matches the given name (at 'text' with value '@string/field_lang').
[2012-12-01 19:01:40 - ContactListActivity] C:\Users\LifeStyle\Downloads\ContactList\ContactList\res\layout\dialog.xml:91: error: Error: No resource found that matches the given name (at 'text' with value '@string/field_edu').
[2012-12-01 19:01:40 - ContactListActivity] C:\Users\LifeStyle\Downloads\ContactList\ContactList\res\layout\dialog.xml:111: error: Error: No resource found that matches the given name (at 'text' with value '@string/field_exp_edu').
[2012-12-01 19:01:40 - ContactListActivity] C:\Users\LifeStyle\Downloads\ContactList\ContactList\res\layout\dialog.xml:131: error: Error: No resource found that matches the given name (at 'text' with value '@string/field_exp').
[2012-12-01 19:01:40 - ContactListActivity] C:\Users\LifeStyle\Downloads\ContactList\ContactList\res\layout\dialog.xml:151: error: Error: No resource found that matches the given name (at 'text' with value '@string/field_person_inf').
[2012-12-01 19:01:40 - ContactListActivity] C:\Users\LifeStyle\Downloads\ContactList\ContactList\res\menu\main.xml:3: error: Error: No resource found that matches the given name (at 'title' with value '@string/menu_settings').
[2012-12-01 19:03:59 - ContactListActivity] W/ResourceType( 4692): Bad XML block: header size 92 or total size 0 is larger than data size 0
[2012-12-01 19:03:59 - ContactListActivity] C:\Users\LifeStyle\Downloads\ContactList\ContactList\res\layout\dialog.xml:51: error: Error: No resource found that matches the given name (at 'text' with value '@string/field_email').
[2012-12-01 19:03:59 - ContactListActivity] C:\Users\LifeStyle\Downloads\ContactList\ContactList\res\layout\dialog.xml:71: error: Error: No resource found that matches the given name (at 'text' with value '@string/field_lang').
[2012-12-01 19:03:59 - ContactListActivity] C:\Users\LifeStyle\Downloads\ContactList\ContactList\res\layout\dialog.xml:91: error: Error: No resource found that matches the given name (at 'text' with value '@string/field_edu').
[2012-12-01 19:03:59 - ContactListActivity] C:\Users\LifeStyle\Downloads\ContactList\ContactList\res\layout\dialog.xml:111: error: Error: No resource found that matches the given name (at 'text' with value '@string/field_exp_edu').
[2012-12-01 19:03:59 - ContactListActivity] C:\Users\LifeStyle\Downloads\ContactList\ContactList\res\layout\dialog.xml:131: error: Error: No resource found that matches the given name (at 'text' with value '@string/field_exp').
[2012-12-01 19:03:59 - ContactListActivity] C:\Users\LifeStyle\Downloads\ContactList\ContactList\res\layout\dialog.xml:151: error: Error: No resource found that matches the given name (at 'text' with value '@string/field_person_inf').
[2012-12-01 19:03:59 - ContactListActivity] C:\Users\LifeStyle\Downloads\ContactList\ContactList\res\menu\main.xml:3: error: Error: No resource found that matches the given name (at 'title' with value '@string/menu_settings').
[2012-12-01 19:04:16 - ContactListActivity] W/ResourceType( 3468): Bad XML block: header size 108 or total size 0 is larger than data size 0
[2012-12-01 19:04:16 - ContactListActivity] C:\Users\LifeStyle\Downloads\ContactList\ContactList\res\layout\dialog.xml:51: error: Error: No resource found that matches the given name (at 'text' with value '@string/field_email').
[2012-12-01 19:04:16 - ContactListActivity] C:\Users\LifeStyle\Downloads\ContactList\ContactList\res\layout\dialog.xml:71: error: Error: No resource found that matches the given name (at 'text' with value '@string/field_lang').
[2012-12-01 19:04:16 - ContactListActivity] C:\Users\LifeStyle\Downloads\ContactList\ContactList\res\layout\dialog.xml:91: error: Error: No resource found that matches the given name (at 'text' with value '@string/field_edu').
[2012-12-01 19:04:16 - ContactListActivity] C:\Users\LifeStyle\Downloads\ContactList\ContactList\res\layout\dialog.xml:111: error: Error: No resource found that matches the given name (at 'text' with value '@string/field_exp_edu').
[2012-12-01 19:04:16 - ContactListActivity] C:\Users\LifeStyle\Downloads\ContactList\ContactList\res\layout\dialog.xml:131: error: Error: No resource found that matches the given name (at 'text' with value '@string/field_exp').
[2012-12-01 19:04:16 - ContactListActivity] C:\Users\LifeStyle\Downloads\ContactList\ContactList\res\layout\dialog.xml:151: error: Error: No resource found that matches the given name (at 'text' with value '@string/field_person_inf').
[2012-12-01 19:04:16 - ContactListActivity] C:\Users\LifeStyle\Downloads\ContactList\ContactList\res\menu\main.xml:3: error: Error: No resource found that matches the given name (at 'title' with value '@string/menu_settings').
[2012-12-01 19:05:44 - ContactListActivity] W/ResourceType( 5528): Bad XML block: header size 92 or total size 5849712 is larger than data size 0
[2012-12-01 19:05:44 - ContactListActivity] C:\Users\LifeStyle\Downloads\ContactList\ContactList\res\layout\dialog.xml:51: error: Error: No resource found that matches the given name (at 'text' with value '@string/field_email').
[2012-12-01 19:05:44 - ContactListActivity] C:\Users\LifeStyle\Downloads\ContactList\ContactList\res\layout\dialog.xml:71: error: Error: No resource found that matches the given name (at 'text' with value '@string/field_lang').
[2012-12-01 19:05:44 - ContactListActivity] C:\Users\LifeStyle\Downloads\ContactList\ContactList\res\layout\dialog.xml:91: error: Error: No resource found that matches the given name (at 'text' with value '@string/field_edu').
[2012-12-01 19:05:44 - ContactListActivity] C:\Users\LifeStyle\Downloads\ContactList\ContactList\res\layout\dialog.xml:111: error: Error: No resource found that matches the given name (at 'text' with value '@string/field_exp_edu').
[2012-12-01 19:05:44 - ContactListActivity] C:\Users\LifeStyle\Downloads\ContactList\ContactList\res\layout\dialog.xml:131: error: Error: No resource found that matches the given name (at 'text' with value '@string/field_exp').
[2012-12-01 19:05:44 - ContactListActivity] C:\Users\LifeStyle\Downloads\ContactList\ContactList\res\layout\dialog.xml:151: error: Error: No resource found that matches the given name (at 'text' with value '@string/field_person_inf').
[2012-12-01 19:05:44 - ContactListActivity] C:\Users\LifeStyle\Downloads\ContactList\ContactList\res\menu\main.xml:3: error: Error: No resource found that matches the given name (at 'title' with value '@string/menu_settings').
[2012-12-01 19:06:17 - ContactListActivity] W/ResourceType( 4176): Bad XML block: header size 92 or total size 0 is larger than data size 0
[2012-12-01 19:06:17 - ContactListActivity] C:\Users\LifeStyle\Downloads\ContactList\ContactList\res\layout\dialog.xml:51: error: Error: No resource found that matches the given name (at 'text' with value '@string/field_email').
[2012-12-01 19:06:17 - ContactListActivity] C:\Users\LifeStyle\Downloads\ContactList\ContactList\res\layout\dialog.xml:71: error: Error: No resource found that matches the given name (at 'text' with value '@string/field_lang').
[2012-12-01 19:06:17 - ContactListActivity] C:\Users\LifeStyle\Downloads\ContactList\ContactList\res\layout\dialog.xml:91: error: Error: No resource found that matches the given name (at 'text' with value '@string/field_edu').
[2012-12-01 19:06:17 - ContactListActivity] C:\Users\LifeStyle\Downloads\ContactList\ContactList\res\layout\dialog.xml:111: error: Error: No resource found that matches the given name (at 'text' with value '@string/field_exp_edu').
[2012-12-01 19:06:17 - ContactListActivity] C:\Users\LifeStyle\Downloads\ContactList\ContactList\res\layout\dialog.xml:131: error: Error: No resource found that matches the given name (at 'text' with value '@string/field_exp').
[2012-12-01 19:06:17 - ContactListActivity] C:\Users\LifeStyle\Downloads\ContactList\ContactList\res\layout\dialog.xml:151: error: Error: No resource found that matches the given name (at 'text' with value '@string/field_person_inf').
[2012-12-01 19:06:17 - ContactListActivity] C:\Users\LifeStyle\Downloads\ContactList\ContactList\res\menu\main.xml:3: error: Error: No resource found that matches the given name (at 'title' with value '@string/menu_settings').
[2012-12-01 19:08:48 - ContactListActivity] W/ResourceType( 3812): Bad XML block: header size 123 or total size 7881328 is larger than data size 0
[2012-12-01 19:08:48 - ContactListActivity] C:\Users\LifeStyle\Downloads\ContactList\ContactList\res\layout\dialog.xml:51: error: Error: No resource found that matches the given name (at 'text' with value '@string/field_email').
[2012-12-01 19:08:48 - ContactListActivity] C:\Users\LifeStyle\Downloads\ContactList\ContactList\res\layout\dialog.xml:71: error: Error: No resource found that matches the given name (at 'text' with value '@string/field_lang').
[2012-12-01 19:08:48 - ContactListActivity] C:\Users\LifeStyle\Downloads\ContactList\ContactList\res\layout\dialog.xml:91: error: Error: No resource found that matches the given name (at 'text' with value '@string/field_edu').
[2012-12-01 19:08:48 - ContactListActivity] C:\Users\LifeStyle\Downloads\ContactList\ContactList\res\layout\dialog.xml:111: error: Error: No resource found that matches the given name (at 'text' with value '@string/field_exp_edu').
[2012-12-01 19:08:48 - ContactListActivity] C:\Users\LifeStyle\Downloads\ContactList\ContactList\res\layout\dialog.xml:131: error: Error: No resource found that matches the given name (at 'text' with value '@string/field_exp').
[2012-12-01 19:08:48 - ContactListActivity] C:\Users\LifeStyle\Downloads\ContactList\ContactList\res\layout\dialog.xml:151: error: Error: No resource found that matches the given name (at 'text' with value '@string/field_person_inf').
[2012-12-01 19:08:48 - ContactListActivity] C:\Users\LifeStyle\Downloads\ContactList\ContactList\res\menu\main.xml:3: error: Error: No resource found that matches the given name (at 'title' with value '@string/menu_settings').
Добавлено через 7 минут
вместо import android.R
должен быть import ru.alexander......contactlist.R;
короче исправляй XML файлы после этого сможешь добавить этот импорт с твоими ресурсами
0
0 / 0 / 0
Регистрация: 30.11.2012
Сообщений: 25
01.12.2012, 21:46  [ТС] 7
вроде дошло, ресурсов в файле strings.xml нет
0
lifestyle
01.12.2012, 21:55
  #8

Не по теме:

все еще вроде?!)

1
0 / 0 / 0
Регистрация: 30.11.2012
Сообщений: 25
01.12.2012, 22:56  [ТС] 9
Цитата Сообщение от lifestyle Посмотреть сообщение

Не по теме:

все еще вроде?!)

я конечно дико извиняюсь, но теперь ошибка сменила местоположение и хотелось бы снова услышать Ваш мудрый совет, шо делать то?

Ошибка:
Кликните здесь для просмотра всего текста
XML
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
12-01 22:54:07.647: E/AndroidRuntime(29756): FATAL EXCEPTION: main
12-01 22:54:07.647: E/AndroidRuntime(29756): java.lang.RuntimeException: Unable to get provider ru.alexanderklimov.contactlist.ContactProvider: android.database.sqlite.SQLiteException: duplicate column name: textTEXT: , while compiling: CREATE TABLE contact (_id INTEGER PRIMARY KEY AUTOINCREMENT, name TEXT, phone TEXT, emailEMAIL, textTEXT, textTEXT,textTEXT,textTEXT, textTEXT,
12-01 22:54:07.647: E/AndroidRuntime(29756):    at android.app.ActivityThread.installProvider(ActivityThread.java:4257)
12-01 22:54:07.647: E/AndroidRuntime(29756):    at android.app.ActivityThread.installContentProviders(ActivityThread.java:4009)
12-01 22:54:07.647: E/AndroidRuntime(29756):    at android.app.ActivityThread.handleBindApplication(ActivityThread.java:3963)
12-01 22:54:07.647: E/AndroidRuntime(29756):    at android.app.ActivityThread.access$1300(ActivityThread.java:127)
12-01 22:54:07.647: E/AndroidRuntime(29756):    at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1196)
12-01 22:54:07.647: E/AndroidRuntime(29756):    at android.os.Handler.dispatchMessage(Handler.java:99)
12-01 22:54:07.647: E/AndroidRuntime(29756):    at android.os.Looper.loop(Looper.java:137)
12-01 22:54:07.647: E/AndroidRuntime(29756):    at android.app.ActivityThread.main(ActivityThread.java:4441)
12-01 22:54:07.647: E/AndroidRuntime(29756):    at java.lang.reflect.Method.invokeNative(Native Method)
12-01 22:54:07.647: E/AndroidRuntime(29756):    at java.lang.reflect.Method.invoke(Method.java:511)
12-01 22:54:07.647: E/AndroidRuntime(29756):    at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:784)
12-01 22:54:07.647: E/AndroidRuntime(29756):    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:551)
12-01 22:54:07.647: E/AndroidRuntime(29756):    at dalvik.system.NativeStart.main(Native Method)
12-01 22:54:07.647: E/AndroidRuntime(29756): Caused by: android.database.sqlite.SQLiteException: duplicate column name: textTEXT: , while compiling: CREATE TABLE contact (_id INTEGER PRIMARY KEY AUTOINCREMENT, name TEXT, phone TEXT, emailEMAIL, textTEXT, textTEXT,textTEXT,textTEXT, textTEXT,
12-01 22:54:07.647: E/AndroidRuntime(29756):    at android.database.sqlite.SQLiteCompiledSql.native_compile(Native Method)
12-01 22:54:07.647: E/AndroidRuntime(29756):    at android.database.sqlite.SQLiteCompiledSql.<init>(SQLiteCompiledSql.java:68)
12-01 22:54:07.647: E/AndroidRuntime(29756):    at android.database.sqlite.SQLiteProgram.compileSql(SQLiteProgram.java:134)
12-01 22:54:07.647: E/AndroidRuntime(29756):    at android.database.sqlite.SQLiteProgram.compileAndbindAllArgs(SQLiteProgram.java:361)
12-01 22:54:07.647: E/AndroidRuntime(29756):    at android.database.sqlite.SQLiteStatement.acquireAndLock(SQLiteStatement.java:260)
12-01 22:54:07.647: E/AndroidRuntime(29756):    at android.database.sqlite.SQLiteStatement.executeUpdateDelete(SQLiteStatement.java:84)
12-01 22:54:07.647: E/AndroidRuntime(29756):    at android.database.sqlite.SQLiteDatabase.executeSql(SQLiteDatabase.java:1899)
12-01 22:54:07.647: E/AndroidRuntime(29756):    at android.database.sqlite.SQLiteDatabase.execSQL(SQLiteDatabase.java:1839)
12-01 22:54:07.647: E/AndroidRuntime(29756):    at ru.alexanderklimov.contactlist.ContactDbHelper.onCreate(ContactDbHelper.java:25)
12-01 22:54:07.647: E/AndroidRuntime(29756):    at android.database.sqlite.SQLiteOpenHelper.getWritableDatabase(SQLiteOpenHelper.java:165)
12-01 22:54:07.647: E/AndroidRuntime(29756):    at ru.alexanderklimov.contactlist.ContactProvider.onCreate(ContactProvider.java:55)
12-01 22:54:07.647: E/AndroidRuntime(29756):    at android.content.ContentProvider.attachInfo(ContentProvider.java:944)
12-01 22:54:07.647: E/AndroidRuntime(29756):    at android.app.ActivityThread.installProvider(ActivityThread.java:4254)
12-01 22:54:07.647: E/AndroidRuntime(29756):    ... 12 more


Создание базы:
Java
1
2
3
4
5
6
db.execSQL("CREATE TABLE " + TABLE_NAME 
                + " (_id INTEGER PRIMARY KEY AUTOINCREMENT, " 
                + NAME + " TEXT, " + PHONE + " TEXT, " 
                + EMAIL + "EMAIL, " + LANG + "TEXT, " 
                + EDU + "TEXT," + EXP_EDU+ "TEXT," 
                + EXP + "TEXT, " + PERSON_INF + "TEXT " );
0
Mobile Developer
238 / 234 / 18
Регистрация: 10.05.2009
Сообщений: 917
01.12.2012, 23:37 10
ошибка в том что есть дубликаты столбцы в таблице БД.
1. После столбца email идут одни дубликаты.
2. Посмотри на код и добавь пробелы где надо, и посмотри что в переменных лежит чтоб копий больше не было...

Перед тем как задать вопрос пересмотри ошибку и код, в stack trace'е все доходчиво написано в чем и где проблема.
0
0 / 0 / 0
Регистрация: 30.11.2012
Сообщений: 25
02.12.2012, 00:10  [ТС] 11
Цитата Сообщение от lifestyle Посмотреть сообщение
ошибка в том что есть дубликаты столбцы в таблице БД.
1. После столбца email идут одни дубликаты.
2. Посмотри на код и добавь пробелы где надо, и посмотри что в переменных лежит чтоб копий больше не было...

Перед тем как задать вопрос пересмотри ошибку и код, в stack trace'е все доходчиво написано в чем и где проблема.
вроде понял
0
Mobile Developer
238 / 234 / 18
Регистрация: 10.05.2009
Сообщений: 917
02.12.2012, 00:20 12
12-01 22:54:07.647: E/AndroidRuntime(29756): java.lang.RuntimeException: Unable to get provider ru.alexanderklimov.contactlist.ContactProvider: android.database.sqlite.SQLiteException: duplicate column name: textTEXT: , while compiling: CREATE TABLE contact (_id INTEGER PRIMARY KEY AUTOINCREMENT, name TEXT, phone TEXT, emailEMAIL, textTEXT, textTEXT,textTEXT,textTEXT, textTEXT,

12-01 22:54:07.647: E/AndroidRuntime(29756): Caused by: android.database.sqlite.SQLiteException: duplicate column name: textTEXT: , while compiling: CREATE TABLE contact (_id INTEGER PRIMARY KEY AUTOINCREMENT, name TEXT, phone TEXT, emailEMAIL, textTEXT, textTEXT,textTEXT,textTEXT, textTEXT,

ни о чем эти строки не говорят ?
LANG, EDU, EXP_EDU а что лежит в этих переменных? что то мне подсказывает что во всех них лежит text
LANG = "text";
EDU= "text";
EXP_EDU= "text";
1
0 / 0 / 0
Регистрация: 30.11.2012
Сообщений: 25
02.12.2012, 00:21  [ТС] 13
Цитата Сообщение от lifestyle Посмотреть сообщение
12-01 22:54:07.647: E/AndroidRuntime(29756): java.lang.RuntimeException: Unable to get provider ru.alexanderklimov.contactlist.ContactProvider: android.database.sqlite.SQLiteException: duplicate column name: textTEXT: , while compiling: CREATE TABLE contact (_id INTEGER PRIMARY KEY AUTOINCREMENT, name TEXT, phone TEXT, emailEMAIL, textTEXT, textTEXT,textTEXT,textTEXT, textTEXT,

12-01 22:54:07.647: E/AndroidRuntime(29756): Caused by: android.database.sqlite.SQLiteException: duplicate column name: textTEXT: , while compiling: CREATE TABLE contact (_id INTEGER PRIMARY KEY AUTOINCREMENT, name TEXT, phone TEXT, emailEMAIL, textTEXT, textTEXT,textTEXT,textTEXT, textTEXT,

ни о чем эти строки не говорят ?
LANG, EDU, EXP_EDU а что лежит в этих переменных? что то мне подсказывает что во всех них лежит text
LANG = "text";
EDU= "text";
EXP_EDU= "text";
да да, спасибо большое, уже подправил это недоразумение, сейчас разбираюсь с ошибкой: Отсутствует столбец person_inf, рыщу так сказать)
0
Mobile Developer
238 / 234 / 18
Регистрация: 10.05.2009
Сообщений: 917
02.12.2012, 00:31 14
А чего искать если он отсутствует в таблице - добавь его просто и все тут...
0
0 / 0 / 0
Регистрация: 30.11.2012
Сообщений: 25
02.12.2012, 00:35  [ТС] 15
так есть же, в команде CREATE_TABLE прописан же такой столбец
Java
1
2
3
4
5
6
7
public void onCreate(SQLiteDatabase db) {
        db.execSQL("CREATE TABLE " + TABLE_NAME 
                + " (_id INTEGER PRIMARY KEY AUTOINCREMENT, " 
                + NAME + " NAME, " + PHONE + " PHONE, "
                + EMAIL + "EMAIL, " + LANG + "LANG, " 
                + EDU + "EDU, " + EXP_EDU + "EXP_EDU, " 
                + EXP + "EXP, " + PERSON_INF + "PERSON_INF" +");");
чую опять я где-то перемудрил
0
Mobile Developer
238 / 234 / 18
Регистрация: 10.05.2009
Сообщений: 917
02.12.2012, 00:45 16
PERSON_INF + "PERSON_INF" БД незнает такого типа данных вообще-то
0
0 / 0 / 0
Регистрация: 30.11.2012
Сообщений: 25
02.12.2012, 00:51  [ТС] 17
уточню, в блоке
Java
1
2
3
4
5
6
7
8
9
10
public class ContactDbHelper extends SQLiteOpenHelper implements BaseColumns {
    public static final String TABLE_NAME = "contact";
    public static final String NAME = "name";
    public static final String PHONE = "phone";
    public static final String EMAIL = "email";
    public static final String LANG = "lang";
    public static final String EDU = "edu";
    public static final String EXP_EDU = "exp_edu";
    public static final String EXP = "exp";
    public static final String PERSON_INF = "person_inf";
для каждого поля, он выбирает данные из строк, а в этой части:
Java
1
2
3
4
5
6
db.execSQL("CREATE TABLE " + TABLE_NAME 
                + " (_id INTEGER PRIMARY KEY AUTOINCREMENT, " 
                + NAME + " NAME, " + PHONE + " PHONE, "
                + EMAIL + "EMAIL, " + LANG + "TEXT, " 
                + EDU + "TEXT, " + EXP_EDU + "TEXT, " 
                + EXP + "TEXT, " + PERSON_INF + "TEXT" +");");
создаёт столбцы с именем +"Тип данных". Если я прав, то я не понимаю где я олень, если не прав значит я олень)
0
Mobile Developer
238 / 234 / 18
Регистрация: 10.05.2009
Сообщений: 917
02.12.2012, 01:05 18
Цитата Сообщение от Kalim32rus Посмотреть сообщение
так есть же, в команде CREATE_TABLE прописан же такой столбец
Java
1
2
3
4
5
6
7
public void onCreate(SQLiteDatabase db) {
        db.execSQL("CREATE TABLE " + TABLE_NAME 
                + " (_id INTEGER PRIMARY KEY AUTOINCREMENT, " 
                + NAME + " NAME, " + PHONE + " PHONE, "
                + EMAIL + "EMAIL, " + LANG + "LANG, " 
                + EDU + "EDU, " + EXP_EDU + "EXP_EDU, " 
                + EXP + "EXP, " + PERSON_INF + "PERSON_INF" +");");
чую опять я где-то перемудрил
присмотристь к коду...
0
0 / 0 / 0
Регистрация: 30.11.2012
Сообщений: 25
02.12.2012, 17:52  [ТС] 19
Цитата Сообщение от lifestyle Посмотреть сообщение
присмотристь к коду...
типы данных я уже исправил же, в предыдущем сообщении
Java
1
2
3
4
5
6
db.execSQL("CREATE TABLE " + TABLE_NAME 
                + " (_id INTEGER PRIMARY KEY AUTOINCREMENT, " 
                + NAME + " NAME, " + PHONE + " PHONE, "
                + EMAIL + "EMAIL, " + LANG + "TEXT, " 
                + EDU + "TEXT, " + EXP_EDU + "TEXT, " 
                + EXP + "TEXT, " + PERSON_INF + "TEXT" +");");
Добавлено через 14 часов 40 минут
типы данных я сменил, пробелы расставил, всё компилируется без ошибок, НО....когда запускается проект на моём телефоне данных нет, вообще никаких, хотя вводится 3 тестовых записи, одна заполняет полностью все столбцы, 2 другие только имя и телефон, вывод идёт в TextView
mail.xml
XML
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="fill_parent"
    android:layout_height="fill_parent"
    android:orientation="horizontal" >
 
    <TextView
        android:id="@+id/name"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_alignParentLeft="true"
        android:layout_alignParentRight="true"
        android:textSize="18sp" />
    
     <TextView
        android:id="@+id/email"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_alignParentRight="true"
        android:textSize="18sp" />
 
    <TextView
        android:id="@+id/phone"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_alignParentRight="true"
        android:textSize="18sp" />
    
    <TextView
        android:id="@+id/lang"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_alignParentRight="true"
        android:textSize="18sp" />
    
    <TextView
        android:id="@+id/edu"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_alignParentRight="true"
        android:textSize="18sp" />
    
    <TextView
        android:id="@+id/exp_edu"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_alignParentRight="true"
        android:textSize="18sp" />
    
    <TextView
        android:id="@+id/exp"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_alignParentRight="true"
        android:textSize="18sp" />
    
    <TextView
        android:id="@+id/person_inf"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_alignParentRight="true"
        android:textSize="18sp" />
 
</RelativeLayout>
Добавлено через 2 часа 5 минут
проблема решена, только вот надо как-то вывод структурировать, текст накладывается и совершенно нечитабельно получается
0
02.12.2012, 17:52
IT_Exp
Эксперт
87844 / 49110 / 22898
Регистрация: 17.06.2006
Сообщений: 92,604
02.12.2012, 17:52
Помогаю со студенческими работами здесь

Ошибки при компиляции проекта в консоле
Доброго времени суток! Вот какая у меня проблема. Разбираюсь я в теме &quot;Объектно-ориентированный...

Ошибки при компиляции OpenCV проекта
Вообщем сделал как все было в инструкции. Добавил либы(скрины прилагаются). Но все равно не может...

Ошибки при компиляции проекта C++ на linux (makefile)
Написала программу в visual studio 2008 все компилится, два файла записались. Но стоит задача...

Ошибки при компиляции проекта в Visual Studio
Всем привет. Помогите настроить VS Вот пошаговые действия: нажимаю создать проект и выбираю...

Ошибки при компиляции проекта на Delphi XE7
Доброе время суток :sleep: Помогите пожалуйста !!!! при компиляции проекта на Delphi XE7 выдаёт...

При компиляции проекта в BDS2006 выскочили ошибки
При компиляции проекта в BDS2006 выдаются ошибки (см. скриншот). Изначально проект переносился из...


Искать еще темы с ответами

Или воспользуйтесь поиском по форуму:
19
Ответ Создать тему
КиберФорум - форум программистов, компьютерный форум, программирование
Powered by vBulletin
Copyright ©2000 - 2024, CyberForum.ru