What's wrong with my PDF reader activity?












-1















I have a PDF reading activity that won't open for whatever reason. I suspect that the issue stems from an API that I had imported earlier. When I previewed the XML file in the PDF-reading activity, I noticed that there was a question mark next to the PDF-API, indicating that it hasn't been recognized by android studio I'd be extremely appreciative if anyone could help me figure this out. Here's the code:



XML:



<?xml version="1.0" encoding="utf-8"?>
<android.support.constraint.ConstraintLayout 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"
tools:context=".PDFReader">

<com.github.barteksc.pdfviewer.PDFView
android:id="@+id/pdfViewer"
android:layout_width="match_parent"
android:layout_height="match_parent"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintHorizontal_bias="1.0"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintRight_toRightOf="parent">

</com.github.barteksc.pdfviewer.PDFView>

</android.support.constraint.ConstraintLayout>


Java:



  package com.androidcodefinder.loginscreendemo.Analytics;

import android.content.Context;
import android.content.Intent;
import android.os.Bundle;
import android.support.annotation.Nullable;
import android.support.v7.app.AppCompatActivity;
import android.util.Log;
import android.view.Menu;
import android.view.MenuItem;
import android.view.View;
import android.widget.Button;

import com.androidcodefinder.loginscreendemo.MainActivity;
import com.androidcodefinder.loginscreendemo.R;
import com.androidcodefinder.loginscreendemo.SignUpActivity;
import com.androidcodefinder.loginscreendemo.Utils.BottomNavigationViewHelper;
import com.github.barteksc.pdfviewer.PDFView;
import com.ittianyu.bottomnavigationviewex.BottomNavigationViewEx;

public class AnalyticsActivity extends AppCompatActivity {
private static final String TAG = "AnalyticsActivity";
private Context mContext= AnalyticsActivity.this;
private static final int ACTIVITY_NUM = 0;
private Button pdfViwer;
private Button pdfViwer2;
@Override
protected void onCreate(@Nullable Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.analytics_activity);
Log.d(TAG,"onCreate: started");

setupBottomNavigationView();
pdfViwer=(Button)findViewById(R.id.pdf23);
pdfViwer.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
Intent intent = new Intent(AnalyticsActivity.this,PDFView.class);
startActivity(intent);
}
});
pdfViwer2=(Button)findViewById(R.id.pdf22);
pdfViwer2.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
Intent intent = new Intent(AnalyticsActivity.this,PDFView.class);
startActivity(intent);
}
});

}

private void setupBottomNavigationView(){
Log.d(TAG,"setupBottomNavigationView: setting up BottomNavigationView");
BottomNavigationViewEx bottomNavigationViewEx = (BottomNavigationViewEx) findViewById(R.id.bottomNavViewBar);
BottomNavigationViewHelper.setupBottomNavigationView(bottomNavigationViewEx);
BottomNavigationViewHelper.enableNavigation(mContext, bottomNavigationViewEx);
Menu menu = bottomNavigationViewEx.getMenu();
MenuItem menuItem = menu.getItem(ACTIVITY_NUM);
menuItem.setChecked(true);
}
}


Here's a screenshot of the error:
enter image description here



Error Part 2:



Logcat



Manifest code:



<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.androidcodefinder.loginscreendemo">

<!-- To auto-complete the email text field in the login form with the user's emails -->
<uses-permission android:name="android.permission.GET_ACCOUNTS" />
<uses-permission android:name="android.permission.READ_PROFILE" />
<uses-permission android:name="android.permission.READ_CONTACTS" />
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />

<application
android:allowBackup="true"
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:roundIcon="@mipmap/ic_launcher_background"
android:supportsRtl="true"
android:theme="@style/AppTheme">
<activity android:name=".MainActivity">
<intent-filter>
<action android:name="android.intent.action.MAIN" />

<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity android:name=".SignUpActivity" />
<activity android:name=".zippage" />
<activity android:name=".Catalysts.CatalystsActivity" />
<activity android:name=".Profile.ProfileActivity" />
<activity android:name=".Analytics.AnalyticsActivity" />
<activity android:name=".postpg" />
<activity android:name=".postp1" />
<activity android:name=".post2" />
<activity android:name=".postend" />
<activity android:name=".PDFReader"></activity>
</application>

</manifest>









