حل ارور Warning: Cannot modify header information – headers already sent by در PHP

خب سلام دوستان.

تو یکی از پروژه ها به ارور زیر برخوردم:

Warning: Cannot modify header information – headers already sent by (output started at /some/file.php:12) in /some/file.php on line 23

این ارور چندتا دلیل داره که مشکل من با روش زیر که بهتون میگم حل شد. شاید واسه شما با راه حل های دیگه که لینکشو میذارم حل شه ولی پیشنهاد میکنم این راه حل رو انجام بدید اگه جواب نداد برید بعدیا.

کدهای php رو تو بالاترین قسمت سایت قرار بدید؛ یعنی بالای :

<!DOCTYPE html>

اگه مشکل حل نشد ، برید لینک زیر و بقیه ی راه حل هارو حل کنید.

https://2ad.ir/WV95SNFv

حل ارور licenses Android SDK در VS Code

FAILURE: Build failed with an exception.

  • What went wrong:
    Could not determine the dependencies of task ‘:app:compileDebugJavaWithJavac’.

Failed to install the following Android SDK packages as some licences have not been accepted.
build-tools;28.0.3 Android SDK Build-Tools 28.0.3
To build this project, accept the SDK license agreements and install the missing components using the Android Studio SDK Manager.
Alternatively, to transfer the license agreements from one workstation to another, see http://d.android.com/r/studio-ui/export-licenses.html

Using Android SDK: C:\Users\Bessi\AppData\Local\Android\sdk

  • Try:
    Run with –stacktrace option to get the stack trace. Run with –info or –debug option to get more log output. Run with –scan to get full insights.
  • Get more help at https://help.gradle.org

Running Gradle task ‘assembleDebug’…
Running Gradle task ‘assembleDebug’… Done 155.0s (!)
Exception: Gradle task assembleDebug failed with exit code 1


دوستان عزیزم بعد ازنصب فلاتر با ارور بالا مواجه شدم. و بعد از ساعتها سرچ و جستجو متوجه شدم بعد از دانلود sdk android یه پوشه به نام license در کنار اونها باید باشه تا به این ارور برنخورید.

من هرچی سرچ کردم تا به امروز کسی روشی برای vs code نذاشته بود. برا همین گفتم برای اندروید استودیو چک کنم تا ببینم نتیجه ای هست یا نه؛ بله بود. اما من اول پیشنهاد میکنم برید تو آدرس محل sdk ، کنار فایلها یه پوشه به نام licenses باز کنید. یه فایل txt ایجاد کنید و نامش رو android-sdk-license بذارید. داخلش هم لایسنس زیر رو کپی کنید : 24333f8a63b6825ea9c5514f83c2829b004d1fee

اگر خدا نکرده این روش جواب نداد، باز دوتا پیشنهاد دارم:

1- اگه هنوز فایلSDK اندروید رو دانلود نکردید، کامنت بذارید تا براتون آپلود کنم و از اینهمه مشقت رهایی یابید.

2- اگه فایل sdk ر دان کردید و اندروید استودیو رو رو سیستمتون نصب ارید، به راحتی میتونید این مشکل رو حل کنید. ویدیو رو از این لینک دانلود کنید.

وجدانا اگه به دردتون خورد کامنت بذارید منم انگیزه بگیرم واسه ادامه کار.

حل ارور gradle در vscode

PS D:\Projects\Flutter\helloflutter> flutter run
Launching lib\main.dart on 192.168.149.101:5555 in debug mode…

FAILURE: Build failed with an exception.

  • What went wrong:
    A problem occurred configuring root project ‘android’.

Could not resolve all artifacts for configuration ‘:classpath’.
Could not find com.android.tools.build:gradle:3.5.0.
Searched in the following locations:
– https://dl.google.com/dl/android/maven2/com/android/tools/build/gradle/3.5.0/gradle-3.5.0.pom
– https://dl.google.com/dl/android/maven2/com/android/tools/build/gradle/3.5.0/gradle-3.5.0.jar
– https://jcenter.bintray.com/com/android/tools/build/gradle/3.5.0/gradle-3.5.0.pom
– https://jcenter.bintray.com/com/android/tools/build/gradle/3.5.0/gradle-3.5.0.jar
Required by:
project :

  • Try:
    Run with –stacktrace option to get the stack trace. Run with –info or –debug option to get more log output. Run with –scan to get full insights.
  • Get more help at https://help.gradle.org

BUILD FAILED in 12s
Running Gradle task ‘assembleDebug’…
Running Gradle task ‘assembleDebug’… Done 14.8s
Exception: Gradle task assembleDebug failed with exit code 1


ویدیو آموزش نصب gradle روی ویندوز رو میتونید از لینک زیر دانلود کنید:

کلیک کنید