0 / 0 / 0
Регистрация: 28.01.2016
Сообщений: 18
|
|||||||||||||||||||||
1 | |||||||||||||||||||||
Unable to instantiate activity ComponentInfo08.02.2016, 10:47. Показов 7238. Ответов 9
Добрый день!
Уже все перепробовал, серверы гугла скоро в ребут уйдут... Компилит без ошибок, но в эмуле при переходе на этот активити - выкидывает приложение. "Unable to instantiate activity ComponentInfo Caused by: java.lang.NullPointerException at android.app.Activity.findViewById" - из лога. Лог ошибки: Кликните здесь для просмотра всего текста
Вот код Main2Activity : Кликните здесь для просмотра всего текста
Вот код Main22Activity (если нужен): Кликните здесь для просмотра всего текста
Вот манифест: Кликните здесь для просмотра всего текста
0
|
08.02.2016, 10:47 | |
Ответы с готовыми решениями:
9
Unable to instantiate activity ComponentInfo Unable to Start Activity ComponentInfo Unable to Start Activity ComponentInfo Java.lang.RuntimeException: Unable to start activity |
396 / 340 / 84
Регистрация: 17.10.2014
Сообщений: 1,009
|
|
08.02.2016, 10:55 | 2 |
Лог по всей видимости не соответствует коду, так как жалуется на 18 строку, и findViewById
но скорее всего в разметке нет TextView c id=textView2.
0
|
0 / 0 / 0
Регистрация: 28.01.2016
Сообщений: 18
|
||||||
08.02.2016, 11:11 [ТС] | 3 | |||||
androbro, Есть такой TextView:
0
|
396 / 340 / 84
Регистрация: 17.10.2014
Сообщений: 1,009
|
||||||
08.02.2016, 11:17 | 4 | |||||
ну так приведите актуальный код, который соответствует логу.
Добавлено через 3 минуты Cheshire_161, ааа, постойте ка, Вы строчку то эту в onCreate() перенесите:
0
|
0 / 0 / 0
Регистрация: 28.01.2016
Сообщений: 18
|
||||||
08.02.2016, 11:25 [ТС] | 5 | |||||
androbro,
Добавлено через 3 минуты androbro, так а если я перенесу в onCreate у меня дальше в обработчиках кнопки не будет работать textQuest
0
|
396 / 340 / 84
Регистрация: 17.10.2014
Сообщений: 1,009
|
|||||||||||
08.02.2016, 11:30 | 7 | ||||||||||
Сообщение было отмечено Cheshire_161 как решение
Решение
ну так объявление оставьте там же:
1
|
0 / 0 / 0
Регистрация: 28.01.2016
Сообщений: 18
|
||||||
08.02.2016, 11:40 [ТС] | 8 | |||||
androbro, теперь жалуется на Intent...
0
|
396 / 340 / 84
Регистрация: 17.10.2014
Сообщений: 1,009
|
|
08.02.2016, 11:43 | 9 |
0
|
0 / 0 / 0
Регистрация: 28.01.2016
Сообщений: 18
|
|
08.02.2016, 11:49 [ТС] | 10 |
androbro, Паблито, такая ошибка глупая оказывается))) Спасибо, помогло!
0
|
08.02.2016, 11:49 | |
08.02.2016, 11:49 | |
Помогаю со студенческими работами здесь
10
UnityException: Unable to start activity! Как исправить ошибку "Unable to add window -- token null is not valid; is your activity running?" Unable to create debug bridge unable to start adb server Как изменить кнопку на втором Activity с первого Activity в Android Studio? Искать еще темы с ответами Или воспользуйтесь поиском по форуму: |