share|improve this question




















  • 1





    please share your logcat details

    – Suraj Vaishnav
    Nov 24 '18 at 4:51











  • I just added it :)

    – ABAS HERSI
    Nov 24 '18 at 5:49











  • Please don't post screenshots of code, XML, or logcat output. Please post all text as text. Also, that's not what we need. You're looking for the stack trace from the crash.

    – Mike M.
    Nov 24 '18 at 5:51











  • Here's the message from logcat:Unable to find explicit activity class {com.androidcodefinder.loginscreendemo/com.github.barteksc.pdfviewer.PDFView}; have you declared this activity in your AndroidManifest.xml?

    – ABAS HERSI
    Nov 24 '18 at 8:00











  • @ABASHERSI does this answer(stackoverflow.com/a/53455588/7360848) solves your problem, if so, please accept it :)

    – Touhidul Islam
    Nov 24 '18 at 11:59
















-1















I have a PDF reading activity that won't open for whatever reason. I suspect that the issue stems from an API that I had imported earlier. When I previewed the XML file in the PDF-reading activity, I noticed that there was a question mark next to the PDF-API, indicating that it hasn't been recognized by android studio I'd be extremely appreciative if anyone could help me figure this out. Here's the code:



XML:



<?xml version="1.0" encoding="utf-8"?>
<android.support.constraint.ConstraintLayout 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"
tools:context=".PDFReader">

<com.github.barteksc.pdfviewer.PDFView
android:id="@+id/pdfViewer"
android:layout_width="match_parent"
android:layout_height="match_parent"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintHorizontal_bias="1.0"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintRight_toRightOf="parent">

</com.github.barteksc.pdfviewer.PDFView>

</android.support.constraint.ConstraintLayout>


Java:



  package com.androidcodefinder.loginscreendemo.Analytics;

import android.content.Context;
import android.content.Intent;
import android.os.Bundle;
import android.support.annotation.Nullable;
import android.support.v7.app.AppCompatActivity;
import android.util.Log;
import android.view.Menu;
import android.view.MenuItem;
import android.view.View;
import android.widget.Button;

import com.androidcodefinder.loginscreendemo.MainActivity;
import com.androidcodefinder.loginscreendemo.R;
import com.androidcodefinder.loginscreendemo.SignUpActivity;
import com.androidcodefinder.loginscreendemo.Utils.BottomNavigationViewHelper;
import com.github.barteksc.pdfviewer.PDFView;
import com.ittianyu.bottomnavigationviewex.BottomNavigationViewEx;

public class AnalyticsActivity extends AppCompatActivity {
private static final String TAG = "AnalyticsActivity";
private Context mContext= AnalyticsActivity.this;
private static final int ACTIVITY_NUM = 0;
private Button pdfViwer;
private Button pdfViwer2;
@Override
protected void onCreate(@Nullable Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.analytics_activity);
Log.d(TAG,"onCreate: started");

setupBottomNavigationView();
pdfViwer=(Button)findViewById(R.id.pdf23);
pdfViwer.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
Intent intent = new Intent(AnalyticsActivity.this,PDFView.class);
startActivity(intent);
}
});
pdfViwer2=(Button)findViewById(R.id.pdf22);
pdfViwer2.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
Intent intent = new Intent(AnalyticsActivity.this,PDFView.class);
startActivity(intent);
}
});

}

private void setupBottomNavigationView(){
Log.d(TAG,"setupBottomNavigationView: setting up BottomNavigationView");
BottomNavigationViewEx bottomNavigationViewEx = (BottomNavigationViewEx) findViewById(R.id.bottomNavViewBar);
BottomNavigationViewHelper.setupBottomNavigationView(bottomNavigationViewEx);
BottomNavigationViewHelper.enableNavigation(mContext, bottomNavigationViewEx);
Menu menu = bottomNavigationViewEx.getMenu();
MenuItem menuItem = menu.getItem(ACTIVITY_NUM);
menuItem.setChecked(true);
}
}


Here's a screenshot of the error:
enter image description here



Error Part 2:



Logcat



Manifest code:



<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.androidcodefinder.loginscreendemo">

<!-- To auto-complete the email text field in the login form with the user's emails -->
<uses-permission android:name="android.permission.GET_ACCOUNTS" />
<uses-permission android:name="android.permission.READ_PROFILE" />
<uses-permission android:name="android.permission.READ_CONTACTS" />
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />

