android - WI-FI and CameraPreview Integration Activity Error

Asked 2 years ago, Updated 2 years ago, 132 views

I am a college student who is preparing for graduation.

Recently, I used Android for the first time related to my graduation work.

At school, the language system itself is unfamiliar because I use C language, not JAVA, but while I was looking for this and that, an error occurred while coding while looking at the example source, but I don't know how to look at LogCat

I would appreciate it if you could find the problem with the error even though I gave the permission for WIFI and Camera to Manifest and set up the activity. It's an urgent task, so the sooner the better.

-Manifest- <?xml version="1.0" encoding="utf-8"?>

<uses-sdk
    android:minSdkVersion="18"
    android:targetSdkVersion="20" />

<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />
<uses-permission android:name="android.permission.CHANGE_WIFI_STATE" />

<uses-permission android:name="android.permission.CAMERA" />
<uses-feature android:name="android.hardware.camera" />
<uses-feature android:name="android.hardware.camera.autofocus" />

<application
    android:allowBackup="true"
    android:icon="@drawable/ic_launcher"
    android:label="@string/app_name"
    android:theme="@android:style/Theme.Holo.Light" android:supportRtl="true"![Image][2]android:isGame="true">
    <activity
        android:name="com.example.wifi_test_01.MainActivity"
        android:label="@string/app_name" >
        <intent-filter>
            <action android:name="android.intent.action.MAIN" />

            <category android:name="android.intent.category.LAUNCHER" />
        </intent-filter>
    </activity>
    <activity android:name="CameraActivity"></activity>
</application>

-LogCat-

If you need anything else, I'll upload it

android activity

2022-09-22 20:29

4 Answers

Please understand that the content is not smooth because it's my first time posting it ㅠ<


2022-09-22 20:29

Null is dropping from getPackageManager Check out the context


2022-09-22 20:29

While continuing, I caught the null value of getPackageManager. After catching, a new error occurred, and this time the value of getResources() appears as null.

I'm not sure what to do in this case....


2022-09-22 20:29

I think it'll be easy to solve if you post up what part of coding is wrong. For example, how the activity was called.


2022-09-22 20:29

If you have any answers or tips


© 2024 OneMinuteCode. All rights reserved.