<application
android:allowBackup="true"
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:roundIcon="@mipmap/ic_launcher_background"
android:supportsRtl="true"
android:theme="@style/AppTheme">
<activity android:name=".MainActivity">
<intent-filter>
<action android:name="android.intent.action.MAIN" />

<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity android:name=".SignUpActivity" />
<activity android:name=".zippage" />
<activity android:name=".Catalysts.CatalystsActivity" />
<activity android:name=".Profile.ProfileActivity" />
<activity android:name=".Analytics.AnalyticsActivity" />
<activity android:name=".postpg" />
<activity android:name=".postp1" />
<activity android:name=".post2" />
<activity android:name=".postend" />
<activity android:name=".PDFReader"></activity>
</application>

</manifest>









share|improve this question




















  • 1





    please share your logcat details

    – Suraj Vaishnav
    Nov 24 '18 at 4:51











  • I just added it :)

    – ABAS HERSI
    Nov 24 '18 at 5:49











  • Please don't post screenshots of code, XML, or logcat output. Please post all text as text. Also, that's not what we need. You're looking for the stack trace from the crash.

    – Mike M.
    Nov 24 '18 at 5:51











  • Here's the message from logcat:Unable to find explicit activity class {com.androidcodefinder.loginscreendemo/com.github.barteksc.pdfviewer.PDFView}; have you declared this activity in your AndroidManifest.xml?

    – ABAS HERSI
    Nov 24 '18 at 8:00











  • @ABASHERSI does this answer(stackoverflow.com/a/53455588/7360848) solves your problem, if so, please accept it :)

    – Touhidul Islam
    Nov 24 '18 at 11:59














-1












-1








-1








I have a PDF reading activity that won't open for whatever reason. I suspect that the issue stems from an API that I had imported earlier. When I previewed the XML file in the PDF-reading activity, I noticed that there was a question mark next to the PDF-API, indicating that it hasn't been recognized by android studio I'd be extremely appreciative if anyone could help me figure this out. Here's the code:



XML:



<?xml version="1.0" encoding="utf-8"?>
<android.support.constraint.ConstraintLayout 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"
tools:context=".PDFReader">

<com.github.barteksc.pdfviewer.PDFView
android:id="@+id/pdfViewer"
android:layout_width="match_parent"
android:layout_height="match_parent"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintHorizontal_bias="1.0"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintRight_toRightOf="parent">

</com.github.barteksc.pdfviewer.PDFView>

</android.support.constraint.ConstraintLayout>


Java:



  package com.androidcodefinder.loginscreendemo.Analytics;

import android.content.Context;
import android.content.Intent;
import android.os.Bundle;
import android.support.annotation.Nullable;
import android.support.v7.app.AppCompatActivity;
import android.util.Log;
import android.view.Menu;
import android.view.MenuItem;
import android.view.View;
import android.widget.Button;

import com.androidcodefinder.loginscreendemo.MainActivity;
import com.androidcodefinder.loginscreendemo.R;
import com.androidcodefinder.loginscreendemo.SignUpActivity;
import com.androidcodefinder.loginscreendemo.Utils.BottomNavigationViewHelper;
import com.github.barteksc.pdfviewer.PDFView;
import com.ittianyu.bottomnavigationviewex.BottomNavigationViewEx;

public class AnalyticsActivity extends AppCompatActivity {
private static final String TAG = "AnalyticsActivity";
private Context mContext= AnalyticsActivity.this;
private static final int ACTIVITY_NUM = 0;
private Button pdfViwer;
private Button pdfViwer2;
@Override
protected void onCreate(@Nullable Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.analytics_activity);
Log.d(TAG,"onCreate: started");

setupBottomNavigationView();
pdfViwer=(Button)findViewById(R.id.pdf23);
pdfViwer.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
Intent intent = new Intent(AnalyticsActivity.this,PDFView.class);
startActivity(intent);
}
});
pdfViwer2=(Button)findViewById(R.id.pdf22);
pdfViwer2.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
Intent intent = new Intent(AnalyticsActivity.this,PDFView.class);
startActivity(intent);
}
});

}

private void setupBottomNavigationView(){
Log.d(TAG,"setupBottomNavigationView: setting up BottomNavigationView");
BottomNavigationViewEx bottomNavigationViewEx = (BottomNavigationViewEx) findViewById(R.id.bottomNavViewBar);
BottomNavigationViewHelper.setupBottomNavigationView(bottomNavigationViewEx);
BottomNavigationViewHelper.enableNavigation(mContext, bottomNavigationViewEx);
Menu menu = bottomNavigationViewEx.getMenu();
MenuItem menuItem = menu.getItem(ACTIVITY_NUM);
menuItem.setChecked(true);
}
}


Here's a screenshot of the error:
enter image description here



Error Part 2:



Logcat



Manifest code:



<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.androidcodefinder.loginscreendemo">

<!-- To auto-complete the email text field in the login form with the user's emails -->
<uses-permission android:name="android.permission.GET_ACCOUNTS" />
<uses-permission android:name="android.permission.READ_PROFILE" />
<uses-permission android:name="android.permission.READ_CONTACTS" />
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />

<application
android:allowBackup="true"
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:roundIcon="@mipmap/ic_launcher_background"
android:supportsRtl="true"
android:theme="@style/AppTheme">
<activity android:name=".MainActivity">
<intent-filter>
<action android:name="android.intent.action.MAIN" />

<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity android:name=".SignUpActivity" />
<activity android:name=".zippage" />
<activity android:name=".Catalysts.CatalystsActivity" />
<activity android:name=".Profile.ProfileActivity" />
<activity android:name=".Analytics.AnalyticsActivity" />
<activity android:name=".postpg" />
<activity android:name=".postp1" />
<activity android:name=".post2" />
<activity android:name=".postend" />
<activity android:name=".PDFReader"></activity>
</application>

</manifest>









share|improve this question
















I have a PDF reading activity that won't open for whatever reason. I suspect that the issue stems from an API that I had imported earlier. When I previewed the XML file in the PDF-reading activity, I noticed that there was a question mark next to the PDF-API, indicating that it hasn't been recognized by android studio I'd be extremely appreciative if anyone could help me figure this out. Here's the code:



XML:



<?xml version="1.0" encoding="utf-8"?>
<android.support.constraint.ConstraintLayout 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"
tools:context=".PDFReader">

<com.github.barteksc.pdfviewer.PDFView
android:id="@+id/pdfViewer"
android:layout_width="match_parent"
android:layout_height="match_parent"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintHorizontal_bias="1.0"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintRight_toRightOf="parent">

</com.github.barteksc.pdfviewer.PDFView>

</android.support.constraint.ConstraintLayout>


Java:



  package com.androidcodefinder.loginscreendemo.Analytics;

import android.content.Context;
import android.content.Intent;
import android.os.Bundle;
import android.support.annotation.Nullable;
import android.support.v7.app.AppCompatActivity;
import android.util.Log;
import android.view.Menu;
import android.view.MenuItem;
import android.view.View;
import android.widget.Button;

import com.androidcodefinder.loginscreendemo.MainActivity;
import com.androidcodefinder.loginscreendemo.R;
import com.androidcodefinder.loginscreendemo.SignUpActivity;
import com.androidcodefinder.loginscreendemo.Utils.BottomNavigationViewHelper;
import com.github.barteksc.pdfviewer.PDFView;
import com.ittianyu.bottomnavigationviewex.BottomNavigationViewEx;

public class AnalyticsActivity extends AppCompatActivity {
private static final String TAG = "AnalyticsActivity";
private Context mContext= AnalyticsActivity.this;
private static final int ACTIVITY_NUM = 0;
private Button pdfViwer;
private Button pdfViwer2;
@Override
protected void onCreate(@Nullable Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.analytics_activity);
Log.d(TAG,"onCreate: started");

setupBottomNavigationView();
pdfViwer=(Button)findViewById(R.id.pdf23);
pdfViwer.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
Intent intent = new Intent(AnalyticsActivity.this,PDFView.class);
startActivity(intent);
}
});
pdfViwer2=(Button)findViewById(R.id.pdf22);
pdfViwer2.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
Intent intent = new Intent(AnalyticsActivity.this,PDFView.class);
startActivity(intent);
}
});

}

private void setupBottomNavigationView(){
Log.d(TAG,"setupBottomNavigationView: setting up BottomNavigationView");
BottomNavigationViewEx bottomNavigationViewEx = (BottomNavigationViewEx) findViewById(R.id.bottomNavViewBar);
BottomNavigationViewHelper.setupBottomNavigationView(bottomNavigationViewEx);
BottomNavigationViewHelper.enableNavigation(mContext, bottomNavigationViewEx);
Menu menu = bottomNavigationViewEx.getMenu();
MenuItem menuItem = menu.getItem(ACTIVITY_NUM);
menuItem.setChecked(true);
}
}


Here's a screenshot of the error:
enter image description here



Error Part 2:



Logcat



Manifest code:



<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.androidcodefinder.loginscreendemo">

<!-- To auto-complete the email text field in the login form with the user's emails -->
<uses-permission android:name="android.permission.GET_ACCOUNTS" />
<uses-permission android:name="android.permission.READ_PROFILE" />
<uses-permission android:name="android.permission.READ_CONTACTS" />
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />

<application
android:allowBackup="true"
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:roundIcon="@mipmap/ic_launcher_background"
android:supportsRtl="true"
android:theme="@style/AppTheme">
<activity android:name=".MainActivity">
<intent-filter>
<action android:name="android.intent.action.MAIN" />

<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity android:name=".SignUpActivity" />
<activity android:name=".zippage" />
<activity android:name=".Catalysts.CatalystsActivity" />
<activity android:name=".Profile.ProfileActivity" />
<activity android:name=".Analytics.AnalyticsActivity" />
<activity android:name=".postpg" />
<activity android:name=".postp1" />
<activity android:name=".post2" />
<activity android:name=".postend" />
<activity android:name=".PDFReader"></activity>
</application>

</manifest>






javascript java android android-studio android-layout






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Nov 24 '18 at 8:02







ABAS HERSI

















asked Nov 24 '18 at 4:41









ABAS HERSIABAS HERSI

557




557








  • 1





    please share your logcat details

    – Suraj Vaishnav
    Nov 24 '18 at 4:51











  • I just added it :)

    – ABAS HERSI
    Nov 24 '18 at 5:49











  • Please don't post screenshots of code, XML, or logcat output. Please post all text as text. Also, that's not what we need. You're looking for the stack trace from the crash.

    – Mike M.
    Nov 24 '18 at 5:51











  • Here's the message from logcat:Unable to find explicit activity class {com.androidcodefinder.loginscreendemo/com.github.barteksc.pdfviewer.PDFView}; have you declared this activity in your AndroidManifest.xml?

    – ABAS HERSI
    Nov 24 '18 at 8:00











  • @ABASHERSI does this answer(stackoverflow.com/a/53455588/7360848) solves your problem, if so, please accept it :)

    – Touhidul Islam
    Nov 24 '18 at 11:59














  • 1





    please share your logcat details

    – Suraj Vaishnav
    Nov 24 '18 at 4:51











  • I just added it :)

    – ABAS HERSI
    Nov 24 '18 at 5:49











  • Please don't post screenshots of code, XML, or logcat output. Please post all text as text. Also, that's not what we need. You're looking for the stack trace from the crash.

    – Mike M.
    Nov 24 '18 at 5:51











  • Here's the message from logcat:Unable to find explicit activity class {com.androidcodefinder.loginscreendemo/com.github.barteksc.pdfviewer.PDFView}; have you declared this activity in your AndroidManifest.xml?

    – ABAS HERSI
    Nov 24 '18 at 8:00











  • @ABASHERSI does this answer(stackoverflow.com/a/53455588/7360848) solves your problem, if so, please accept it :)

    – Touhidul Islam
    Nov 24 '18 at 11:59








1




1





please share your logcat details

– Suraj Vaishnav
Nov 24 '18 at 4:51





please share your logcat details

– Suraj Vaishnav
Nov 24 '18 at 4:51













I just added it :)

– ABAS HERSI
Nov 24 '18 at 5:49





I just added it :)

– ABAS HERSI
Nov 24 '18 at 5:49













Please don't post screenshots of code, XML, or logcat output. Please post all text as text. Also, that's not what we need. You're looking for the stack trace from the crash.

– Mike M.
Nov 24 '18 at 5:51





Please don't post screenshots of code, XML, or logcat output. Please post all text as text. Also, that's not what we need. You're looking for the stack trace from the crash.

– Mike M.
Nov 24 '18 at 5:51













Here's the message from logcat:Unable to find explicit activity class {com.androidcodefinder.loginscreendemo/com.github.barteksc.pdfviewer.PDFView}; have you declared this activity in your AndroidManifest.xml?

– ABAS HERSI
Nov 24 '18 at 8:00





Here's the message from logcat:Unable to find explicit activity class {com.androidcodefinder.loginscreendemo/com.github.barteksc.pdfviewer.PDFView}; have you declared this activity in your AndroidManifest.xml?

– ABAS HERSI
Nov 24 '18 at 8:00













@ABASHERSI does this answer(stackoverflow.com/a/53455588/7360848) solves your problem, if so, please accept it :)

– Touhidul Islam
Nov 24 '18 at 11:59





@ABASHERSI does this answer(stackoverflow.com/a/53455588/7360848) solves your problem, if so, please accept it :)

– Touhidul Islam
Nov 24 '18 at 11:59












2 Answers
2






active

oldest

votes


















1














Edit



Declare your activity inside AndroidManifest.xml like this



<application
.
.
android:theme="@style/AppTheme">

<activity android:name=".PDFReader">
</activity>
.
.
</application>


Shouldn't this



Intent intent = new Intent(AnalyticsActivity.this,PDFView.class);



Be that?



Intent intent = new Intent(AnalyticsActivity.this.PDFReader.class);






share|improve this answer


























  • I tried that but it gave me a whole slew of errors unfortunately.

    – ABAS HERSI
    Nov 24 '18 at 7:43











  • please select debug in logcat instead verbose and paster the logcat when the error occurs

    – Touhidul Islam
    Nov 24 '18 at 7:53











  • I did as you said I received the following message:Unable to find explicit activity class {com.androidcodefinder.loginscreendemo/com.github.barteksc.pdfviewer.PDFView}; have you declared this activity in your AndroidManifest.xml?

    – ABAS HERSI
    Nov 24 '18 at 8:00











  • the error is self explanatory, see my updated answer

    – Touhidul Islam
    Nov 24 '18 at 8:32











  • My activity was already declared so that didn't help unfortunately :(

    – ABAS HERSI
    Nov 24 '18 at 19:38



















0














You are finding views



pdfViwer=(Button)findViewById(R.id.pdf23);
pdfViwer2=(Button)findViewById(R.id.pdf22);


with id pdf23,pdf22 but these two not available in your xml file. So it will throw run time exception.






share|improve this answer
























  • Thanks for responding but pdf22 and pdf23 are buttons that are housed in a different xml file so that can't be the issue.

    – ABAS HERSI
    Nov 24 '18 at 5:03











  • Okay, add your logcat to question

    – Suraj Vaishnav
    Nov 24 '18 at 5:44











  • I just added it :)

    – ABAS HERSI
    Nov 24 '18 at 5:49











Your Answer






StackExchange.ifUsing("editor", function () {
StackExchange.using("externalEditor", function () {
StackExchange.using("snippets", function () {
StackExchange.snippets.init();
});
});
}, "code-snippets");

StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "1"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});

function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});


}
});














draft saved

draft discarded


















StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53455192%2fwhats-wrong-with-my-pdf-reader-activity%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown

























2 Answers
2






active

oldest

votes








2 Answers
2






active

oldest

votes









active

oldest

votes






active

oldest

votes









1














Edit



Declare your activity inside AndroidManifest.xml like this



<application
.
.
android:theme="@style/AppTheme">

<activity android:name=".PDFReader">
</activity>
.
.
</application>


Shouldn't this



Intent intent = new Intent(AnalyticsActivity.this,PDFView.class);



Be that?



Intent intent = new Intent(AnalyticsActivity.this.PDFReader.class);






share|improve this answer


























  • I tried that but it gave me a whole slew of errors unfortunately.

    – ABAS HERSI
    Nov 24 '18 at 7:43











  • please select debug in logcat instead verbose and paster the logcat when the error occurs

    – Touhidul Islam
    Nov 24 '18 at 7:53











  • I did as you said I received the following message:Unable to find explicit activity class {com.androidcodefinder.loginscreendemo/com.github.barteksc.pdfviewer.PDFView}; have you declared this activity in your AndroidManifest.xml?

    – ABAS HERSI
    Nov 24 '18 at 8:00











  • the error is self explanatory, see my updated answer

    – Touhidul Islam
    Nov 24 '18 at 8:32











  • My activity was already declared so that didn't help unfortunately :(

    – ABAS HERSI
    Nov 24 '18 at 19:38
















1














Edit



Declare your activity inside AndroidManifest.xml like this



<application
.
.
android:theme="@style/AppTheme">

<activity android:name=".PDFReader">
</activity>
.
.
</application>


Shouldn't this



Intent intent = new Intent(AnalyticsActivity.this,PDFView.class);



Be that?



Intent intent = new Intent(AnalyticsActivity.this.PDFReader.class);






share|improve this answer


























  • I tried that but it gave me a whole slew of errors unfortunately.

    – ABAS HERSI
    Nov 24 '18 at 7:43











  • please select debug in logcat instead verbose and paster the logcat when the error occurs

    – Touhidul Islam
    Nov 24 '18 at 7:53











  • I did as you said I received the following message:Unable to find explicit activity class {com.androidcodefinder.loginscreendemo/com.github.barteksc.pdfviewer.PDFView}; have you declared this activity in your AndroidManifest.xml?

    – ABAS HERSI
    Nov 24 '18 at 8:00











  • the error is self explanatory, see my updated answer

    – Touhidul Islam
    Nov 24 '18 at 8:32











  • My activity was already declared so that didn't help unfortunately :(

    – ABAS HERSI
    Nov 24 '18 at 19:38














1












1








1







Edit



Declare your activity inside AndroidManifest.xml like this



<application
.
.
android:theme="@style/AppTheme">

<activity android:name=".PDFReader">
</activity>
.
.
</application>


Shouldn't this



Intent intent = new Intent(AnalyticsActivity.this,PDFView.class);



Be that?



Intent intent = new Intent(AnalyticsActivity.this.PDFReader.class);






share|improve this answer















Edit



Declare your activity inside AndroidManifest.xml like this



<application
.
.
android:theme="@style/AppTheme">

<activity android:name=".PDFReader">
</activity>
.
.
</application>


Shouldn't this



Intent intent = new Intent(AnalyticsActivity.this,PDFView.class);



Be that?



Intent intent = new Intent(AnalyticsActivity.this.PDFReader.class);







share|improve this answer














share|improve this answer



share|improve this answer








edited Nov 24 '18 at 8:31

























answered Nov 24 '18 at 6:00









Touhidul IslamTouhidul Islam

1,3041415




1,3041415













  • I tried that but it gave me a whole slew of errors unfortunately.

    – ABAS HERSI
    Nov 24 '18 at 7:43











  • please select debug in logcat instead verbose and paster the logcat when the error occurs

    – Touhidul Islam
    Nov 24 '18 at 7:53











  • I did as you said I received the following message:Unable to find explicit activity class {com.androidcodefinder.loginscreendemo/com.github.barteksc.pdfviewer.PDFView}; have you declared this activity in your AndroidManifest.xml?

    – ABAS HERSI
    Nov 24 '18 at 8:00











  • the error is self explanatory, see my updated answer

    – Touhidul Islam
    Nov 24 '18 at 8:32











  • My activity was already declared so that didn't help unfortunately :(

    – ABAS HERSI
    Nov 24 '18 at 19:38



















  • I tried that but it gave me a whole slew of errors unfortunately.

    – ABAS HERSI
    Nov 24 '18 at 7:43











  • please select debug in logcat instead verbose and paster the logcat when the error occurs

    – Touhidul Islam
    Nov 24 '18 at 7:53











  • I did as you said I received the following message:Unable to find explicit activity class {com.androidcodefinder.loginscreendemo/com.github.barteksc.pdfviewer.PDFView}; have you declared this activity in your AndroidManifest.xml?

    – ABAS HERSI
    Nov 24 '18 at 8:00











  • the error is self explanatory, see my updated answer

    – Touhidul Islam
    Nov 24 '18 at 8:32











  • My activity was already declared so that didn't help unfortunately :(

    – ABAS HERSI
    Nov 24 '18 at 19:38

















I tried that but it gave me a whole slew of errors unfortunately.

– ABAS HERSI
Nov 24 '18 at 7:43





I tried that but it gave me a whole slew of errors unfortunately.

– ABAS HERSI
Nov 24 '18 at 7:43













please select debug in logcat instead verbose and paster the logcat when the error occurs

– Touhidul Islam
Nov 24 '18 at 7:53





please select debug in logcat instead verbose and paster the logcat when the error occurs

– Touhidul Islam
Nov 24 '18 at 7:53













I did as you said I received the following message:Unable to find explicit activity class {com.androidcodefinder.loginscreendemo/com.github.barteksc.pdfviewer.PDFView}; have you declared this activity in your AndroidManifest.xml?

– ABAS HERSI
Nov 24 '18 at 8:00





I did as you said I received the following message:Unable to find explicit activity class {com.androidcodefinder.loginscreendemo/com.github.barteksc.pdfviewer.PDFView}; have you declared this activity in your AndroidManifest.xml?

– ABAS HERSI
Nov 24 '18 at 8:00













the error is self explanatory, see my updated answer

– Touhidul Islam
Nov 24 '18 at 8:32





the error is self explanatory, see my updated answer

– Touhidul Islam
Nov 24 '18 at 8:32













My activity was already declared so that didn't help unfortunately :(

– ABAS HERSI
Nov 24 '18 at 19:38





My activity was already declared so that didn't help unfortunately :(

– ABAS HERSI
Nov 24 '18 at 19:38













0














You are finding views



pdfViwer=(Button)findViewById(R.id.pdf23);
pdfViwer2=(Button)findViewById(R.id.pdf22);


with id pdf23,pdf22 but these two not available in your xml file. So it will throw run time exception.






share|improve this answer
























  • Thanks for responding but pdf22 and pdf23 are buttons that are housed in a different xml file so that can't be the issue.

    – ABAS HERSI
    Nov 24 '18 at 5:03











  • Okay, add your logcat to question

    – Suraj Vaishnav
    Nov 24 '18 at 5:44











  • I just added it :)

    – ABAS HERSI
    Nov 24 '18 at 5:49
















0














You are finding views



pdfViwer=(Button)findViewById(R.id.pdf23);
pdfViwer2=(Button)findViewById(R.id.pdf22);


with id pdf23,pdf22 but these two not available in your xml file. So it will throw run time exception.






share|improve this answer
























  • Thanks for responding but pdf22 and pdf23 are buttons that are housed in a different xml file so that can't be the issue.

    – ABAS HERSI
    Nov 24 '18 at 5:03











  • Okay, add your logcat to question

    – Suraj Vaishnav
    Nov 24 '18 at 5:44











  • I just added it :)

    – ABAS HERSI
    Nov 24 '18 at 5:49














0












0








0







You are finding views



pdfViwer=(Button)findViewById(R.id.pdf23);
pdfViwer2=(Button)findViewById(R.id.pdf22);


with id pdf23,pdf22 but these two not available in your xml file. So it will throw run time exception.






share|improve this answer













You are finding views



pdfViwer=(Button)findViewById(R.id.pdf23);
pdfViwer2=(Button)findViewById(R.id.pdf22);


with id pdf23,pdf22 but these two not available in your xml file. So it will throw run time exception.







share|improve this answer












share|improve this answer



share|improve this answer










answered Nov 24 '18 at 4:56









Suraj VaishnavSuraj Vaishnav

1,5262518




1,5262518













  • Thanks for responding but pdf22 and pdf23 are buttons that are housed in a different xml file so that can't be the issue.

    – ABAS HERSI
    Nov 24 '18 at 5:03











  • Okay, add your logcat to question

    – Suraj Vaishnav
    Nov 24 '18 at 5:44











  • I just added it :)

    – ABAS HERSI
    Nov 24 '18 at 5:49



















  • Thanks for responding but pdf22 and pdf23 are buttons that are housed in a different xml file so that can't be the issue.

    – ABAS HERSI
    Nov 24 '18 at 5:03











  • Okay, add your logcat to question

    – Suraj Vaishnav
    Nov 24 '18 at 5:44











  • I just added it :)

    – ABAS HERSI
    Nov 24 '18 at 5:49

















Thanks for responding but pdf22 and pdf23 are buttons that are housed in a different xml file so that can't be the issue.

– ABAS HERSI
Nov 24 '18 at 5:03





Thanks for responding but pdf22 and pdf23 are buttons that are housed in a different xml file so that can't be the issue.

– ABAS HERSI
Nov 24 '18 at 5:03













Okay, add your logcat to question

– Suraj Vaishnav
Nov 24 '18 at 5:44





Okay, add your logcat to question

– Suraj Vaishnav
Nov 24 '18 at 5:44













I just added it :)

– ABAS HERSI
Nov 24 '18 at 5:49





I just added it :)

– ABAS HERSI
Nov 24 '18 at 5:49


















draft saved

draft discarded




















































Thanks for contributing an answer to Stack Overflow!


  • Please be sure to answer the question. Provide details and share your research!

But avoid



  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.


To learn more, see our tips on writing great answers.




draft saved


draft discarded














StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53455192%2fwhats-wrong-with-my-pdf-reader-activity%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown





















































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown

































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown







Popular posts from this blog

Costa Masnaga

Fotorealismo

Sidney Franklin